Updated documentation formatting

pull/1384/head
hbristow 11 years ago
parent 059d63cceb
commit fad7b35b9a
  1. 12
      modules/matlab/generator/templates/template_doc_base.m

@ -6,9 +6,9 @@
{{ doc.long | stripTags | qualify(fun.name) | comment(75, '% ') }}
{% endif %}
%
{# ----------------------- Returns --------------------- #}
{% if fun.rtp|void|not or fun.req|outputs|length or fun.opt|outputs|length %}
% Returns:
{% endif %}
{% if fun.rtp|void|not %}
% LVALUE
{% endif %}
@ -21,21 +21,22 @@
{% endif %}
{% endfor %}
%
{% endif %}
{# ----------------- Required Inputs ------------------- #}
{% if fun.req|inputs|length %}
% Required Inputs:
{% endif %}
{% for arg in fun.req|inputs %}
{% set uname = arg.name | upper + ('_IN' if arg.O else '') %}
{% if arg.name in doc.params %}
{{ (uname + ' ' + doc.params[arg.name]) | stripTags | comment(75, '% ') }}
{% else %}
{{ uname }}
{% endif %}
{% endfor %}
%
{% endif %}
{# ------------------ Optional Inputs ------------------- #}
{% if fun.opt|inputs|length %}
% Optional Inputs:
{% endif %}
{% for arg in fun.opt|inputs %}
{% set uname = arg.name | upper + ('_IN' if arg.O else '') + ' (default: ' + arg.default + ')' %}
{% if arg.name in doc.params %}
@ -45,6 +46,8 @@
{% endif %}
{% endfor %}
%
{% endif %}
{# ---------------------- See also --------------------- #}
{% if 'seealso' in doc %}
% See also: {% for item in doc['seealso'] %}
cv.{{ item }}{% if not loop.last %}, {% endif %}
@ -52,6 +55,7 @@ cv.{{ item }}{% if not loop.last %}, {% endif %}
%
{% endif %}
{# ----------------------- Online ---------------------- #}
{% set url = 'http://docs.opencv.org/modules/' + doc.module + '/doc/' + (doc.file|filename) + '.html#' + (fun.name|slugify) %}
% Online docs: <a href="matlab: web('{{url}}', '-browser')">{{url}}</a>
% Copyright {{ time.strftime("%Y", time.localtime()) }} The OpenCV Foundation

Loading…
Cancel
Save