summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/maketoc.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base/maketoc.opm')
-rw-r--r--macros/luatex/optex/base/maketoc.opm32
1 files changed, 16 insertions, 16 deletions
diff --git a/macros/luatex/optex/base/maketoc.opm b/macros/luatex/optex/base/maketoc.opm
index 46a2f8d50f..84e699d67d 100644
--- a/macros/luatex/optex/base/maketoc.opm
+++ b/macros/luatex/optex/base/maketoc.opm
@@ -1,4 +1,4 @@
-% This is part of OpTeX project, see http://petr.olsak.net/optex
+% This is part of the OpTeX project, see http://petr.olsak.net/optex
\_codedecl \maketoc {Macros for maketoc <2020-03-12>} % preloaded in format
@@ -12,7 +12,7 @@
* `<type>`: the type of the level, i.e. chap, sec, secc
* `<number>`: the number of the chapter/section/subsection in the format 1.2.3
* `<title>`: the title text
- * `<gpageno>`: the page number numbered from 1 independently of pagination
+ * `<gpageno>`: the page number numbered from 1 independently of pagination
* `<pageno>`: the page number used in the pagination
\enditems
The last two parameters are restored from previous
@@ -22,7 +22,7 @@
because the <title> can include something like \code{`\{`}.
\_cod ------------------------------------
-\_def\_toclist{}
+\_def\_toclist{}
\_newifi \_ifischap \_ischapfalse
\_def\_Xtoc#1#2#3{\_ifnum#1=0 \_ischaptrue\_fi
@@ -33,23 +33,23 @@
\`\_tocline``{<level>}{<type>}{<number>}{<title>}{<gpageno>}{<pageno>}` prints
the record to the table of contents. It opens group, reduces `\_leftskip`,
`\_rightskip`, runs the \^`\everytocline` (user can customise the design of TOC
- here) and runs `\_tocl:<level> {<number>}{<title>}{<pageno>}` macro.
+ here) and runs `\_tocl:<level> {<number>}{<title>}{<pageno>}` macro.
This macro starts with vertical mode,
inserts one record with given `<level>` and it should end by \^`\_tocpar`
- which returns to hrizontal mode. The `\_tocpar`
+ which returns to horizontal mode. The `\_tocpar`
appends `\_nobreak \_hskip-2\_iindent\_null \_par`. This causes
that the last line of the record is shifted outside the margin given by
- `\_rightskip`. A typical record (with long `<title>`) looks like:
- \begtt
+ `\_rightskip`. A typical record (with long `<title>`) looks like this:
+ \begtt \catcode`\<=13
| |
\llap{<number>} text text text text text
text text text text text
text text .................... <pageno>
\endtt
Margins given by `\leftskip` and `\rightskip` are denoted by `|` in the
- examle above.
+ examle above.
\nl
- \`\tocrefnum` is global counter of all TOC records (used by hyperlinks).
+ \`\tocrefnum` is the global counter of all TOC records (used by hyperlinks).
\_cod ------------------------------------
\_newcount \_tocrefnum
@@ -60,7 +60,7 @@
\_ifischap \_advance\_leftskip by \_iindent \_fi
\_def\_pgn{\_ilink[pg:#5]}%
\_the\_everytocline
- \_ifcsname _tocl:#1\_endcsname
+ \_ifcsname _tocl:#1\_endcsname
\_cs{_tocl:#1}{#3}{\_scantextokens{#4}}{#6}\_par
\_fi
\_egroup
@@ -97,15 +97,15 @@
\_doc -----------------------------------
\`\maketoc` prints warning if TOC data is empty, else it creates TOC by
- running \^`\_toclist`
+ running \^`\_toclist`
\_cod ----------------------------------
\_def\_maketoc{\_par \_ifx\_toclist\_empty
\_opwarning{\_noexpand\maketoc -- data unavailable, TeX me again}\_openref
\_incr\_unresolvedrefs
- \_else \_begingroup
- \_tocrefnum=0 \_penalty11333
- \_the\_regtoc \_toclist
+ \_else \_begingroup
+ \_tocrefnum=0 \_penalty11333
+ \_the\_regtoc \_toclist
\_endgroup \_fi
}
@@ -115,14 +115,14 @@
\^`\pdfunidef`.
\_cod \_fin -----------------------------
-\_newtoks \_regtoc \_newtoks \_regmark \_newtoks \_regoul
+\_newtoks \_regtoc \_newtoks \_regmark \_newtoks \_regoul
\_def\_regmacro #1#2#3{%
\_toksapp\_regtoc{#1}\_toksapp\_regmark{#2}\_toksapp\_regoul{#3}%
}
\_public \maketoc \regmacro ;
-\_endcode
+\_endcode
2020-04-23 \_tocpar introduced (incompatible change)
2020-04-22 \_pg -> \_pgn (incompatible change)