| 1 |
|
| 2 |
% SimpleSystemTeX doc (en-US) |
| 3 |
|
| 4 |
% -------------------------------------------------- |
| 5 |
% | Preamble (XeLaTeX) | |
| 6 |
% -------------------------------------------------- |
| 7 |
|
| 8 |
% Packages |
| 9 |
|
| 10 |
\documentclass[10pt]{article} |
| 11 |
\usepackage{simplesystemtex} |
| 12 |
\usepackage{geometry,fontspec,dirtree,setspace} |
| 13 |
|
| 14 |
% Page Layout |
| 15 |
|
| 16 |
\setmonofont {Menlo} [ |
| 17 |
Scale = 0.875 |
| 18 |
] |
| 19 |
\renewcommand \baselinestretch {1.375} |
| 20 |
\geometry { |
| 21 |
b5paper, |
| 22 |
left=18.75mm, |
| 23 |
right=18.75mm, |
| 24 |
top=20mm, |
| 25 |
bottom=25mm |
| 26 |
} |
| 27 |
\setlength{\DTbaselineskip}{12.5pt} |
| 28 |
|
| 29 |
\newcommand \cs [1] {\texttt{\textbackslash #1}} |
| 30 |
\newcommand \meta [1] {$\langle$\,{\ttfamily\slshape #1}\,$\rangle$} |
| 31 |
\newcommand \longarg {\textsuperscript{\P}} |
| 32 |
\newcommand \AnotherUsage {\par\noindent\ } |
| 33 |
|
| 34 |
\NewCommandCopy \originalSimpleSystemTeX \SimpleSystemTeX |
| 35 |
\RenewDocumentCommand \SimpleSystemTeX {d[]} {% |
| 36 |
\IfValueTF {#1} {% |
| 37 |
\originalSimpleSystemTeX[#1]\,% |
| 38 |
} {% |
| 39 |
\originalSimpleSystemTeX\,% |
| 40 |
}% |
| 41 |
} |
| 42 |
|
| 43 |
\NewBlockType{NewConcept} |
| 44 |
\NewBlockType{List} |
| 45 |
\NewBlockType{Example} |
| 46 |
\NewBlockType{BadPractice} |
| 47 |
\NewBlockType{Usage} |
| 48 |
\NewBlockType{MandatoryArguments} |
| 49 |
\NewBlockType{OptionalArguments} |
| 50 |
\NewBlockType{LocalUsage} |
| 51 |
|
| 52 |
\SetStyle {NewConcept} {% |
| 53 |
{\slshape @blockname}% |
| 54 |
} |
| 55 |
\SetStyle {List} { |
| 56 |
\par\medskip\noindent\textbf{@blockname} |
| 57 |
\par @blockcontent |
| 58 |
\par\medskip |
| 59 |
} |
| 60 |
\SetStyle {Example} { |
| 61 |
\color{gray} |
| 62 |
\par\bigskip\noindent\textbf{Example} |
| 63 |
\cleaders\hbox{\rule[0.25em]{7.5pt}{0.1pt}}\hfill\kern0pt |
| 64 |
\begin{spacing}{1.25} |
| 65 |
\par\medskip\noindent{\ttfamily\small @blockcontent} |
| 66 |
\end{spacing} |
| 67 |
\par\medskip\noindent\leavevmode\cleaders\hbox{\rule[0.5em]{7.5pt}{0.1pt}}\hfill\kern0pt |
| 68 |
\par\medskip |
| 69 |
} |
| 70 |
\SetStyle {BadPractice} { |
| 71 |
\color{red} |
| 72 |
\par\medskip\noindent\textbf{Bad Practice} |
| 73 |
\par @blockcontent |
| 74 |
\par\medskip |
| 75 |
} |
| 76 |
\SetStyle {Usage} { |
| 77 |
\color{purple}\ttfamily |
| 78 |
\par\bigskip\noindent{\bfseries\sffamily @blockname} |
| 79 |
\cleaders\hbox{\rule[0.25em]{7.5pt}{0.1pt}}\hfill\kern0pt |
| 80 |
\par\smallskip\noindent{\ttfamily\small @blockcontent} |
| 81 |
\par\noindent\leavevmode\cleaders\hbox{\rule[0.5em]{7.5pt}{0.1pt}}\hfill\kern0pt |
| 82 |
\par |
| 83 |
} |
| 84 |
\SetStyle {MandatoryArguments} { |
| 85 |
\color{olive} |
| 86 |
\par\noindent{\bfseries Mandatory Arguments} |
| 87 |
{\slshape @blockcontent} |
| 88 |
\par\smallskip |
| 89 |
} |
| 90 |
\SetStyle {OptionalArguments} { |
| 91 |
\color{brown} |
| 92 |
\par\noindent{\bfseries Optional Arguments} |
| 93 |
{\slshape @blockcontent} |
| 94 |
\par\smallskip |
| 95 |
} |
| 96 |
\SetStyle {LocalUsage} { |
| 97 |
\ttfamily |
| 98 |
\par\indent\indent @blockcontent |
| 99 |
\par |
| 100 |
} |
| 101 |
|
| 102 |
\NewDocumentCommand \newconcept {m} {% |
| 103 |
\NewConcept {#1} {#1}% |
| 104 |
} |
| 105 |
\NewDocumentCommand \UserCommand {m d<> +m +d[] +d[]} { |
| 106 |
\Usage{#1-U}(#1)<#2>{#3} |
| 107 |
\IfValueT{#4}{ |
| 108 |
\MandatoryArguments{#1-MP}<#2>{#4} |
| 109 |
} |
| 110 |
|
| 111 |
\IfValueT{#5}{ |
| 112 |
\OptionalArguments{#1-OP}<#2>{#5} |
| 113 |
} |
| 114 |
\par\medskip |
| 115 |
} |
| 116 |
|
| 117 |
\AutomaticListon |
| 118 |
|
| 119 |
\begin{document} |
| 120 |
|
| 121 |
% Cover |
| 122 |
|
| 123 |
\pagestyle{empty} |
| 124 |
\SimpleSystemCover{ |
| 125 |
\huge\SimpleSystemTeX[bf]\textbf{Manual} |
| 126 |
} |
| 127 |
\newpage |
| 128 |
\pagestyle{plain} |
| 129 |
|
| 130 |
% Table of Contents |
| 131 |
|
| 132 |
\TableofContents |
| 133 |
\TextCommand{\newpage} |
| 134 |
|
| 135 |
\AddPart{\!\SimpleSystemTeX[bf]} |
| 136 |
\ImportSection{SimpleSystemTeXOverview}(\!\SimpleSystemTeX[bf]Overview) |
| 137 |
|
| 138 |
\AddPart{File Management} |
| 139 |
\ImportSection{MainFile/ImportingSectionFiles}(Importing Section Files) |
| 140 |
\ImportSection{MainFile/GeneratingTOC}(Generating TOC) |
| 141 |
|
| 142 |
\AddPart{Blocks \& Cross-Reference} |
| 143 |
\ImportSection{Preamble/DeclaringBlockTypes}(Declaring Block Types) |
| 144 |
\ImportSection{Text/CreatingBlocks}(Creating Blocks) |
| 145 |
\ImportSection{Text/GeneratingBlockIndexes}(Generating Block Indexes) |
| 146 |
\ImportSection{Text/AddingLinks}(Adding Links) |
| 147 |
|
| 148 |
\AddPart{Others} |
| 149 |
\ImportSection{Preamble/StyleConfiguration}(Style Configuration) |
| 150 |
|
| 151 |
\AddPart{Appendix} |
| 152 |
\ImportSection{StyleCodePresetValues}(Style Code Preset Values) |
| 153 |
\ImportSection{SimpleSystemTeXCommandIndex}(\!\SimpleSystemTeX[bf]Command Index) |
| 154 |
|
| 155 |
\end{document} |