summaryrefslogtreecommitdiff
path: root/macros/optex/doc/optex-userdoc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-17 03:02:29 +0000
committerNorbert Preining <norbert@preining.info>2023-11-17 03:02:29 +0000
commitd91bb5cad66508ec34d77ea60c0a02c79308edef (patch)
tree69c363099e912a77d55b67d891020bcc1f407d80 /macros/optex/doc/optex-userdoc.tex
parente0db3f0709a737e7258fd40a7cbfe9a461ea0756 (diff)
CTAN sync 202311170302
Diffstat (limited to 'macros/optex/doc/optex-userdoc.tex')
-rw-r--r--macros/optex/doc/optex-userdoc.tex143
1 files changed, 135 insertions, 8 deletions
diff --git a/macros/optex/doc/optex-userdoc.tex b/macros/optex/doc/optex-userdoc.tex
index 4ae414cfbc..61157b0d31 100644
--- a/macros/optex/doc/optex-userdoc.tex
+++ b/macros/optex/doc/optex-userdoc.tex
@@ -1,4 +1,4 @@
-%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+% This is part of the OpTeX project, see http://petr.olsak.net/optex
% This file is read from optex-doc.tex
% Use: optex optex-doc (three times) to create whole documentation.
@@ -705,7 +705,8 @@ The list of items is surrounded by \^`\begitems` and \^`\enditems` commands.
The asterisk (`*`) is active within this environment and it starts one item.
The item style can be chosen by the \^`\style` parameter written after \^`\begitems`:
-\begtt
+\def\otrickd{\ulink[http://petr.olsak.net/optex/optex-tricks.html\#deflists]{OpTeX trick 0108}}
+\begtt \catcode`|=0
\style o % small bullet
\style O % big bullet (default)
\style - % hyphen char
@@ -717,6 +718,7 @@ The item style can be chosen by the \^`\style` parameter written after \^`\begit
\style A % items of type A), B), C), ...
\style x % small rectangle
\style X % big rectangle
+\style d % definition list, use *{word}, see |otrickd
\endtt
For example:
@@ -1574,7 +1576,7 @@ The default parameters are
\begtt
\circleparams={\ratio=1 \fcolor=\Yellow \lcolor=\Red \lwidth=0.5bp
- \shadow=N \ignoremargins=N \hhkern=2pt \vvkern=2pt}
+ \shadow=N \overlapmargins=N \hhkern=2pt \vvkern=2pt}
\endtt
\new
@@ -1648,8 +1650,8 @@ articles or books: \"Chapter", \"Table" and \"Figure". These phrases need to be
in used language and it depends on the previously used language selectors
`\<iso-code>lang`. \OpTeX/ declares these words only for few languages:
\new
-Czech, German, Spanish, French, Greek, Italian, Polish, Russian, Slovak and
-English, If you need to use these words in other languages or you want to
+Czech, German, Spanish, French, Greek, Italian, Polish, Russian, Slovak, Hebrew
+and English, If you need to use these words in other languages or you want to
auto-generate more words in your macros, then you can declare it by
\~`\sdef` or \^`\_langw` commands as shown in section~\ref[langphrases].
@@ -1780,7 +1782,8 @@ because there are 150 paragraphs with neutral text prepared for you.
The \^`\lipsum` macro is equivalent to \^`\lorem`. Example: \^`\lipsum[1-150]`
prints all prepared paragraphs.
-If the dot follows the argument before closing `]` (for example \^`\lipsum[3.]`)
+If the dot follows the argument before closing `]` (for example \^`\lipsum[3.]`
+or \^`\lipsum[3.1]`)
then only first sentence from given paragraph is printed.
\secc Logos
@@ -1826,6 +1829,130 @@ put it as the first command in your document:
\useOpTeX % we are using OpTeX format, no LaTeX :)
\endtt
+\secc \OpTeX/ tricks
+%%%%%%%%%%%%%%%%%%
+
+The page \ulink[https://petr.olsak.net/optex/optex-tricks.html]{\OpTeX/ tricks}
+shows many other features of \OpTeX/. They are of different nature and they
+are typically implemented by short chunks of macro code presented at the
+page.
+
+Selected macros defiend as an \OpTeX/ trick can be used directly from your
+document without copying the code chunks into your macros.
+It is because these macros are \"registered" in \OpTeX/ (by \^`\_regtrick`
+internaly) and if you use such a macro then \OpTeX/ automatically loads the
+appropriate code chunk from an external file. These macros are listed here. More
+information about them are accesible via the external links.
+
+{\typosize[9/11]
+\def\oturl{https://petr.olsak.net/optex/optex-tricks.html}
+\def\tpg[#1]{\edef\tpgurl{\oturl\##1}}
+\def\t#1{\ea\tA\ea{\string#1}\edef\tmp{\csstring#1}\iindex{\tmp}\dest[cs:\tmp]}
+\def\tA#1{\ea\ulink\ea[\tpgurl]{#1}}
+
+\medskip
+\tpg[algol]\t\algol\ enables to create pseudocode listings.
+
+\tpg[beglua]\t\beglua, \t\begLUA, \t\logginglua\ writing LUA codes as LUA codes.
+
+\tpg[cancel]\t\cancel\ prints a given text and the line/cross line over the text.
+
+\tpg[begfile]\t\createfile, \t\begfile, \t\endfile\
+writes a code from the document to the given file.
+
+\tpg[colortab]\t\colortab\
+colored cells in the table.
+
+\tpg[correctvsize]\t\correctvsize\
+sets `\vsize` to fit lines exactly to pages.
+
+\tpg[booktabs]\t\crtop, \t\crmid, \t\crbot\
+specific design of tables: only horozontal rules with different thickness.
+
+\tpg[colorlin]\t\crx\
+alternating colored lines in tables.
+
+\tpg[directoutput]\t\directoutput\
+puts boxes to standalone pages adatped to the box dimesions.
+
+\tpg[easylist]\t\easylist\
+the depth of list is given by the number of `*`.
+
+\tpg[fullcite]\t\fcread, \t\fullcite\
+citations by full bibliographic records.
+
+\tpg[greyblock]\t\framedblocks\
+redefines \^`\begblock`, \^`\endblock` to create blocks in frames splittable to pages.
+
+\tpg[ignoreinspic]\t\ignoreinspic\
+the \^`\inspic` commands stop loading images, they are replaced by gray frames.
+
+\tpg[import]\t\import\
+allows to have subsets of document input files in separate directories.
+
+\tpg[ispageodd]\t\ispageodd\
+tests, if the current point is at odd page regardless of asynchronous processing.
+
+\tpg[perpage]\t\incrpp. \t\thepp, \t\thepplast, \t\truepage\
+does per-page counting of objects.
+
+\tpg[keystrokes]\t\keystoke\
+prints given text in a keystroke-like frame.
+
+\tpg[longtable]\t\longtable\
+alows to break a table to more pages and repeates header.
+
+\tpg[lot]\t\makeLOF, \t\makeLOT, \t\captionF, \t\captionT\
+create list of tables and list of figures similar to \^`\maketoc`.
+
+\tpg[linnum]\t\pstart, \t\pend\
+dispalys line numbers of the marked text in the margin.
+
+\tpg[shadedframe]\t\shadedframe\
+colored rectangular frames with simple shadows.
+
+\tpg[roundframe]\t\roundframe\
+colored frames with rounded corners and many options.
+
+\tpg[scaleto]\t\scaleto, \t\scaletof\
+text font size changed to the desired width.
+
+\tpg[runsystem]\t\runsystem\
+runs the given external system command.
+
+\tpg[seccc]\t\seccc, \t\iniseccc\
+implements new level of subsubsections.
+
+\tpg[dayw]\t\sethours, \t\setminutes, \t\setseconds, \t\setweekday\
+printing time, date, and day of week.
+
+\tpg[multilist]\ea\ulink\ea[\oturl\#multilist]{\string\style\space m}, \t\keepstyle\
+creates lists with items numbered like subsections.
+
+\tpg[tabs]\t\settabs, \t\tabs\
+macros emulate tabulators of old typewriters.
+
+\tpg[pglists]\t\showpglists\
+shows good organized list of nodes of given pages to the log file.
+
+\tpg[tnodes]\t\tabnodes\
+positions of table items are nodes, they can be used for drawing.
+
+\tpg[tnote]\t\tnote\
+creates notes for table data printed just after the table.
+
+\tpg[ttlineref]\t\ttlineref\
+verbatim lines referenced in text.
+
+\tpg[tablevcent]\t\vcent, \t\vbot\
+prints paragraphs in tables verticaly centered or placed at bottom.
+
+\tpg[twoblocks]\t\twoblocks\
+allows printing bilingual texts in two columns veritically aligned.
+
+
+}
+
\sec Summary
%%%%%%%%%%%%
@@ -1919,8 +2046,8 @@ documentation.
\^`\afterfi` `{<text>}<ignored>\fi` expands to `\fi<text>`.\nl
\^`\basefilename` \^`\currfile` returns the name of the file currently read.\nl
\^`\bp`` {<dimen expression>}` expands \TeX/ dimension to decimal number in `bp` without unit.\nl
-\^`\casesof` `<token> <list of cases>` expands to a given case by meaning of the `<token>`.
- See also \^`\xcasesof`.\nl
+\^`\casesof` `<token> <list of cases>` expands to a given case by the given `<token>`.
+ See also \^`\qcasesof`, \^`\xcasesof`.\nl
\~`\_codedecl`` <sequence> {<info>}` is used at beginning of macro files.\nl
\~`\colordef`` \macro {<mix of colors>}` declares `\macro` as color switch.\nl
\^`\cs` `{<string>}` expands `\<string>`.\nl