| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
\fontfam[LMfonts] % Default font family: Latin Modern |
| 4 |
|
| 5 |
\margins/1 a5 (1,1,1,1.4)cm % A5 paper + 1cm margins |
| 6 |
\typosize[9/10.5] % 9pt font / 10.5pt baselineskip |
| 7 |
\parindent=10pt % typesetting parameters |
| 8 |
\hyperlinks \Blue\Blue % active hyperlinks |
| 9 |
\verbchar` % in-text verbatim by `...` |
| 10 |
\everyintt={\Red} % in-text verbatim Red |
| 11 |
\enquotes % use \"text" for English quotation |
| 12 |
|
| 13 |
\tit Demonstration |
| 14 |
|
| 15 |
\nonum\notoc\sec Contents |
| 16 |
|
| 17 |
\maketoc % Table of Contents is auto-generated here |
| 18 |
|
| 19 |
\sec Lists |
| 20 |
|
| 21 |
The lists have to be surrounded by `\begitems` |
| 22 |
and `\enditems` sequences. |
| 23 |
|
| 24 |
\begitems |
| 25 |
* First item. |
| 26 |
* Second item. |
| 27 |
\begitems \style i |
| 28 |
* Nested item list, |
| 29 |
* numbered by roman numerals. |
| 30 |
\enditems |
| 31 |
* Last item. |
| 32 |
\enditems |
| 33 |
|
| 34 |
\secc Title of\nl Subsection |
| 35 |
|
| 36 |
The subsection text\dots |
| 37 |
|
| 38 |
\sec References |
| 39 |
|
| 40 |
There is a numbered equation. |
| 41 |
The number is auto-generated by `\eqmark` sequence. |
| 42 |
$$\label[my-eq] |
| 43 |
a^2 + b^2 = c^2 \eqmark |
| 44 |
$$ |
| 45 |
We can refer to Equation~\ref[my-eq] |
| 46 |
on page~\pgref[my-eq]. |
| 47 |
We can refer to Table~\ref[my-tab] in |
| 48 |
Section~\ref[tab-sec] too. And Figure~\ref[my-pic] |
| 49 |
is on page~\pgref[my-pic]. |
| 50 |
|
| 51 |
\sec Hyperlinks |
| 52 |
|
| 53 |
You can refer to \url{http://petr.olsak.net} using `\url`. |
| 54 |
Or use `\ulink` if the raw URL needs to be hidden: |
| 55 |
\ulink[http://petr.olsak.net/optex]{\OpTeX/ page}. |
| 56 |
The parameter text is colorized and it becomes |
| 57 |
an active link if the `\hyperlinks` sequence |
| 58 |
is used at the beginning of the document. |
| 59 |
Internal links are activated too. |
| 60 |
|
| 61 |
\sec[tab-sec] Tables |
| 62 |
|
| 63 |
The `\table` sequence can be used |
| 64 |
instead of \"low level" `\halign`. |
| 65 |
The following table is framed by the `\frame` sequence |
| 66 |
to get a double frame. |
| 67 |
|
| 68 |
\bigskip |
| 69 |
\caption/t [my-tab] Testing table. |
| 70 |
\cskip |
| 71 |
\centerline{% |
| 72 |
\frame{\table{|r|c|l|}{\crl |
| 73 |
\bf Title A & \bf Title B & \bf Title C \crll |
| 74 |
first & second & third \cr |
| 75 |
next & text & last \crl }}} |
| 76 |
|
| 77 |
\sec Images |
| 78 |
|
| 79 |
The images (PDF, JPG, PNG, TIFF) can be inserted |
| 80 |
by `\inspic` sequence. The `\caption` |
| 81 |
can be added if you need to refer to a figure. |
| 82 |
|
| 83 |
\label[my-pic] |
| 84 |
\centerline {\picwidth=2.7cm \inspic{op-ring.png}} |
| 85 |
\cskip |
| 86 |
\caption/f The nonempty ideal of a simple ring -- |
| 87 |
the ring itself. |
| 88 |
|
| 89 |
\sec Verbatim |
| 90 |
|
| 91 |
In-text verbatim is surrounded by the character declared |
| 92 |
by `\verbchar` sequence. The listing can be surrounded |
| 93 |
by `\begtt` and `\endtt` sequences |
| 94 |
\begtt |
| 95 |
This is verbatim. |
| 96 |
All characters are printed $$, \, # etc. |
| 97 |
\endtt |
| 98 |
or it can be included by `\verbinput` from an external file. |
| 99 |
|
| 100 |
\verbinput (98-100) op-demo.tex |
| 101 |
|
| 102 |
\sec Math |
| 103 |
|
| 104 |
The Math alphabets |
| 105 |
`\mit`, `\cal`, `\script`, `\frak`, `\bbchar`, `\bi` |
| 106 |
are provided. For example: |
| 107 |
$$ |
| 108 |
{\bi A} = \pmatrix {\cal C & \script C \cr |
| 109 |
\frak M & \bbchar R }. |
| 110 |
$$ |
| 111 |
Hundreds of AMS symbols are available: |
| 112 |
$\sphericalangle, \boxplus, \Cup, \Cap, \ldots$ |
| 113 |
|
| 114 |
\sec Others |
| 115 |
|
| 116 |
The `\fontfam` command selects a desired family of fonts. |
| 117 |
The `\typosize` or `\typoscale` sequences set the size |
| 118 |
and baselineskip of used fonts (including math fonts). |
| 119 |
The `\fnote` generates a footnote\fnote{Like this} and |
| 120 |
`\mnote` generates a margin note. |
| 121 |
The `\margins` sets margins and paper dimensions. |
| 122 |
The `\cite` sequence can be used for bibliographic citations. |
| 123 |
The `\bib` sequence creates one bibliography record. Or |
| 124 |
you can use `\usebib` for direct access to the {\tt.bib} files. |
| 125 |
The list of features does not end here\dots |
| 126 |
|
| 127 |
\bye |