summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/parameters.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/parameters.opm')
-rw-r--r--macros/luatex/optex/parameters.opm283
1 files changed, 176 insertions, 107 deletions
diff --git a/macros/luatex/optex/parameters.opm b/macros/luatex/optex/parameters.opm
index 2a85a08159..bfaec21b4a 100644
--- a/macros/luatex/optex/parameters.opm
+++ b/macros/luatex/optex/parameters.opm
@@ -3,6 +3,7 @@
\_codedecl \normalbaselineskip {Parameter settings <2020-03-17>} % preloaded in format
\_doc -----------------------------
+ \secc Primitive registers
The primitive registers with the same default value as in plain \TeX/ follow:
\_cod -----------------------------
@@ -48,13 +49,15 @@
\_doc -----------------------------
Note that `\topskip` and `\splittopskip` are changed when first
- `\typosize` sets the main values (default font size and `\baselineskip`).
+ `\typosize` sets the main values (default font size and default
+ `\baselineskip`).
\_cod -----------------------------
\_topskip=10pt % top edge of page-box to first baseline distance
\_splittopskip=10pt
\_doc -----------------------------
+ \secc Plain \TeX/ registers
Declared registers used in plain \TeX/
\_cod -----------------------------
@@ -71,24 +74,30 @@
\_def\_normalbaselines{\_lineskip=\_normallineskip
\_baselineskip=\_normalbaselineskip \_lineskiplimit=\_normallineskiplimit}
+
\_def\_frenchspacing{\_sfcode`\.=1000 \sfcode`\?=1000 \sfcode`\!=1000
\sfcode`\:=1000 \sfcode`\;=1000 \sfcode`\,=1000 }
\_def\_nonfrenchspacing{\_sfcode`\.=3000 \sfcode`\?=3000 \sfcode`\!=3000
\sfcode`\:=2000 \sfcode`\;=1500 \sfcode`\,=1250 }
-\_public
- \normalbaselines \frenchspacing \nonfrenchspacing
+
+\_public \normalbaselines \frenchspacing \nonfrenchspacing
\smallskipamount \medskipamount \bigskipamount
\normalbaselineskip \normallineskip \normallineskiplimit
\jot \interdisplaylinepenalty \interfootnotelinepenalty ;
\_doc -----------------------------
- Default `\baseline` setting is for 10pt fonts (like in plain \TeX/).
- But `\typosize` and `\typoscale` re-declares it.
- The `\nonfrenchspacing` is not set by default because
- author of \OpTeX/ is living in Europe.
+ \secc Different settings than in plain \TeX/
+
+ Default \"baseline setting" is for 10\,pt fonts (like in plain \TeX/).
+ But `\typosize` and `\typoscale` macros re-declare it if another font size is used.
+
+ The \`\nonfrenchspacing` is not set by default because
+ the author of \OpTeX/ is living in the Europe.
+ If you set `\enlang` hyphenation patterns then `\nonfrenchspacing`
+ is set.
\_cod -----------------------------
-\_normalbaselines % baseline setting,
+\_normalbaselines % baseline setting, 10 pt font size
\_doc -----------------------------
Different values than in plain \TeX/ have following primitive registers.
@@ -135,12 +144,12 @@
\_vsize=8.9in
\_pagewidth=8.5 true in
\_pageheight=11 true in
+ \_nonfrenchspacing
}
\_public \plaintexsetting ;
\_doc -----------------------------
- The second part of this section includes parameters declared and used
- in \OpTeX/ macros.
+ \secc \OpTeX/ parameters
The main principle how to configure \OpTeX/ is not to use only parameters.
A designer can copy macros from \OpTeX/ and re-define them as required.
@@ -150,19 +159,19 @@
`\_printsecc` from `sections.opm` file to your macro file and re-define them.
Notice for OPmac users: there is important difference: all "string-like"
- parameters are token lists (OPmac uses macros for them). The reason of
+ parameters are token lists in \OpTeX/ (OPmac uses macros for them). The reason of
this difference: if user sets parameter by unprotected control sequence,
an \OpTeX/ macro can read {\em the same data} using protected control sequence.
- If user re-defines such unprotected control equance (because he/she does
+ If user re-defines such unprotected control sequence (because he/she does
know about it) then nothing bad happens.
- The `\picdir` tokens list can include a directory where image files
+ The \`\picdir` tokens list can include a directory where image files
(loaded by `\inspic`) are saved. Empty `\picdir` (default value) means
- that image files are in current directory (or somwhere in the \TeX/
+ that image files are in the current directory (or somewhere in the \TeX/
system where \LuaTeX/ is able to find them). If you set non-empty value to
the `\picdir`, then it must end by `/` character, for example
`\picdir={img/}` means that there exists a directory `img` in your
- current direcory and the image files are stored here.
+ current directory and the image files are stored here.
\_cod -----------------------------
\_newtoks\_picdir
@@ -170,10 +179,10 @@
\_doc -----------------------------
You can control the dimesions of included images by
- the parameters `\picwidth` (which is equivalent to `\picw`) and
- `\picheight`. By default these parameters are set to zero: the native
+ the parameters \`\picwidth` (which is equivalent to \`\picw`) and
+ \`\picheight`. By default these parameters are set to zero: the native
dimension of the image is used. If only `\picwidth` has a nonzero value,
- then this is width of the image (height is calulated automaticaly in
+ then this is the width of the image (height is calculated automatically in
order to respect the aspect of the image). If only `\picheight` has
a nonzero value then height is given, width is calculated. If both
parameters are non-zero, the height and width are given and the aspect
@@ -189,10 +198,11 @@
\_public \picwidth \picheight ;
\_doc -----------------------------
- The `\everytt` is token list used in `\begtt`...`\endtt` environment and
+ The \`\everytt` is token list used in
+ `\begtt`...`\endtt` environment and
in the verbatim group opened by `\verbinput` macro. You can include a
code which is processed inside the group after basic settings were done
- On the other hand, it is processed before scanner of verbatm text is started.
+ On the other hand, it is processed before scanner of verbatim text is started.
Your macros should influence scanner (catcode settings) or printing
process of the verbatim code or both.
@@ -201,7 +211,8 @@
`\everytt` for all verbatim environments in your document and use a code
after `\begtt` locally only for this environment.
- The `\everyintt` token list does similar work but acts in the in-line verbatim
+ The \`\everyintt` token list does similar work
+ but acts in the in-line verbatim
text processed by a pair of `\activettchar` characters or by `\code{<text>}`.
You can set `\everyintt={\Red}` for example if you want in-line verbatim
in red color.
@@ -212,42 +223,80 @@
\_public \everytt \everyintt ;
\_doc -----------------------------
- The `\ttline` is used in `\begtt`...`\endtt` environment or in the code
+ The \`\ttline` is used
+ in `\begtt`...`\endtt` environment or in the code
printed by `\verbinput`. If `\ttline` is positive or zero, then the
verbatim code have numbered lines from `\ttline+1`. The `\ttline`
register is re-set to new value after a code piece is printed, so next
- code pieces have numbered lines continuosly. If `\ttline=-1`, then
+ code pieces have numbered lines continuously. If `\ttline=-1`, then
`\begtt`...`\endtt` lines are without numbers and `\verbinput` lines
- shouws the line numbers of inputted file. If `\ttline<-1` then no line
- numbers are printed.
+ shows the line numbers of inputted file. If `\ttline`\code{<-1}
+ then no line numbers are printed.
\_cod -----------------------------
\_newcount\_ttline \_ttline=-1 % last line number in \begtt...\endtt
\_public \ttline ;
\_doc -----------------------------
- The `\ttindent` gives default indentation of verbatim lines printed by
- `\begtt`...`\endtt` or by `\verbintupt`.
-
- The `\iindent` gives default indentations used in table of contents,
+ The \`\ttindent` gives default indentation
+ of verbatim lines printed by `\begtt`...`\endtt` pair or by
+ `\verbinput`.
+ \nl
+ The \`\ttshift` gives the amount of shift of all verbatim lines to right.
+ Despite to the \^`\ttindent`, it does not shift the line numbers, only
+ the text.
+ \nl
+ The \`\iindent` gives default indentations used in table of contents,
captions, lists, bib references,
-
+ \nl
It is strongly recommended to re-set this value if you set `\parindent`
- to another value than plain \TeX/ default 20pt. A good typesetted
+ to another value than plain \TeX/ default 20pt. A well typeset
document should have the same dimension for all indentations, so
you should say `\ttindent=\parindent` and `\iindent=\parindent`.
\_cod -----------------------------
\_newdimen\_ttindent \_ttindent=\_parindent % indentation in verbatim
+\_newdimen\_ttshift
\_newdimen\_iindent \_iindent=\parindent
-\_public \ttindent \iindent ;
+\_public \ttindent \ttshift \iindent ;
+
+ \_doc -----------------------------
+ The tabelator `^^I` has its category code like space: it behaves as a
+ space in normal text. This is normal plain \TeX/ setting.
+ But in the multiline verbatim environment it
+ is active and expands to the `\hskip<dimen>` where `<dimen>`
+ is the width of \`\tabspaces` spaces.
+ Default `\tabspaces=3` means
+ that tabelator behaves like three spaces in multiline verbatim.
+ \_cod -----------------------------
+
+\_newcount \_tabspaces \_tabspaces=3
+\_public \tabspaces ;
+
+ \_doc -----------------------------
+ If \`\hicolors` is non-empty then its contents is used instead
+ `\_hicolors<name>` declared in the file `hisyntax-<name>.opm`.
+ The user can give his/her preferences about colors for
+ syntax highlighting by this tokens list.
+ Full color set must be declared here.
+ \_cod -----------------------------
+
+\_newtoks\_hicolors
+\_public \hicolors ;
\_doc -----------------------------
- The default item mark used between `\bgitems` and `\enditems` is bullet.
- The `\everyitem` token list is applied in vertical mode
- at the start of each item.
- The `\everylist` token list is applied after group is openem by
- `\begitems`.
+ The default item mark used between `\begitems` and `\enditems` is bullet.
+ The \`\defaultitem` tokens list declare this default item mark.
+ \nl
+ The \`\everyitem` tokens list is applied in vertical mode
+ at the start of each item.
+ \nl
+ The \`\everylist` tokens list is applied after group is opened by
+ \nl
+ The \`\ilevel` keeps the value of current nesting level of the items list.
+ \nl
+ The \`\listskipamount` gives vertical skip above and below the items list
+ if `\ilevel=1`.
\_cod -----------------------------
\_newtoks\_defaultitem \_defaultitem={$\_bullet$\_enspace}
@@ -258,7 +307,7 @@
\_public \defaultitem \everyitem \everylist \listskipamount \ilevel ;
\_doc -----------------------------
- The `\tit` macro includes `\vglue\titskip` above the title of the document.
+ The `\tit` macro includes `\vglue`\`\titskip` above the title of the document.
\_cod -----------------------------
\_newskip\_titskip \_titskip=40pt \_relax % \vglue above title printed by \tit
@@ -266,7 +315,7 @@
\_doc ----------------------------
The `\begmulti` `\endmulti` pair creates more columns. The parameter
- `\colsep` decares the space between columns. If $n$ columns are specidied
+ \`\colsep` declares the space between columns. If $n$ columns are specified
then we have $n-1$ `\colseps` and $n$ columns in total `\hsize`. This
gives definite result of columns width.
\_cod ----------------------------
@@ -276,19 +325,19 @@
\_doc -----------------------------
Each line in the Table of contents is printed in a group.
- The `\everytocline` tokens list is processed here before
- the internal `\_tocl:<num>` macro which starts printig the line.
+ The \`\everytocline` tokens list is processed here before
+ the internal `\_tocl:<num>` macro which starts printing the line.
\_cod -----------------------------
\_newtoks \_everytocline
\_public \everytocline ;
\_doc -----------------------------
- The `\bibtexhook` yokens list is used inside the group when `\usebib` command is
+ The \`\bibtexhook` tokens list is used inside the group when `\usebib` command is
processed after style file is loaded and before printing bib-entries.
You can re-define a behavior of style file here or you can modify the
more declaration for printing (fonts, baselineskip, etc.) or you can
- definie a specific macros used in your `.bib` file.
+ define a specific macros used in your `.bib` file.
\_cod -----------------------------
\_newtoks\_bibtexhook
@@ -298,31 +347,26 @@
\_public \everycaptiont \everycaptionf ;
\_doc -----------------------------
- The `\everyii` tokens list is used before `\noindent` for each
- index item when priting index.
+ The \`\everyii` tokens list is used before `\noindent` for each
+ Index item when printing the Index.
\_cod -----------------------------
\_newtoks\_everyii
\_public \everyii ;
\_doc -----------------------------
- The `\_everyfnote` tokens list is used in the `\footinsert` group
- in vertical mode before `\typoscale` and before
- `\textindent{\_printfnotemark}` of the footnote text.
- \_cod -----------------------------
-
-\_newtoks\_everyfnote
-\_public \everyfnote ;
-
- \_doc -----------------------------
- The `\everymnote` is used in the mnote group before `\noindent` which
+ The \`\everymnote` is used in the `\mnote` group before `\noindent` which
immediately precedes marginal note text.
- The `\mnotesize` is horizontal size of the marginal notes.
- The `\mnoteindent` is horizontal space between body-text and marginal note.
- The `\mnoteskip` is a dimen which denotes the vertical shift of mamrginal
+ \nl
+ The \`\mnotesize` is horizontal size of the marginal notes.
+ \nl
+ The \`\mnoteindent` is horizontal space between body-text and marginal note.
+ \nl
+ The \`\mnoteskip` is a dimen which denotes the vertical shift of marginal
note from its normal position. Positive value means shift up, negative
- down. When marhinel note is printed the `\mnoteskip` register is set to
- zero. Use it as an exception of marginal note position if the marginal
+ down. The `\mnoteskip` register is set to zero
+ after the marginal note is printed.
+ Use it as an exception of marginal note position if the marginal
notes overlaps or they are put at bottom of the page.
\_cod -----------------------------
@@ -333,42 +377,52 @@
\_public \everymnote \mnotesize \mnoteindent \mnoteskip ;
\_doc -----------------------------
- The `\table` parameters follows. Note that `\thistable` register should
- be used for giving an exceptino for only one `\table` which follows.
- It should change locally other parameters of `\table`.
- On the other hand `\everytab` is used after `\vbox` parameters
- (`\baselineskip` etc.) are set, it means that this can be used to re-assign
- such prameters.
+ The `\table` parameters follows. The \`\thistable` tokens list
+ register should be used for giving an exception for only one `\table`
+ which follows. It should change locally other parameters of the `\table`.
+ It is reset to empty list after the table is printed.
+ \nl
+ The \`\everytable` tokens list register is applied in every table.
+ There is another difference between these two registers.
+ The `\thistable` is used first, then strut and baselineskip settings are
+ done, then `\everytable` is applied and then the table is printed.
+ \nl
+ \`\tabstrut` configures the height and depth of lines in the table.
+ You can declare `\tabstrut={}`, then normal baselineskip is used in the
+ table. This can be used when you don't use horizontal nor vertical
+ lines in tables.
+ \nl
+ \`\tabiteml` is applied before each item,
+ \`\tabitemr` is applied after each item of the table.
+ \nl
+ \`\tablinespace` is additional vertical space between horizontal rules
+ and the lines of the table.
+ \nl
+ \`\hhkern` gives the space between horizontal lines if they are doubled and
+ \`\vvkern` gives the space between such vertical lines.
\_cod -----------------------------
\_newtoks\_everytable \_newtoks\_thistable
\_newtoks\_tabiteml \_newtoks\_tabitemr \_newtoks\_tabstrut
\_newdimen\_tablinespace \_newdimen\_vvkern \_newdimen\_hhkern
-\_everytable={} % code used after settings in \vbox before table processing
-\_thistable={} % code used when \vbox starts, is is removed after using it
-\_tabiteml={\enspace} % left material in each column
-\_tabitemr={\enspace} % right material in each column
-\_tablinespace=2pt % additional vertical space before/after horizontal rules
-\_vvkern=1pt % space between double vertical line and used in \frame
-\_hhkern=1pt % space between double horizontal line and used in \frame
+\_everytable={} % code used after settings in \vbox before table processing
+\_thistable={} % code used when \vbox starts, is is removed after using it
+\_tabstrut={\_strut}
+\_tabiteml={\_enspace} % left material in each column
+\_tabitemr={\_enspace} % right material in each column
+\_tablinespace=2pt % additional vertical space before/after horizontal rules
+\_vvkern=1pt % space between double vertical line and used in \frame
+\_hhkern=1pt % space between double horizontal line and used in \frame
\_public \everytable \thistable \tabiteml \tabitemr \tabstrut \tablinespace \vvkern \hhkern ;
- \_doc ----------------------------
- You can declare `\tabstrut={}`, then normal baselineskip is used in the
- table. We suppose that you don't use horizontal nor vertical lines in tables
- with `\tabstrut={}` because this yeilds to bad result.
- \_cod ----------------------------
-
-\_tabstrut={\strut} % strut which declares lines distance in the table
-
\_doc -----------------------------
- The output routine uses token list `\headline` and `\footline` in the
+ The output routine uses token list \`\headline` and \`\footline` in the
same sense as in plain \TeX/. If they are non-empty then `\hfil` or `\hss`
must be here because they are used inside `\hbox to\hsize`.
- Assume that page-body text can be typesetted in different sizes and
+ Assume that page-body text can be typeset in different sizes and
different fonts and we don't know in what font context the output routine
- is invoked. So, it is strogly reccomended to declare fixed variants of
+ is invoked. So, it is strongly recommended to declare fixed variants of
fonts at begining of your document. For example `\fontdef\rmfixed{\rm}`,
`\fontdef\itfixed{\it}`. Then use them in headline and footline:
\begtt
@@ -383,11 +437,13 @@
\_doc -----------------------------
The distance between the `\headline` and the top of the page-text
- is controlled by `\headlinedist`. The distance between bottom of
- page-text and `\footline` is `\footlinedist`. More precisely: baseline of
- hedadline and baseline of first line in page-text have distance
- `\headlinedist+\topskip`. baseline of the last line in page-text and
- baseline of footline have distance `\footlinedist`.
+ is controlled by the \`\headlinedist` register.
+ The distance between bottom of
+ page-text and `\footline` is \`\footlinedist`.
+ More precisely: baseline of
+ headline and baseline of first line in page-text have distance
+ `\headlinedist+\topskip`. The baseline of the last line in page-text and
+ the baseline of the footline have distance `\footlinedist`.
Default values are inspired from plain \TeX/.
\_cod -----------------------------
@@ -396,7 +452,16 @@
\_public \headlinedist \footlinedist ;
\_doc -----------------------------
- The `\nextpages` token list can include settings which will be used at
+ The \`\pgbottomskip` is inserted to the page bottom
+ in the output routine. You can set a less tolerance here than
+ `\raggedbotom` does. By default, no tolerance is given.
+ \_cod -----------------------------
+
+\_newskip \_pgbottomskip \_pgbottomskip=0pt \_relax
+\_public \pgbottomskip ;
+
+ \_doc -----------------------------
+ The \`\nextpages` tokens list can include settings which will be used at
next pages. It is processed at the end of output routine with
`\globaldefs=1` prefix. The `\nextpages` is reset to empty after
processing. Example of usage:
@@ -411,7 +476,7 @@
\_public \nextpages ;
\_doc -----------------------------
- The `\pgpackground` token list can include macros which generate a
+ The \`\pgbackground` token list can include macros which generate a
vertical list. It is used as page background. The top-left corner of such
`\vbox` is at the top-left corner of the paper. Example creates the
background of all pages yellow:
@@ -426,7 +491,7 @@
\_doc -----------------------------
The parameters used in `\inoval` and `\incircle` macros.
The default values (documented in user manual) are set in the macros.
- User can re-set thse values using tokens \ovalparams, \circleparams.
+ The user can re-set these values using tokens \`\ovalparams`, \`\circleparams`.
\_cod -----------------------------
\_newtoks \_ovalparams
@@ -452,22 +517,26 @@ controlled by {\em parameters}. The parameters are
Both groups of registers have their type: number, dimension, skip, token
list.
-The registers are represented by their names (control sequences). If an user
+The registers are represented by their names (control sequences). If the user
re-defines such control sequence then the appropriate register exists
steadily and build-in algorithms are using it without change. But user
cannot access its value in such case. \OpTeX/ declares two control sequences
-for each register: prefixed and un-prefixed. \OpTeX/ macros use only
-prefixed variants of control sequernces. Users should use unprefixed variant
+for each register: prefixed and unprefixed. \OpTeX/ macros use only
+prefixed variants of control sequences. The user should use unprefixed variant
with the same meaning and set or read values of registers using the
-unprefixed variant. If an user re-defines the unprefixed variant then
-\OpTeX/ macros still work without change.
-
-Examples mentioned here use unprefixed variants of register names but \OpTeX/
-macros use prefixed variants.
-
-There is only few parameters declared by \OpTeX/ macros. All are listed in
-this section. This is desired feature of the \OpteX/. If you want to do more
-changes wich cannot be controlled by parameters listed here then you can copy the
-appropriate \OpTeX/ macro to your macro file and you can completely re-define it.
-
-
+unprefixed variant. If the user re-defines the unprefixed control sequence of
+a register then \OpTeX/ macros still work without change.
+
+%There is only few parameters declared by \OpTeX/ macros. All of them
+%are listed in this section. This is desired feature of the \OpTeX/.
+%If you want to do more
+%changes wich cannot be controlled by parameters listed here then you
+%can copy the appropriate \OpTeX/ macro to your macro file and you
+%can completely re-define it. The typical examples are `\_printsomething`
+%macros which declares the design of the document.
+
+\_endinput
+
+History:
+2020-04-04 ... \tabspaces added
+2020-04-03 ... \hicolors added