Skip to content

Commit

Permalink
Merge remote-tracking branch 'central/master' into add-index
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Nov 19, 2020
2 parents c7b1cc6 + f686111 commit b06db8b
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .CI/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
stage('build') {
agent {
docker {
image 'modelicaspec/latexml:20200804'
image 'modelicaspec/latexml:20201119'
label 'linux'
alwaysPull true
}
Expand Down
7 changes: 6 additions & 1 deletion .CI/latexml/Dockerfile.incremental
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM modelicaspec/latexml:20200415

RUN tlmgr update --self \
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -qy perl ca-certificates make libxslt1.1 libxslt-dev libxml2 libxml2-dev gcc wget curl git unzip cpanminus --no-install-recommends --no-install-suggests \
&& tlmgr update --self \
&& tlmgr install cleveref caption \
&& cpanm LaTeXML \
&& apt-get autoremove -qy make gcc curl wget git cpanminus libxml2-dev libxslt-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/ /root/.cpanm/work*
72 changes: 58 additions & 14 deletions MLS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
\usepackage[utf8]{inputenc}
\input{preamble.tex}

\title{%
\ifpdf
\begin{center}
\includegraphics[width=8cm]{Modelica_Language}
\end{center}
~\\[2\baselineskip]
\fi
Modelica\textsuperscript{\textregistered} -- A Unified Object-Oriented Language for Systems Modeling\\[2\baselineskip]
Language Specification\\[2\baselineskip]
Version 3.5-dev%
}
% Define title for use by LaTeXML.
% An extended title is defined separately in the 'titlepage'.
\newcommand{\mlsversion}{3.5-dev}
\title{Modelica\textsuperscript{\textregistered} Language Specification version~\mlsversion}

\date{\today}

Expand All @@ -22,22 +15,73 @@
% The other parts start on new page and could be optionally included

\begin{document}

% Setting pageanchor false for these unnumbered pages
% Changed back after abstract
% 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}

% Title
\maketitle
\begin{titlepage}
% Note that things like \vspace and linebreaks with height (\\[2\baselineskip]) are lost in generated HTML;
% only line breaks and paragraph breaks survive.
\addtolength{\parskip}{\baselineskip}% Lots of space between paragraphs on the PDF title page.
\vspace*{\fill}
\begin{center}
\ifpdf
\includegraphics[width=8cm]{Modelica_Language}
\else
\includegraphics[width=15cm]{Modelica_Language}
\fi
\vspace{1cm}

\huge
Modelica\textsuperscript{\textregistered} -- A Unified Object-Oriented Language for~Systems Modeling

Language Specification

Version \mlsversion

\vspace{1cm}% This has no effect in the generated HTML.

\Large
\makeatletter
\@date

\@author
\makeatother
\end{center}

\ifpdf
\vfill
\else
\newpage % In the HTML, this will appear as some extra vertical space.
\fi
\input{chapters/abstract}
\end{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
\pagestyle{fancy}
\rhead{Modelica Language Specification 3.5-dev\\ \nouppercase{\rightmark} \vspace{1mm}}
\lhead{\includegraphics[height=6.5mm]{Modelica_Language}}
\renewcommand{\headrulewidth}{0.0pt}

% Abstract
\input{chapters/abstract}
\hypersetup{pageanchor=true}

% Copyright
\input{chapters/copyright}

\cleardoublepage
\tableofcontents

% Preface
\input{chapters/preface}
Expand Down
69 changes: 18 additions & 51 deletions chapters/abstract.tex
Original file line number Diff line number Diff line change
@@ -1,52 +1,19 @@
% Setting pageanhor false for these unnumbered pages
% Changed back after abstract
% 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}
\begin{abstract}
\ifpdf
\else
~\bigskip
\begin{center}
\includegraphics[width=8cm]{Modelica_Language}
\end{center}
\bigskip
\fi
% Can't use the 'abstract' environment as long as LaTeXML puts the abstract before the title page, see LaTeXML issue:
% - https://github.com/brucemiller/LaTeXML/issues/1395
\begin{center}
\large\bfseries\sffamily
\abstractname
\end{center}

This document defines the Modelica\footnote{Modelica is a registered
trademark of the Modelica Association} language, version 3.5, which is
developed by the Modelica Association, a non-profit organization with
seat in Linköping, Sweden. Modelica is a freely available,
object-oriented language for modeling of large, complex, and
heterogeneous systems. It is suited for multi-domain modeling, for
example, mechatronic models in robotics, automotive and aerospace
applications involving mechanical, electrical, hydraulic control and
state machine subsystems, process oriented applications and generation
and distribution of electric power. Models in Modelica are
mathematically described by differential, algebraic and discrete
equations. No particular variable needs to be solved for manually. A
Modelica tool will have enough information to decide that automatically.
Modelica is designed such that available, specialized algorithms can be
utilized to enable efficient handling of large models having more than
one hundred thousand equations. Modelica is suited and used for
hardware-in-the-loop simulations and for embedded control systems. More
information is available at \url{https://www.modelica.org}.
\end{abstract}

\hypersetup{pageanchor=true}
Copyright \textcopyright{} 1998-2020, Modelica Association (\url{https://www.modelica.org})

All rights reserved. Reproduction or use of editorial or pictorial
content is permitted, i.e., this document can be freely distributed
especially electronically, provided the copyright notice and these
conditions are retained. No patent liability is assumed with respect to
the use of information contained herein. While every precaution has been
taken in the preparation of this document no responsibility for errors
or omissions is assumed.

The contributors to this and to previous versions of this document are
listed in \cref{modelica-revision-history}. All contributors worked voluntarily and without
compensation.

\tableofcontents
This document defines the Modelica\footnote{%
\firstuse{Modelica} is a registered trademark of the Modelica Association.
}
language, version~\mlsversion, which is developed by the Modelica Association, a non-profit organization with seat in Linköping, Sweden.
Modelica is a freely available, object-oriented language for modeling of large, complex, and heterogeneous systems.
It is suited for multi-domain modeling, for example, mechatronic models in robotics, automotive and aerospace applications involving mechanical, electrical, hydraulic control and state machine subsystems, process oriented applications and generation and distribution of electric power.
Models in Modelica are mathematically described by differential, algebraic and discrete equations.
No particular variable needs to be solved for manually.
A Modelica tool will have enough information to decide that automatically.
Modelica is designed such that available, specialized algorithms can be utilized to enable efficient handling of large models having more than one hundred thousand equations.
Modelica is suited and used for hardware-in-the-loop simulations and for embedded control systems.
More information is available at \url{https://www.modelica.org}.
9 changes: 9 additions & 0 deletions chapters/copyright.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Copyright \textcopyright{} 1998-2020, Modelica Association (\url{https://www.modelica.org})

All rights reserved.
Reproduction or use of editorial or pictorial content is permitted, i.e., this document can be freely distributed especially electronically, provided the copyright notice and these conditions are retained.
No patent liability is assumed with respect to the use of information contained herein.
While every precaution has been taken in the preparation of this document no responsibility for errors or omissions is assumed.

The contributors to this and to previous versions of this document are listed in \cref{modelica-revision-history}.
All contributors worked voluntarily and without compensation.
6 changes: 3 additions & 3 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ \subsection{Clocks and Clocked Variables}\label{clocks-and-clocked-variables}
% https://github.com/brucemiller/LaTeXML/issues/1292 (marked as fixed as of commit 9f5c893b)
%\begin{figure}[tb]
% \centering
% \subfloat[A piecewise-constant variable.]{\includegraphics[width=5cm]{piecewise}\label{fig:piecewise-constant-variable}}
% \subfloat[A clock variable.]{\includegraphics[width=5cm]{clock}\label{fig:clock-variable}}
% \subfloat[A clocked variable.]{\includegraphics[width=5cm]{clocked}\label{fig:clocked-variable}}
% \subfloat[A piecewise-constant variable.]{\includegraphics{piecewise}\label{fig:piecewise-constant-variable}}
% \subfloat[A clock variable.]{\includegraphics{clock}\label{fig:clock-variable}}
% \subfloat[A clocked variable.]{\includegraphics{clocked}\label{fig:clocked-variable}}
% \caption{The different kinds of discrete-time variables. The \lstinline!hold! extrapolation of the clocked variable is illustrated with dashed green lines.}
%\end{figure}

Expand Down
41 changes: 26 additions & 15 deletions css/MLS-navbar-left.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ nav > div.ltx_TOC {
top: 0px;
margin: 0px;
padding: 0px;
font: 90% sans-serif;
font-size: 14px; /* Less than what is inherited from .body, to reduce need for scrolling. */
line-height: 1.3; /* Less than what is inherited from .body, to reduce need for scrolling. */
color: black;
border-style: solid;
border-color: #707A85; /* "Bouncing ball trace gray" */
Expand All @@ -32,22 +33,29 @@ nav > div.ltx_TOC {
.ltx_page_navbar:before {
position: fixed;
z-index: 4;
left: 2px;
left: 0px;
top: 0px;
margin: 0px;
padding: 0px;
font: 16px sans-serif;
font-size: 25px;
color: #DE1D31; /* "Bouncing ball red" */
height: 30px;
width: 16px;
width: calc(3rem - 8px);
background: #F6F6F6;
text-align: center;
content: "☰"; /* Chinese character that looks like hamburger. */
}

.ltx_page_navbar a[rel=start] {
display: none; /* Hiding the sidebar title, as it is too long to look good, and seem to lack structure for adequate layout. */
margin: 1em;
font-weight: bold;
display: none; /* Don't show sidebar title, as it is too long to look good, and seem to lack structure for adequate layout. */
}

.ltx_page_header a[rel=prev] {
display: none; /* Don't show link to previous chapter. */
}

.ltx_page_header a[rel=next] {
display: none; /* Don't show link to previous chapter. */
}

.ltx_TOC {
Expand Down Expand Up @@ -90,22 +98,22 @@ nav > div.ltx_TOC {
position: fixed;
z-index: 3;
top: 0px;
height: 3em;
padding: 0.5em 1em;
height: 1.5rem;
padding: 0.5rem 1rem;
background: #F6F6F6; /* Same as body. */
color: black; /* Same as side bar. */
white-space: nowrap;
text-overflow: ellipsis;
}

.ltx_page_content {
padding: 1em;
margin-top: 3em; /* Header height plus padding below, minus a little bit. */
padding: 1rem;
margin-top: 1.5rem; /* Header height plus padding below, minus a little bit. */
background: white;
}

.ltx_page_footer {
padding: 1em;
padding: 1rem;
background: white;
}

Expand Down Expand Up @@ -143,22 +151,25 @@ nav > div.ltx_TOC {
/* Leave just enough space to fit the hamburger plus the right border of the .ltx_page_navbar.
* Don't define this in em units, since the em is not the same below in .ltx_page_navbar.
*/
margin-left: calc(2px + 16px + 8px); /* left + width + border */
margin-left: 0px;
}
.ltx_page_navbar {
width: 500px;
left: calc(26px - (500px + 8px)); /* Position right extent where .lts_page_main starts, taking .ltx_page_navbar border-right-width into account. */
height: 2.5rem;
left: calc(3rem - (500px + 8px));
transition: 0.3s;
}
.ltx_TOC {
margin-top: 20px; /* Reserve space for hamburger. */
height: calc(100% - 20px);
}
.ltx_page_header {
width: calc(100% - 26px - 2em); /* Subtract 2em for the total horizontal padding on this element. */
padding-left: 4rem;
width: calc(100% - (4rem + 1rem)); /* Subtract horizontal padding on this element. */
}
.ltx_page_navbar:hover {
left: 0px;
height: 100%;
}
.ltx_page_navbar:before {
display: block;
Expand Down
13 changes: 13 additions & 0 deletions css/MLS.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ a:hover { text-decoration: underline; }
/* Undo the ltx-report.css setting that destroys parskip.sty style paragraphs.
*/
.ltx_para > .ltx_p:first-child { text-indent: 0; }

/* Treat heading for table of contents on front page as it it were a chapter title,
* by settings same style for .ltx_title_chapter in ltx-report.css.
*/
.ltx_document .ltx_TOC h6 {
font-size: 200%;
font-weight: bold;
margin-bottom: 1em;
}

.ltx_dates {
display: none;
}
2 changes: 1 addition & 1 deletion preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@

\newenvironment{synopsis}[1][modelica]{%
\lstset{language=[synopsis]#1}%
~\vspace*{-\parskip}\par
~\vspace{-\parskip}\par
}{%
}
\newenvironment{semantics}{%
Expand Down

0 comments on commit b06db8b

Please sign in to comment.