Skip to content

Commit

Permalink
Use 'titlepage' environment instead of \maketitle, and shorten \title
Browse files Browse the repository at this point in the history
This makes the \title work better in the LaTeXML output.
  • Loading branch information
henrikt-ma committed Nov 19, 2020
1 parent d610b19 commit 7606e11
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
49 changes: 37 additions & 12 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 @@ -23,14 +16,46 @@

\begin{document}
% Title
\maketitle
% 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.
\begin{center}
\ifpdf
\includegraphics[width=8cm]{Modelica_Language}
\else
\includegraphics[width=15cm]{Modelica_Language}
\fi
\vspace{3cm}

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

Language Specification

Version \mlsversion

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

\Large
\makeatletter
\@date

\@author
\makeatother
\end{center}
\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}}
Expand Down
9 changes: 0 additions & 9 deletions chapters/abstract.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
% 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

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
Expand Down

0 comments on commit 7606e11

Please sign in to comment.