summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/minim/minim-doc.sty
blob: 32c8a1e99186f587d20727beacaacf84dfd07d37 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

%% This is the style file for the manuals of the minim format and related 
%% packages.

\ifdefined \manual
    \expandafter\endinput\fi

\input minim
%\decompressedpdf
%\debugmetapost

\pdfalevel 3a
\pdfualevel 1
\overfullrule = 0pt

% 1 page layout

\pdfvariable horigin 0pt
\pdfvariable vorigin 0pt
\frenchspacing

\uselanguage{ukenglish}
\hyphenation {
    mark-tab-le-cell
    }

\parindent 0pt
\baselineskip 12pt plus 1pt
\parskip      8pt plus 4pt minus 1pt

\abovedisplayskip 3pt plus 2pt
\belowdisplayskip 4pt plus 2pt

\hsize 12cm
\vsize 56\baselineskip

\voffset = \dimexpr (\pageheight-\vsize)/2\relax
\hoffset = \dimexpr (\pagewidth-\hsize)/2\relax

% 1 fonts

\input luaotfload.sty
\font\tenrm {Latin Modern Roman:script=latn;protrusion=default;} at 10pt
\font\tenbf {Latin Modern Roman/B:script=latn;} at 10pt
\font\tenit {Latin Modern Roman/I:script=latn;} at 10pt
\font\tentt {Latin Modern Mono:script=latn;} at 10pt
\font\title {Latin Modern Roman/B:script=latn;} at 12pt
\font\Title {Latin Modern Roman/B:script=latn;} at 16pt

\font\altmath   {Tex Gyre Pagella Math:mode=base;script=math;ssty=0;} at 10pt
\font\altmaths  {Tex Gyre Pagella Math:mode=base;script=math;ssty=1;} at  7pt
\font\altmathss {Tex Gyre Pagella Math:mode=base;script=math;ssty=2;} at  5pt
\textfont         1 = \altmath
\scriptfont       1 = \altmaths
\scriptscriptfont 1 = \altmathss

\font\tenmath   {Latin Modern Math:mode=base;script=math;ssty=0;} at 10pt
\font\tenmaths  {Latin Modern Math:mode=base;script=math;ssty=1;} at  7pt
\font\tenmathss {Latin Modern Math:mode=base;script=math;ssty=2;} at  5pt
\textfont         0 = \tenmath
\scriptfont       0 = \tenmaths
\scriptscriptfont 0 = \tenmathss

\expandglyphsinfont \tenrm 25 25 5
\protrudechars=2 \adjustspacing=2
\tenrm

\mathfam{blackboard, `\mscra-`\mscrz} 1

% 1 code typesetting

\chardef\thecolourstack = \pdffeedback colorstackinit page {0 g 0 G}
\def\pushcolour#1{\pdfextension colorstack \thecolourstack push {#1}}
\def\popcolour{\pdfextension colorstack \thecolourstack pop\relax}
\def\red#1{\pushcolour{0.75 0 0 rg}{#1}\popcolour}

\def\emph#1{{\tenit #1\/}}

\newattributeclass Code
    attr Layout Placement /Block
    attr CSS-2.00 display (block)

\def\breakablespace{\penalty0~}
\catcode`\⟦=\active
\def⟦{\quitvmode\begingroup\catcode`\∥=0\relax
    \markparagraphsfalse
    \def\do##1{\catcode`##1=12}\dospecials
    \catcode`\%=\active \letcharcode`\%=\verbatimcomment
    \catcode`\ =\active \letcharcode`\ =\breakablespace
    \def\par{\ifhmode\tentt\endgraf\else\vskip\baselineskip\fi}%
    \everypar{\stopelement{Code}%
        \startelement class Code {Code}}%
    \parskip0pt\tentt \obeylines
    \nextif*{\verbatim\ignore}{\expandafter\ignore\verbatim}}
\def\verbatim#1⟧{\red{\markelement{Code}{#1}}\endgroup}
\def\verbatimcomment{\tenit\Uchar`\%}

% 1 the minim symbol

\newbox\notehead
\newmetapostinstance [jobname='logo'] \mnmMP
\runmetapost \mnmMP {
beginfig(1)
    w:=1/27; pickup pencircle scaled 1/9;
    path c; c :=
        (-3/5,-1/6 ) {down}..
        (-1/5,-1/2 ) {right}..
        ( 3/5, 1/6 ) {up}..
        ( 1/5, 1/2 ) {left}.. cycle;
    filldraw c withcolor .75 red;
    path p; p :=
        (-0.383-w,-0.323-w) ..tension 1.35.. (-0.094-w, 0.094+w) ..tension 1.5..
        ( 0.383+w, 0.323+w) ..tension 1.35.. ( 0.094+w,-0.094-w) ..tension 1.5.. cycle ;
    p := (-1,-1) -- (1,-1) -- (1,1) -- p -- (1,1) -- (-1,1) -- cycle ;
    clip currentpicture to p;
    draw (3/5, 1/6) -- (3/5, 5/2) withcolor .75 red;
    setbounds currentpicture to c;
    currentpicture := currentpicture scaled 8pt ;
endfig;}
\boxnextmpimage \mnmMP \notehead
\setbox\notehead=\hbox{\markartifact{Layout}{\box\notehead}}
\closemetapostinstance \mnmMP

% 1 document structure

\autotagplainoutput
\def\textindent#1{\noindent#1\enspace\ignorespaces}

% \startlist \item x. ... \stoplist
\def\listskip{\vskip 3pt plus 2pt\vskip-\parskip}
\def\startlist{\smallskip\startelement{L}}
\def\stoplist{\stopelement{L}\smallskip}
\def\item#1.{\listskip
    \nextpartag{LI}\hangindent2em\quitvmode
    \hbox to 2em{\hss\startelement{Lbl}#1.~~}%
    \startelement{LBody}\ignorespaces}

\sectionstructure{section, chapter}

% \chapter Title \par
\protected\def\chapter#1 \par{%
    \vfil\break
    \markchapter[Chapter \the\chapternr]%
    \outline open {#1}%
    \addtotoc{\chapter{#1}{\lastdestinationname}}%
    \nextpartag{H}\quitvmode
    \red{\Title#1\hfill\copy\notehead}\bigskip\nobreak}

% \section Title \par
\protected\def\section#1 \par{%
    \bigskip\penalty-50\relax
    \marksection[Section \the\chapternr.\the\sectionnr]%
    \outline closed {#1}%
    \addtotoc{\section{#1}{\lastdestinationname}}%
    \nextpartag{H}\quitvmode
    \red{\title#1}%
    \par\nobreak}

% table of contents
\newtoks\toc \newif\iftoc \toctrue
\def\addtotoc#1{%
    \iftoc \edef\toctmp{#1}%
    \write\auxfile\expandafter
        {\expandafter\toksapp\expandafter\toc
            \expandafter{\toctmp{\the\count0}}}\fi\toctrue}

% an auxiliary file
\newread \auxfile
\immediate\openin\auxfile = \jobname.aux
\ifeof\auxfile
    \def\next{}\else
    \def\next{\input \jobname.aux}\fi
\immediate\closein\auxfile \next
\newwrite \auxfile
\immediate\openout\auxfile = \jobname.aux

\autotagformulas

\def\mailname{minim}
\def\maketitle{%
    \setembeddedfilesmoddate {\getmetadata date}
    \begingroup
    \def\outline##1##{\ignore}
    \tocfalse \chapter \getmetadata title
        \hfill \tenrm version \getmetadata version
    \par\endgroup
    \marktableaslist
        \tagattribute List ListNumbering /None
        \halign {\strut
        \qquad##\quad&##\hfil\cr
    author&\getmetadata author\cr
    contact&{\def\tmp{@}\def\TMP{.}%
        \mailname\tmp elrenkema\TMP nl}\cr}
    \smallskip}

% 1 Chapters and full manuals

\def\licencesection{\section Licence

\embedfile global file {EUPL-1.2-EN.txt}
    desc {Licence for this package (EUPL).}
    name LICENCE mimetype text/plain
    relation Unspecified uncompressed

This package may be distributed under the terms of the European Union Public 
Licence (EUPL) version 1.2 or later. An english version of this licence has 
been included as an attachment to this file; copies in other languages can be 
obtained at
\stopformulatagging$$\hbox
{\hyperlink alt{Link to the website of the EUPL.}
    url {https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12}%
    https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\endlink}$$\startformulatagging}

% for identifying which file we are typesetting
\edef\thejobname{\expandafter\scantextokens\expandafter{\jobname}}
\newif \ifchapter
\def\manual#1{\def\tmp{#1}\ifx\thejobname\tmp
    \chapterfalse\else\chaptertrue\fi}
\def\endmanual{\ifchapter\expandafter\endinput\else
    \licencesection\expandafter\bye\fi}

%  introduction

\endinput