texinfo.texi 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. @c -*-texinfo-*-
  2. @c This is part of the GNU Guile Reference Manual.
  3. @c Copyright (C) 2013, 2020 Free Software Foundation, Inc.
  4. @c See the file guile.texi for copying conditions.
  5. @c Note: Don't use "Texinfo" as the node name here because this leads to
  6. @c a clash in the HTML output between texinfo.html (from the "texinfo"
  7. @c node) and Texinfo.html on case-insensitive file systems such as
  8. @c HFS+ (MacOS X).
  9. @node Texinfo Processing
  10. @section Texinfo Processing
  11. @menu
  12. * texinfo:: Parse texinfo files or fragments into @code{stexi}, a scheme representation
  13. * texinfo docbook:: Transform a subset of docbook into @code{stexi}
  14. * texinfo html:: Transform @code{stexi} into HTML
  15. * texinfo indexing:: Extract an index from a piece of @code{stexi}
  16. * texinfo string-utils:: String utility functions used by the texinfo processor
  17. * texinfo plain-text:: Render @code{stexi} as plain text
  18. * texinfo serialize:: Render @code{stexi} as texinfo
  19. * texinfo reflection:: Enable texinfo across Guile's help system
  20. @end menu
  21. @node texinfo
  22. @subsection (texinfo)
  23. @subsubsection Overview
  24. @subheading Texinfo processing in scheme
  25. This module parses texinfo into SXML. TeX will always be the processor
  26. of choice for print output, of course. However, although @code{makeinfo}
  27. works well for info, its output in other formats is not very
  28. customizable, and the program is not extensible as a whole. This module
  29. aims to provide an extensible framework for texinfo processing that
  30. integrates texinfo into the constellation of SXML processing tools.
  31. @subheading Notes on the SXML vocabulary
  32. Consider the following texinfo fragment:
  33. @example
  34. @@deffn Primitive set-car! pair value
  35. This function...
  36. @@end deffn
  37. @end example
  38. Logically, the category (Primitive), name (set-car!), and arguments
  39. (pair value) are ``attributes'' of the deffn, with the description as
  40. the content. However, texinfo allows for @@-commands within the
  41. arguments to an environment, like @code{@@deffn}, which means that
  42. texinfo ``attributes'' are PCDATA. XML attributes, on the other hand,
  43. are CDATA. For this reason, ``attributes'' of texinfo @@-commands are
  44. called ``arguments'', and are grouped under the special element, `%'.
  45. Because `%' is not a valid NCName, stexinfo is a superset of SXML. In
  46. the interests of interoperability, this module provides a conversion
  47. function to replace the `%' with `texinfo-arguments'.
  48. @subsubsection Usage
  49. @anchor{texinfo call-with-file-and-dir}@defun call-with-file-and-dir filename proc
  50. Call the one-argument procedure @var{proc} with an input port that reads
  51. from @var{filename}. During the dynamic extent of @var{proc}'s
  52. execution, the current directory will be @code{(dirname
  53. @var{filename})}. This is useful for parsing documents that can include
  54. files by relative path name.
  55. @end defun
  56. @anchor{texinfo texi-command-specs}@defvar texi-command-specs
  57. @end defvar
  58. @anchor{texinfo texi-command-depth}@defun texi-command-depth command max-depth
  59. Given the texinfo command @var{command}, return its nesting level, or
  60. @code{#f} if it nests too deep for @var{max-depth}.
  61. Examples:
  62. @example
  63. (texi-command-depth 'chapter 4) @result{} 1
  64. (texi-command-depth 'top 4) @result{} 0
  65. (texi-command-depth 'subsection 4) @result{} 3
  66. (texi-command-depth 'appendixsubsec 4) @result{} 3
  67. (texi-command-depth 'subsection 2) @result{} #f
  68. @end example
  69. @end defun
  70. @anchor{texinfo texi-fragment->stexi}@defun texi-fragment->stexi string-or-port
  71. Parse the texinfo commands in @var{string-or-port}, and return the
  72. resultant stexi tree. The head of the tree will be the special command,
  73. @code{*fragment*}.
  74. @end defun
  75. @anchor{texinfo texi->stexi}@defun texi->stexi port
  76. Read a full texinfo document from @var{port} and return the parsed stexi
  77. tree. The parsing will start at the @code{@@settitle} and end at
  78. @code{@@bye} or EOF.
  79. @end defun
  80. @anchor{texinfo stexi->sxml}@defun stexi->sxml tree
  81. Transform the stexi tree @var{tree} into sxml. This involves replacing
  82. the @code{%} element that keeps the texinfo arguments with an element
  83. for each argument.
  84. FIXME: right now it just changes % to @code{texinfo-arguments} -- that
  85. doesn't hang with the idea of making a dtd at some point
  86. @end defun
  87. @node texinfo docbook
  88. @subsection (texinfo docbook)
  89. @subsubsection Overview
  90. @c
  91. This module exports procedures for transforming a limited subset of the
  92. SXML representation of docbook into stexi. It is not complete by any
  93. means. The intention is to gather a number of routines and stylesheets
  94. so that external modules can parse specific subsets of docbook, for
  95. example that set generated by certain tools.
  96. @subsubsection Usage
  97. @anchor{texinfo docbook *sdocbook->stexi-rules*}@defvar *sdocbook->stexi-rules*
  98. @end defvar
  99. @anchor{texinfo docbook *sdocbook-block-commands*}@defvar *sdocbook-block-commands*
  100. @end defvar
  101. @anchor{texinfo docbook sdocbook-flatten}@defun sdocbook-flatten sdocbook
  102. "Flatten" a fragment of sdocbook so that block elements do not nest
  103. inside each other.
  104. Docbook is a nested format, where e.g. a @code{refsect2} normally
  105. appears inside a @code{refsect1}. Logical divisions in the document are
  106. represented via the tree topology; a @code{refsect2} element
  107. @emph{contains} all of the elements in its section.
  108. On the contrary, texinfo is a flat format, in which sections are marked
  109. off by standalone section headers like @code{@@subsection}, and block
  110. elements do not nest inside each other.
  111. This function takes a nested sdocbook fragment @var{sdocbook} and
  112. flattens all of the sections, such that e.g.
  113. @example
  114. (refsect1 (refsect2 (para "Hello")))
  115. @end example
  116. becomes
  117. @example
  118. ((refsect1) (refsect2) (para "Hello"))
  119. @end example
  120. Oftentimes (always?) sectioning elements have @code{<title>} as their
  121. first element child; users interested in processing the @code{refsect*}
  122. elements into proper sectioning elements like @code{chapter} might be
  123. interested in @code{replace-titles} and @code{filter-empty-elements}.
  124. @xref{texinfo docbook replace-titles,,replace-titles}, and @ref{texinfo
  125. docbook filter-empty-elements,,filter-empty-elements}.
  126. Returns a nodeset; that is to say, an untagged list of stexi elements.
  127. @xref{SXPath}, for the definition of a nodeset.
  128. @end defun
  129. @anchor{texinfo docbook filter-empty-elements}@defun filter-empty-elements sdocbook
  130. Filters out empty elements in an sdocbook nodeset. Mostly useful after
  131. running @code{sdocbook-flatten}.
  132. @end defun
  133. @anchor{texinfo docbook replace-titles}@defun replace-titles sdocbook-fragment
  134. Iterate over the sdocbook nodeset @var{sdocbook-fragment}, transforming
  135. contiguous @code{refsect} and @code{title} elements into the appropriate
  136. texinfo sectioning command. Most useful after having run
  137. @code{sdocbook-flatten}.
  138. For example:
  139. @example
  140. (replace-titles '((refsect1) (title "Foo") (para "Bar.")))
  141. @result{} '((chapter "Foo") (para "Bar."))
  142. @end example
  143. @end defun
  144. @node texinfo html
  145. @subsection (texinfo html)
  146. @subsubsection Overview
  147. This module implements transformation from @code{stexi} to HTML. Note
  148. that the output of @code{stexi->shtml} is actually SXML with the HTML
  149. vocabulary. This means that the output can be further processed, and
  150. that it must eventually be serialized by @code{sxml->xml}.
  151. @xref{Reading and Writing XML}.
  152. References (i.e., the @code{@@ref} family of commands) are resolved by a
  153. @dfn{ref-resolver}. @xref{texinfo html
  154. add-ref-resolver!,add-ref-resolver!}.
  155. @subsubsection Usage
  156. @anchor{texinfo html add-ref-resolver!}@defun add-ref-resolver! proc
  157. Add @var{proc} to the head of the list of ref-resolvers. @var{proc} will
  158. be expected to take the name of a node and the name of a manual and
  159. return the URL of the referent, or @code{#f} to pass control to the next
  160. ref-resolver in the list.
  161. The default ref-resolver will return the concatenation of the manual
  162. name, @code{#}, and the node name.
  163. @end defun
  164. @anchor{texinfo html stexi->shtml}@defun stexi->shtml tree
  165. Transform the stexi @var{tree} into shtml, resolving references via
  166. ref-resolvers. See the module commentary for more details.
  167. @end defun
  168. @anchor{texinfo html urlify}@defun urlify str
  169. @end defun
  170. @node texinfo indexing
  171. @subsection (texinfo indexing)
  172. @subsubsection Overview
  173. @c texinfo formatting
  174. Given a piece of stexi, return an index of a specified variety.
  175. Note that currently, @code{stexi-extract-index} doesn't differentiate
  176. between different kinds of index entries. That's a bug ;)
  177. @subsubsection Usage
  178. @anchor{texinfo indexing stexi-extract-index}@defun stexi-extract-index tree manual-name kind
  179. Given an stexi tree @var{tree}, index all of the entries of type
  180. @var{kind}. @var{kind} can be one of the predefined texinfo indices
  181. (@code{concept}, @code{variable}, @code{function}, @code{key},
  182. @code{program}, @code{type}) or one of the special symbols @code{auto}
  183. or @code{all}. @code{auto} will scan the stext for a @code{(printindex)}
  184. statement, and @code{all} will generate an index from all entries,
  185. regardless of type.
  186. The returned index is a list of pairs, the @sc{car} of which is the
  187. entry (a string) and the @sc{cdr} of which is a node name (a string).
  188. @end defun
  189. @node texinfo string-utils
  190. @subsection (texinfo string-utils)
  191. @subsubsection Overview
  192. Module @samp{(texinfo string-utils)} provides various string-related
  193. functions useful to Guile's texinfo support.
  194. @subsubsection Usage
  195. @anchor{texinfo string-utils escape-special-chars}@defun escape-special-chars str special-chars escape-char
  196. Returns a copy of @var{str} with all given special characters preceded
  197. by the given @var{escape-char}.
  198. @var{special-chars} can either be a single character, or a string
  199. consisting of all the special characters.
  200. @lisp
  201. ;; make a string regexp-safe...
  202. (escape-special-chars "***(Example String)***"
  203. "[]()/*."
  204. #\\)
  205. => "\\*\\*\\*\\(Example String\\)\\*\\*\\*"
  206. ;; also can escape a singe char...
  207. (escape-special-chars "richardt@@vzavenue.net"
  208. #\@@
  209. #\@@)
  210. => "richardt@@@@vzavenue.net"
  211. @end lisp
  212. @end defun
  213. @anchor{texinfo string-utils transform-string}@defun transform-string str match? replace [start] [end]
  214. Uses @var{match?} against each character in @var{str}, and performs a
  215. replacement on each character for which matches are found.
  216. @var{match?} may either be a function, a character, a string, or
  217. @code{#t}. If @var{match?} is a function, then it takes a single
  218. character as input, and should return @samp{#t} for matches.
  219. @var{match?} is a character, it is compared to each string character
  220. using @code{char=?}. If @var{match?} is a string, then any character in
  221. that string will be considered a match. @code{#t} will cause every
  222. character to be a match.
  223. If @var{replace} is a function, it is called with the matched character
  224. as an argument, and the returned value is sent to the output string via
  225. @samp{display}. If @var{replace} is anything else, it is sent through
  226. the output string via @samp{display}.
  227. Note that the replacement for the matched characters does not need to be
  228. a single character. That is what differentiates this function from
  229. @samp{string-map}, and what makes it useful for applications such as
  230. converting @samp{#\&} to @samp{"&amp;"} in web page text. Some other
  231. functions in this module are just wrappers around common uses of
  232. @samp{transform-string}. Transformations not possible with this function
  233. should probably be done with regular expressions.
  234. If @var{start} and @var{end} are given, they control which portion of
  235. the string undergoes transformation. The entire input string is still
  236. output, though. So, if @var{start} is @samp{5}, then the first five
  237. characters of @var{str} will still appear in the returned string.
  238. @lisp
  239. ; these two are equivalent...
  240. (transform-string str #\space #\-) ; change all spaces to -'s
  241. (transform-string str (lambda (c) (char=? #\space c)) #\-)
  242. @end lisp
  243. @end defun
  244. @anchor{texinfo string-utils expand-tabs}@defun expand-tabs str [tab-size]
  245. Returns a copy of @var{str} with all tabs expanded to spaces.
  246. @var{tab-size} defaults to 8.
  247. Assuming tab size of 8, this is equivalent to:
  248. @lisp
  249. (transform-string str #\tab " ")
  250. @end lisp
  251. @end defun
  252. @anchor{texinfo string-utils center-string}@defun center-string str [width] [chr] [rchr]
  253. Returns a copy of @var{str} centered in a field of @var{width}
  254. characters. Any needed padding is done by character @var{chr}, which
  255. defaults to @samp{#\space}. If @var{rchr} is provided, then the padding
  256. to the right will use it instead. See the examples below. left and
  257. @var{rchr} on the right. The default @var{width} is 80. The default
  258. @var{chr} and @var{rchr} is @samp{#\space}. The string is never
  259. truncated.
  260. @lisp
  261. (center-string "Richard Todd" 24)
  262. => " Richard Todd "
  263. (center-string " Richard Todd " 24 #\=)
  264. => "===== Richard Todd ====="
  265. (center-string " Richard Todd " 24 #\< #\>)
  266. => "<<<<< Richard Todd >>>>>"
  267. @end lisp
  268. @end defun
  269. @anchor{texinfo string-utils left-justify-string}@defun left-justify-string str [width] [chr]
  270. @code{left-justify-string str [width chr]}. Returns a copy of @var{str}
  271. padded with @var{chr} such that it is left justified in a field of
  272. @var{width} characters. The default @var{width} is 80. Unlike
  273. @samp{string-pad} from srfi-13, the string is never truncated.
  274. @end defun
  275. @anchor{texinfo string-utils right-justify-string}@defun right-justify-string str [width] [chr]
  276. Returns a copy of @var{str} padded with @var{chr} such that it is right
  277. justified in a field of @var{width} characters. The default @var{width}
  278. is 80. The default @var{chr} is @samp{#\space}. Unlike @samp{string-pad}
  279. from srfi-13, the string is never truncated.
  280. @end defun
  281. @anchor{texinfo string-utils collapse-repeated-chars}@defun collapse-repeated-chars str [chr] [num]
  282. Returns a copy of @var{str} with all repeated instances of @var{chr}
  283. collapsed down to at most @var{num} instances. The default value for
  284. @var{chr} is @samp{#\space}, and the default value for @var{num} is 1.
  285. @lisp
  286. (collapse-repeated-chars "H e l l o")
  287. => "H e l l o"
  288. (collapse-repeated-chars "H--e--l--l--o" #\-)
  289. => "H-e-l-l-o"
  290. (collapse-repeated-chars "H-e--l---l----o" #\- 2)
  291. => "H-e--l--l--o"
  292. @end lisp
  293. @end defun
  294. @anchor{texinfo string-utils make-text-wrapper}@defun make-text-wrapper [#:line-width] [#:expand-tabs?] [#:tab-width] [#:collapse-whitespace?] [#:subsequent-indent] [#:initial-indent] [#:break-long-words?]
  295. Returns a procedure that will split a string into lines according to the
  296. given parameters.
  297. @table @code
  298. @item #:line-width
  299. This is the target length used when deciding where to wrap lines.
  300. Default is 80.
  301. @item #:expand-tabs?
  302. Boolean describing whether tabs in the input should be expanded. Default
  303. is #t.
  304. @item #:tab-width
  305. If tabs are expanded, this will be the number of spaces to which they
  306. expand. Default is 8.
  307. @item #:collapse-whitespace?
  308. Boolean describing whether the whitespace inside the existing text
  309. should be removed or not. Default is #t.
  310. If text is already well-formatted, and is just being wrapped to fit in a
  311. different width, then set this to @samp{#f}. This way, many common text
  312. conventions (such as two spaces between sentences) can be preserved if
  313. in the original text. If the input text spacing cannot be trusted, then
  314. leave this setting at the default, and all repeated whitespace will be
  315. collapsed down to a single space.
  316. @item #:initial-indent
  317. Defines a string that will be put in front of the first line of wrapped
  318. text. Default is the empty string, ``''.
  319. @item #:subsequent-indent
  320. Defines a string that will be put in front of all lines of wrapped text,
  321. except the first one. Default is the empty string, ``''.
  322. @item #:break-long-words?
  323. If a single word is too big to fit on a line, this setting tells the
  324. wrapper what to do. Defaults to #t, which will break up long words. When
  325. set to #f, the line will be allowed, even though it is longer than the
  326. defined @code{#:line-width}.
  327. @end table
  328. The return value is a procedure of one argument, the input string, which
  329. returns a list of strings, where each element of the list is one line.
  330. @end defun
  331. @anchor{texinfo string-utils fill-string}@defun fill-string str . kwargs
  332. Wraps the text given in string @var{str} according to the parameters
  333. provided in @var{kwargs}, or the default setting if they are not given.
  334. Returns a single string with the wrapped text. Valid keyword arguments
  335. are discussed in @code{make-text-wrapper}.
  336. @end defun
  337. @anchor{texinfo string-utils string->wrapped-lines}@defun string->wrapped-lines str . kwargs
  338. @code{string->wrapped-lines str keywds ...}. Wraps the text given in
  339. string @var{str} according to the parameters provided in @var{keywds},
  340. or the default setting if they are not given. Returns a list of strings
  341. representing the formatted lines. Valid keyword arguments are discussed
  342. in @code{make-text-wrapper}.
  343. @end defun
  344. @node texinfo plain-text
  345. @subsection (texinfo plain-text)
  346. @subsubsection Overview
  347. Transformation from stexi to plain-text. Strives to re-create the output
  348. from @code{info}; comes pretty damn close.
  349. @subsubsection Usage
  350. @anchor{texinfo plain-text stexi->plain-text}@defun stexi->plain-text tree
  351. Transform @var{tree} into plain text. Returns a string.
  352. @end defun
  353. @defvr {Scheme Variable} *line-width*
  354. This fluid (@pxref{Fluids and Dynamic States}) specifies the length of
  355. line for the purposes of line wrapping in the @code{stexi->plain-text}
  356. conversion.
  357. @end defvr
  358. @node texinfo serialize
  359. @subsection (texinfo serialize)
  360. @subsubsection Overview
  361. Serialization of @code{stexi} to plain texinfo.
  362. @subsubsection Usage
  363. @anchor{texinfo serialize stexi->texi}@defun stexi->texi tree
  364. Serialize the stexi @var{tree} into plain texinfo.
  365. @end defun
  366. @node texinfo reflection
  367. @subsection (texinfo reflection)
  368. @subsubsection Overview
  369. Routines to generare @code{stexi} documentation for objects and modules.
  370. Note that in this context, an @dfn{object} is just a value associated
  371. with a location. It has nothing to do with GOOPS.
  372. @subsubsection Usage
  373. @anchor{texinfo reflection module-stexi-documentation}@defun module-stexi-documentation sym-name [%docs-resolver] [#:docs-resolver]
  374. Return documentation for the module named @var{sym-name}. The
  375. documentation will be formatted as @code{stexi}
  376. (@pxref{texinfo,texinfo}).
  377. @end defun
  378. @anchor{texinfo reflection script-stexi-documentation}@defun script-stexi-documentation scriptpath
  379. Return documentation for given script. The documentation will be taken
  380. from the script's commentary, and will be returned in the @code{stexi}
  381. format (@pxref{texinfo,texinfo}).
  382. @end defun
  383. @anchor{texinfo reflection object-stexi-documentation}@defun object-stexi-documentation _ [_] [#:force]
  384. @end defun
  385. @anchor{texinfo reflection package-stexi-standard-copying}@defun package-stexi-standard-copying name version updated years copyright-holder permissions
  386. Create a standard texinfo @code{copying} section.
  387. @var{years} is a list of years (as integers) in which the modules being
  388. documented were released. All other arguments are strings.
  389. @end defun
  390. @anchor{texinfo reflection package-stexi-standard-titlepage}@defun package-stexi-standard-titlepage name version updated authors
  391. Create a standard GNU title page.
  392. @var{authors} is a list of @code{(@var{name} . @var{email})} pairs. All
  393. other arguments are strings.
  394. Here is an example of the usage of this procedure:
  395. @smallexample
  396. (package-stexi-standard-titlepage
  397. "Foolib"
  398. "3.2"
  399. "26 September 2006"
  400. '(("Alyssa P Hacker" . "alyssa@@example.com"))
  401. '(2004 2005 2006)
  402. "Free Software Foundation, Inc."
  403. "Standard GPL permissions blurb goes here")
  404. @end smallexample
  405. @end defun
  406. @anchor{texinfo reflection package-stexi-generic-menu}@defun package-stexi-generic-menu name entries
  407. Create a menu from a generic alist of entries, the car of which should
  408. be the node name, and the cdr the description. As an exception, an entry
  409. of @code{#f} will produce a separator.
  410. @end defun
  411. @anchor{texinfo reflection package-stexi-standard-menu}@defun package-stexi-standard-menu name modules module-descriptions extra-entries
  412. Create a standard top node and menu, suitable for processing by
  413. makeinfo.
  414. @end defun
  415. @anchor{texinfo reflection package-stexi-extended-menu}@defun package-stexi-extended-menu name module-pairs script-pairs extra-entries
  416. Create an "extended" menu, like the standard menu but with a section for
  417. scripts.
  418. @end defun
  419. @anchor{texinfo reflection package-stexi-standard-prologue}@defun package-stexi-standard-prologue name filename category description copying titlepage menu
  420. Create a standard prologue, suitable for later serialization to texinfo
  421. and .info creation with makeinfo.
  422. Returns a list of stexinfo forms suitable for passing to
  423. @code{package-stexi-documentation} as the prologue. @xref{texinfo
  424. reflection package-stexi-documentation}, @ref{texinfo reflection
  425. package-stexi-standard-titlepage,package-stexi-standard-titlepage},
  426. @ref{texinfo reflection
  427. package-stexi-standard-copying,package-stexi-standard-copying}, and
  428. @ref{texinfo reflection
  429. package-stexi-standard-menu,package-stexi-standard-menu}.
  430. @end defun
  431. @anchor{texinfo reflection package-stexi-documentation}@defun package-stexi-documentation modules name filename prologue epilogue [#:module-stexi-documentation-args] [#:scripts]
  432. Create stexi documentation for a @dfn{package}, where a package is a set
  433. of modules that is released together.
  434. @var{modules} is expected to be a list of module names, where a module
  435. name is a list of symbols. The stexi that is returned will be titled
  436. @var{name} and a texinfo filename of @var{filename}.
  437. @var{prologue} and @var{epilogue} are lists of stexi forms that will be
  438. spliced into the output document before and after the generated modules
  439. documentation, respectively. @xref{texinfo reflection
  440. package-stexi-standard-prologue}, to create a conventional GNU texinfo
  441. prologue.
  442. @var{module-stexi-documentation-args} is an optional argument that, if
  443. given, will be added to the argument list when
  444. @code{module-texi-documentation} is called. For example, it might be
  445. useful to define a @code{#:docs-resolver} argument.
  446. @end defun
  447. @anchor{texinfo reflection package-stexi-documentation-for-include}@defun package-stexi-documentation-for-include modules module-descriptions [#:module-stexi-documentation-args]
  448. Create stexi documentation for a @dfn{package}, where a package is a set
  449. of modules that is released together.
  450. @var{modules} is expected to be a list of module names, where a module
  451. name is a list of symbols. Returns an stexinfo fragment.
  452. Unlike @code{package-stexi-documentation}, this function simply produces
  453. a menu and the module documentations instead of producing a full texinfo
  454. document. This can be useful if you write part of your manual by hand,
  455. and just use @code{@@include} to pull in the automatically generated
  456. parts.
  457. @var{module-stexi-documentation-args} is an optional argument that, if
  458. given, will be added to the argument list when
  459. @code{module-texi-documentation} is called. For example, it might be
  460. useful to define a @code{#:docs-resolver} argument.
  461. @end defun