summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/optex/optex.ini
blob: 280dd347ca094c4590e2d8fe692a338d32eabd56 (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
%% 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.03 Feb 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 \_codedecl / \_endcode pair:

\let\_endcode =\endinput
\def \_codedecl #1#2{%
   \ifx #1\undefined \message{#2^^J}%
   \else \expandafter \endinput \fi
}

% 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 op-macros.opm       % OpTeX useful macros        
\input plain-macros.opm    % plainTeX macros
\input fonts-preload.opm   % preloaded Latin Modern fonts
\input fonts-resize.opm    % font resizing (low-level macros)
\input fonts-select.opm    % font selection system
\input math-preload.opm    % math fams CM + AMS preloaded
\input math-macros.opm     % basic macros for math plus mathchardefs
\input math-unicode.opm    % macros for loading UnicodeMath fonts
\input fonts-opmac.opm     % font managing macros from OPmac
\input outlines.opm        % PDF outlines
\input pdfuni-string.opm   % PDFunicode strings for outlines
\input output.opm          % output routine
\input margins.opm         % macros for margins setting
\input verbatim.opm        % verbatim
\input logos.opm           % standard logos
\input uni-lcuc.opm        % Setting lccodes and uccodes for Unicode characters
\input hyphen-lan.opm      % initialization of hyphenation patterns
\input opmac-rest.opm      % TODO: needs to be re-implement 
\input csplain-params.opm  % compatibility with CSplain

\_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
- add unicode math support (from uni-math.tex from csplain)
- 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.