diff options
Diffstat (limited to 'Master/texmf-dist/doc/man/man1/edtx2dtx.1')
-rw-r--r-- | Master/texmf-dist/doc/man/man1/edtx2dtx.1 | 114 |
1 files changed, 78 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/man/man1/edtx2dtx.1 b/Master/texmf-dist/doc/man/man1/edtx2dtx.1 index 34c0fe7f82b..c0fa01373ed 100644 --- a/Master/texmf-dist/doc/man/man1/edtx2dtx.1 +++ b/Master/texmf-dist/doc/man/man1/edtx2dtx.1 @@ -1,54 +1,96 @@ -.\" Automatically generated by Pandoc 3.0.1 +.\" Automatically generated by Pandoc 3.1.11.1 .\" -.\" Define V font for inline verbatim, using C font in formats -.\" that render this, and otherwise B font. -.ie "\f[CB]x\f[]"x" \{\ -. ftr V B -. ftr VI BI -. ftr VB B -. ftr VBI BI -.\} -.el \{\ -. ftr V CR -. ftr VI CI -. ftr VB CB -. ftr VBI CBI -.\} -.TH "edtx2dtx" "1" "October 10, 2023" "edtx2dtx 0.1.0" "User Manual" -.nh +.TH "edtx2dtx" "1" "November 23, 2024" "edtx2dtx 0.2.0" "User Manual" .SH NAME -.PP -edtx2dtx - Convert .edtx into .dtx +edtx2dtx \- Convert .edtx into .dtx .SH SYNOPSIS -.PP \f[B]edtx2dtx\f[R] \f[I]filename.edtx\f[R] > \f[I]filename.dtx\f[R] .SH DESCRIPTION This utility wraps code chunks by a (commented and properly indented) -.PP +\f[CR]\[rs]begin{macrocode}\f[R] and \f[CR]\[rs]end{macrocode}\f[R] pair. A code chunk is any sequence of lines not introduced by a single -(possibly indented) comment character (%); i.e.\ both non-commented -lines and lines introduced by multiple comment characters count as code, -and documentation lines may be indented. -The part(s) of the file which should undergo conversion should be marked -by a +(possibly indented) comment character (\f[CR]%\f[R]); i.e.\ both +non\-commented lines and lines introduced by multiple comment characters +count as code, and documentation lines may be indented. .PP -pair (unlike in a .dtx, these lines need not immediately precede and -follow the code, respectively). -This convention allows for the driver to remain as is, and also makes it -easy to paste a .dtx file into an .edtx, as using this utility on a .dtx -does not change the file. +The part of the file which should be processed should be marked by a +\f[CR]\[rs]begin{macrocode}\f[R] and \f[CR]\[rs]end{macrocode}\f[R] +pair. +In other words, everything preceding \f[CR]\[rs]begin{macrocode}\f[R] is +considered a header and not changed, and everything following +\f[CR]\[rs]end{macrocode}\f[R] is considered a trailer and not changed. +In fact, any number of \f[CR]\[rs]begin{macrocode}\f[R] \[em] +\f[CR]\[rs]end{macrocode}\f[R] pairs is allowed. +(The system allows for the driver to remain as is, and also makes it +easy to paste a \f[CR].dtx\f[R] file into an \f[CR].edtx\f[R], as using +this utility on a \f[CR].dtx\f[R] does not change the file.) .PP The utility furthermore replaces the first occurrence of -\[lq].edtx\[rq], followed by an optional parenthesized note, with -\[lq].dtx\[rq], plus the note on how the file was generated. +\f[CR]<filename>.edtx\f[R] in the header, followed by an optional +parenthesized note, with \f[CR]<filename>.dtx\f[R], plus the note on how +the file was generated. .SH OPTIONS .TP -\f[B]-h, --help\f[R] +\f[B]\-c, \-\-comment\f[R] +The input comment character; the default is \f[CR]%\f[R]. +(Any input comment characters in the header and the trailer will be +replaced by the output comment character, which is always \f[CR]%\f[R].) +.PP +\f[B]\-b, \-\-begin\-macrocode\f[R] \f[I]regex\f[R] +.PD 0 +.P +.PD +.TP +\f[B]\-e, \-\-end\-macrocode\f[R] \f[I]regex\f[R] +Use these options to change the default \f[I]input\f[R] +\f[CR]\[rs]begin{macrocode}\f[R] and \f[CR]\[rs]end{macrocode}\f[R] +markers. +(The \f[I]output\f[R] markers are always +\f[CR]\[rs]begin{macrocode}\f[R] and \f[CR]\[rs]end{macrocode}\f[R].) +The markers should be given as regular expressions matching the entire +line. +The input markers are not kept in the file, i.e.\ they are replaced by +the output markers. +.PP +\f[B]\-B, \-\-Begin\-macrocode\f[R] \f[I]regex\f[R] +.PD 0 +.P +.PD +.TP +\f[B]\-E, \-\-End\-macrocode\f[R] \f[I]regex\f[R] +As \f[CR]\-b\f[R] and \f[CR]\-e\f[R], but the input markers are kept in +the output. +.TP +\f[B]\-s, \-\-strip\-empty\f[R] +If this option is given, empty lines are not included in the output. +.TP +\f[B]\-h, \-\-help\f[R] Show help and exit. .TP -\f[B]-V, --version\f[R] +\f[B]\-V, \-\-version\f[R] Show the version number and exit. -.SH SEE ALSO +.SH EXAMPLES +If \f[CR]input.edtx\f[R] is just like a \f[CR]dtx\f[R] file, just +without \f[CR]\[rs]begin{macrocode}\f[R] and +\f[CR]\[rs]end{macrocode}\f[R] around every chunk of code: +.IP +.EX +edtx2dtx input.edtx > output.dtx +.EE .PP +Memoize uses the invocation below to produce a \f[CR].dtx\f[R] from +documented Python code of \f[CR]memoize\-extract.py\f[R]. +The value of \f[CR]\-c\f[R] adapts the \f[CR]edtx2dtx\f[R] to Python +comments. +\f[CR]\-B\f[R] marks everything preceding the version number statement +as a header, and keeps the version number statement in the output. +Similarly, \f[CR]\-E\f[R] says that the processing should stop when +encountering Emacs\[cq] local variables (which are kept, unchanged, in +the output). +.IP +.EX +edtx2dtx \-s \-c \[aq]#\[aq] \-B \[aq]\[ha]__version__\[aq] \-E \[aq]\[ha]# Local Variables:\[aq] $< \[rs] +.EE +.SH SEE ALSO easydoctex.el |