Skip to content

Commit

Permalink
Work around LaTeXML issue with the 'abstract' environment
Browse files Browse the repository at this point in the history
This also restores the 3.4 look with the abstract on the PDF front page.
  • Loading branch information
henrikt-ma committed Nov 19, 2020
1 parent 911b2d7 commit 1d1bff5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
29 changes: 23 additions & 6 deletions MLS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@
% The other parts start on new page and could be optionally included

\begin{document}

% 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}

% Title
% Need to somehow work around the issue that LaTeXML puts the abstract before the title page, see LaTeXML issue:
% - https://github.com/brucemiller/LaTeXML/issues/1395
\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{3cm}
\vspace{1cm}

\huge
Modelica\textsuperscript{\textregistered} -- A Unified Object-Oriented Language for~Systems Modeling
Expand All @@ -37,7 +44,7 @@

Version \mlsversion

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

\Large
\makeatletter
Expand All @@ -46,6 +53,13 @@
\@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
Expand All @@ -61,9 +75,12 @@
\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
Expand Down
26 changes: 7 additions & 19 deletions chapters/abstract.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
% 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}
% 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{%
\firstuse{Modelica} is a registered trademark of the Modelica Association.
}
Expand All @@ -17,15 +17,3 @@
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.
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.

0 comments on commit 1d1bff5

Please sign in to comment.