summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/optex.ini
blob: e4a09eec0af4106d8c5913521f991664ea7f8cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%% This is part of OpTeX project, see http://petr.olsak.net/optex

%% OpTeX ini file
%% Petr Olsak <started from: Jan. 2020>

% Catcodes:

\catcode `\{=1 % left brace is begin-group character
\catcode `\}=2 % right brace is end-group character
\catcode `\$=3 % dollar sign is math shift
\catcode `\&=4 % ampersand is alignment tab
\catcode `\#=6 % hash mark is macro parameter character
\catcode `\^=7 % 
\catcode `\^^K=7 % circumflex and uparrow are for superscripts
\catcode `\^^A=8 % downarrow is for subscripts
\catcode `\^^I=10 % ascii tab is a blank space
\catcode `\_=11 % underline can be used in control sequences
\catcode `\~=13 % tilde is active
\catcode 127=12 % normal character

% OpTeX version

\def\optexversion{Alpha 0.07 Mar 2020}

% Engine testing:

\newlinechar=`\^^J
\ifx\directlua\undefined 
   \message{This format is based only on LuaTeX, use luatex -ini optex.ini^^J} 
   \endinput \fi

\ifx\bgroup\undefined \else
   \message{This file can be used only for format initialisation, use luatex -ini^^J}
   \endinput \fi

% Basic .opm syntax:

\let\_endcode =\endinput
\def \_codedecl #1#2{\message{#2^^J}}%  information about .opm file
\long\def\_doc#1\_cod#2 {} % skip documentation
\let\_fin=\relax

% Initialization:

\message{OpTeX (Olsak's Plain TeX) initialization <\optexversion>^^J}

\input prefixed.opm        % prefixed primitives and code syntax
\input luatex-ini.opm      % luaTeX initialization
\input basics-macros.opm   % basic macros
\input alloc.opm           % allocators for registers
\input if-macros.opm       % special \if-macros, \is-macros and loops
\input parameters.opm      % parameters setting
\input more-macros.opm     % OpTeX useful macros  (todo: doc)
\input plain-macros.opm    % plainTeX macros   (todo:doc)
\input fonts-preload.opm   % preloaded Latin Modern fonts  
\input fonts-resize.opm    % font resizing (low-level macros) (todo: texdoc)
\input fonts-select.opm    % font selection system  (todo: texdoc)
\input math-preload.opm    % math fams CM + AMS preloaded  (todo: doc)
\input math-macros.opm     % basic macros for math plus mathchardefs  (todo: x)
\input math-unicode.opm    % macros for loading UnicodeMath fonts  (todo: x)
\input fonts-opmac.opm     % font managing macros from OPmac  (todo: doc)
\input maketoc.opm         % maketoc
\input outlines.opm        % PDF outlines  (todo: x)
\input pdfuni-string.opm   % PDFunicode strings for outlines  (todo: x)  
\input output.opm          % output routine
\input margins.opm         % macros for margins setting  (todo: texdoc)
\input colors.opm          % colors
\input ref-file.opm        % ref file
\input references.opm      % references
\input hyperlinks.opm      % hyperlinks
\input sections.opm        % titles, chapters, sections
\input lists.opm           % lists, \begitems, \enditems
\input verbatim.opm        % verbatim
\input graphics.opm        % graphics
\input table.opm           % table macro
\input multicolumns.opm    % more columns by \begmulti ...\endmulti
\input cite-bib.opm        % Bibliography, \cite
\input makeindex.opm       % Make index and sorting
\input fnotes.opm          % \fnotes, \mnotes
\input styles.opm          % styles \report, \letter
\input logos.opm           % standard logos
\input uni-lcuc.opm        % Setting lccodes and uccodes for Unicode characters
\input hyphen-lan.opm      % initialization of hyphenation patterns  (todo: doc)
\input languages.opm       % languages
\input others.opm          % miscenaleous

\_everyjob = {%
   \_message{This is OpTeX (Olsak's Plain TeX), version <\optexversion>^^J}%
   \_mathsbon % replaces \int_a^b to \int _a^b
   \_inputref % inputs \jobname.ref if exists
}
\let\loadmathfonts=\relax  % TODO: unicode-math 

\_dump

\_endcode % ------------------------------

TODO: 
- re-implement macros from opmac-rest.opm
- re-implement usebib, bib-style.opm 
- add modules support (for example opmac-bib)
- write more and better documentation
- ...

DOC:
- optex-doc.tex optex-doc.pdf
- about Font selection system: .......  files: fonts-select.opm, fonts-opmac.opm,
                                        fonts-resize.opm, f-heros.opm, f-lmfonts.opm
                                        fams-ini.opm
- about user/internal name spaces ....  files: prefixed.opm, math-macros.opm
- additional doc is in more files...

NOTES FOR TESTERS:
- We don't want to keep absolutely backward compatibility. For example obscurities like
  \z@, \p@, \f@@t are not supported.
- The page origin is at left upper corner of the paper (no at 1in, 1in coordinates).
- The default papersize is A4 with 2cm margins (no letter with 1in margins]. 
  Use \margins macro to change these parameters.
- Only few 8bit fonts are preloaded in format. Use \fontfam[LMfonts] (or select another 
  fonts family by \fontfam[?]) at beginning of document. Unicode fonts will be loaded.
- The accents macros \v, \' are undefined, Use native characters š,č,é, etc. 
  If you expicitly needs this old feature, use \oldaccents macro.
- The font switchers like \_tenrm, \_tenbf have only internal names, i.e 
  \tenrm, \tenbf are undefined.