-
Notifications
You must be signed in to change notification settings - Fork 41
/
MLS.tex
163 lines (122 loc) · 4.24 KB
/
MLS.tex
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
\documentclass[10pt,a4paper]{report}
\NeedsTeXFormat{LaTeX2e}
\usepackage{ifpdf}
\ifpdf
% While the cmap.sty README says that the package should be included "at the beginning of your preamble",
% we need to at least load it after ifpdf due to incompatibility with LaTeXML, see:
% - https://github.com/brucemiller/LaTeXML/issues/2035 (marked as fixed as of commit c02643a)
\usepackage{cmap}
\fi
\usepackage[utf8]{inputenc}
% Define title for use by LaTeXML.
% An extended title is defined separately in the 'titlepage'.
\newcommand{\mlsversion}{3.7-dev}
\newcommand{\mlsdate}{\today}
\title{Modelica\textsuperscript{\textregistered} Language Specification version~\mlsversion}
\date{\mlsdate}
\author{Modelica Association}
\input{preamble.tex}
\ifpdf
\addbibresource{mls.bib}
\fi
% When debugging the LaTeXML build, it would be good to know the LaTeXML version used.
% The need for this feature has been reported as:
% - https://github.com/brucemiller/LaTeXML/issues/2033 -- fixed on 'master'
% When the fix becomes available in the LaTeXML version we use, try enabling the following:
%\usepackage{latexml}
%\begin{lxFooter}
%Produced by \LaTeXMLfullversion.
%\end{lxFooter}
\begin{document}
% Setting pageanchor false for these unnumbered pages
% Changed back after title page.
% The downside is that you cannot go to them in acrobat
% This is from https://tex.stackexchange.com/questions/18924/pdftex-warning-ext4-destination-with-the-same-identifier-nam-epage-1-has
% The accepted solution did not seem to work
\hypersetup{pageanchor=false,bookmarksdepth=2,destlabel=true,bookmarksopenlevel=0}
\include{chapters/titlepage}
% Add new Modelica Language logotype
% The header ruler looks odd as Modelica Language define a natural line that is further up
% We also need to fill the vertical space on the right
% Not using page numbers in right-header, since we usually refer to sections.
%
% Using nouppercase since it is seems more normal for the sections, and is also
% needed for over-determined connectors (as it would otherwise overflow)
\cleardoublepage
\setlength{\headheight}{10.5mm} % Make tall enough to fit fancy header.
\pagestyle{fancy}
\rhead{Modelica Language Specification \mlsversion\\ \nouppercase{\rightmark} \vspace{1mm}}
\lhead{\includegraphics[height=6.5mm]{Modelica_Language}}
\renewcommand{\headrulewidth}{0.0pt}
\hypersetup{pageanchor=true}
% Copyright
\include{chapters/copyright}
\cleardoublepage
\tableofcontents
% Preface
\include{chapters/preface}
% Introduction
\include{chapters/introduction}
% Lexical Structure
\include{chapters/lexicalstructure}
% Operators and Expressions
\include{chapters/operatorsandexpressions}
% Classes, Predefined Types, and Declarations
\include{chapters/classes}
% Scoping, Name Lookup, and Flattening
\include{chapters/scoping}
% Interface or Type Relationships
\include{chapters/interface}
% Inheritance, Modification, and Redeclaration
\include{chapters/inheritance}
% Equations
\include{chapters/equations}
% Connectors and Connections
\include{chapters/connectors}
% Arrays
\include{chapters/arrays}
% Statements and Algorithm Chapters
\include{chapters/statements}
% Functions
\include{chapters/functions}
% Packages
\include{chapters/packages}
% Overloaded Operators
\include{chapters/overloaded}
% Stream Connectors
\include{chapters/stream}
% Synchronous Language Elements
\include{chapters/synchronous}
% State Machines
\include{chapters/statemachines}
% Annotations
\include{chapters/annotations}
% Unit Expressions
\include{chapters/unitexpressions}
% The Modelica Standard Library
\include{chapters/library}
\appendix
% https://tex.stackexchange.com/questions/370384/change-toc-depth-mid-document
\addtocontents{toc}{\setcounter{tocdepth}{0}}
% Modelica Concrete Syntax
\include{chapters/syntax}
% Modelica DAE Representation}
\include{chapters/dae}
% Derivation of Stream Equations
\include{chapters/derivationofstream}
% Modelica Revision History
\include{chapters/revisions}
\clearpage% get the \phantomsection below on the correct page
\phantomsection
\addcontentsline{toc}{chapter}{\bibname}%
\ifpdf
\printbibliography
\else
\bibliography{mls}
\fi
\clearpage% get the \phantomsection below on the correct page
\phantomsection
\addcontentsline{toc}{chapter}{\indexname}%
\label{document-index}
\printindex
\end{document}