1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/hacking/templates/latex.j2

71 lines
1.6 KiB
Text
Raw Normal View History

2012-09-26 20:41:44 +02:00
%--- @{ module | upper }@ ---- from @{ filename }@ ---
%: -- module header
\mods{@{module}@}{@{docuri}@}{
{% for desc in description -%}
@{ desc | jpfunc }@
{% endfor -%}
{% if version_added is defined -%}
(\I{* new in version @{ version_added }@})
{% endif -%}
}
%: -- module options
{% if options is defined -%}
\begin{xlist}{abcdefghijklmno}
{% for o in options -%}
{% for opt, v in o.iteritems() -%}
{% if v['required'] -%}
\item[\man\,\C{@{ opt }@}]
{% else -%}
\item[\opt\,\C{@{ opt }@}]
{% endif -%}
{# -------- option description ----------#}
{% for desc in v.description -%}
@{ desc | jpfunc }@
{% endfor %}
{% if v['choices'] -%}
\B{Choices}:\,
{% for choice in v['choices'] -%}\C{@{ choice }@}{% if not loop.last %},{% else %}.{% endif %}
{% endfor -%}
{% endif -%}
{% if v['default'] -%}
(default \C{@{ v['default'] }@})
{% endif -%}
{% if v['version_added'] is defined -%}
(\I{* version @{ v['version_added'] }@})
{% endif -%}
{% endfor -%}
{% endfor -%}
\end{xlist}
{% endif -%}
{% if notes is defined -%}
{# -------- notes ----------#}
{% for note in notes -%}
\I{@{ note | jpfunc }@}
{% endfor %}
{% endif -%}
{#-------------------------------------------
{% if examples is defined -%}
{% for e in examples -%}
\begin{extymeta}
@{ e['code'] }@
\end{extymeta}
{% endfor -%}
{% endif -%}
----------------------------------- #}
{% if extradata is defined -%}
%--- BEGIN-EXTRADATA
\begin{extymeta}
@{ extradata -}@
\end{extymeta}
%----- END-EXTRADATA
{% endif -%}