1 ## NUT macros: linkman, linkdoc
3 # Usage: linkman:command[manpage-section]
4 # This macro allows to handle variable manpage location, depending on the
7 # Note, {0} is the manpage section, while {target} is the command.
9 # Example: linkman:ups.conf[5]
11 # Show NUT link as: <command>(<section>); if section is defined, else just show
14 ################################################################################
16 # Usage: linkdoc:document[display title,[anchor]]
17 # This macro allows to handle variable NUT documentation location, depending
18 # on the document type
20 # Note, {1} is the display title, {2} is the optional anchor name,
21 # {0} is the whole set of args ({1}...{n}) and {target} is the
24 # linkdoc:user-manual[user manual,NUT_Security]
25 # linkdoc:developer-guide[developer guide,_status_data]
28 (?su)[\\]?(?P<name>linkman):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
29 (?su)[\\]?(?P<name>linkdoc):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
31 ifdef::basebackend-docbook[]
32 ifdef::xhtml11_format[]
34 <ulink url="man/{target}.html">{target}{0?({0})}</ulink>
36 <ulink url="{target}.html{2?#{2}}">{1}</ulink>
37 endif::xhtml11_format[]
39 # FIXME: linkdoc does not support 'anchor'
40 ifdef::chunked_format[]
42 <ulink url="../man/{target}.html">{target}{0?({0})}</ulink>
44 <ulink url="../{target}.chunked/index.html">{1}</ulink>
45 endif::chunked_format[]
47 # PDF output points online versions
48 # FIXME: linkdoc does not support 'anchor'
51 <ulink url="http://www.networkupstools.org/docs/man/{target}.html">{target}{0?({0})}</ulink>
53 <ulink url="{target}.pdf">{1}</ulink>
55 endif::basebackend-docbook[]