Skip to content

Commit

Permalink
New latex ml (#2545)
Browse files Browse the repository at this point in the history
* To Make it run with LaTeXML 0.8.4 with just minimal changes of css.
* Add label for preface.
* New naming of html-files, with links.
  • Loading branch information
HansOlsson committed Apr 21, 2020
1 parent cbe1bc1 commit a5fdf17
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 94 deletions.
28 changes: 27 additions & 1 deletion .CI/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,33 @@ pipeline {
sh 'mkdir -p /tmp/jenkins'
sh 'latexmk -pdf MLS.tex'
sh 'latexml --path=media MLS.tex --dest MLS.xml'
sh 'latexmlpost MLS.xml -format html -pmml --splitat=chapter --javascript=css/LatexML-maybeMathJax.js --navigationtoc=context --css=css/LaTeXML-navbar-left.css --dest MLS.html'
sh 'latexmlpost MLS.xml -format html -pmml --splitat=chapter --splitnaming=labelrelative --javascript=css/LaTeXML-maybeMathJax.js --navigationtoc=context --css=css/LaTeXML-navbar-left.css --dest MLS.html'
sh 'ln -s preface.html Chx1.html'
sh 'ln -s lexical-structure.html Ch2.html'
sh 'ln -s operators-and-expressions.html Ch3.html'
sh 'ln -s class-predefined-types-and-declarations.html Ch4.html'
sh 'ln -s scoping-name-lookup-and-flattening.html Ch5.html'
sh 'ln -s interface-or-type-relationships.html Ch6.html'
sh 'ln -s inheritance-modification-and-redeclaration.html Ch7.html'
sh 'ln -s equations.html Ch8.html'
sh 'ln -s connectors-and-connections.html Ch9.html'
sh 'ln -s array.html Ch10.html'
sh 'ln -s statements-and-algorithm-sections.html Ch11.html'
sh 'ln -s functions.html Ch12.html'
sh 'ln -s packages.html Ch13.html'
sh 'ln -s overloaded-operators.html Ch14.html'
sh 'ln -s stream-connectors.html Ch15.html'
sh 'ln -s synchronous-language-elements.html Ch16.html'
sh 'ln -s state-machines.html Ch17.html'
sh 'ln -s annotations.html Ch18.html'
sh 'ln -s unit-expressions.html Ch19.html'
sh 'ln -s the-modelica-standard-library Ch20.html'
sh 'ln -s glossary.html A1.html'
sh 'ln -s modelica-concrete-syntax.html A2.html'
sh 'ln -s modelica-dae-representation.html A3.html'
sh 'ln -s derivation-of-stream-equations.html A4.html'
sh 'ln -s modelica-revision-history.html A5.html'
sh 'ln -s literature.html A6.html'
sh 'tar czf MLS.tar.gz *.html *.css media css/'
archiveArtifacts artifacts: 'MLS.tar.gz', fingerprint: true
archiveArtifacts artifacts: 'MLS.pdf', fingerprint: true
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ clean:
MLS.pdf: *.tex
pdflatex MLS.tex

# Seems to be some issue with graphicpath, so set path here as well
MLS.html: *.tex
$(LATEXMLPREFIX)latexml MLS.tex --dest MLS.xml
$(LATEXMLPREFIX)latexmlpost MLS.xml -format html -pmml --splitat=chapter --javascript=css/LatexML-maybeMathJax.js --navigationtoc=context --css=css/LaTeXML-navbar-left.css --dest MLS.html
$(LATEXMLPREFIX)latexml MLS.tex --path=media --dest MLS.xml
$(LATEXMLPREFIX)latexmlpost MLS.xml -format html -pmml --splitat=chapter --splitnaming=labelrelative --javascript=css/LaTeXML-maybeMathJax.js --navigationtoc=context --css=css/LaTeXML-navbar-left.css --dest MLS.html
2 changes: 1 addition & 1 deletion chapters/preface.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\chapter*{Preface}
\chapter*{Preface}\doublelabel{preface}
% https://tex.stackexchange.com/questions/45672/adding-numberless-chapters-to-the-table-of-contents
\addcontentsline{toc}{chapter}{\protect\numberline{}Preface}
Modelica is a freely available, object-oriented language for modeling of
Expand Down
2 changes: 1 addition & 1 deletion chapters/scoping.tex
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ \subsection{Simple Name Lookup}\doublelabel{simple-name-lookup}
Reference to variables successfully looked up in an enclosing class is
only allowed for variables declared as constant. The values of modifiers
are thus resolved in the \textbf{instance} scope of which the modifier
appears; if the use is in a modifier on a short class definition, see \autoref{short-class-definition}.
appears; if the use is in a modifier on a short class definition, see \autoref{short-class-definitions}.

This lookup in each \textbf{instance} scope is performed as follows

Expand Down
4 changes: 0 additions & 4 deletions css/LaTeXML-maybeMathJax.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
// Load MathJax, IFF the current browser can't handle MathML natively.

(function() {
// cdn.mathjax.org shutdown:
//var mathjax_url =
// "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML";
var mathjax_url =
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=MML_HTMLorMML";


function refreshMath() {
// Maybe unnecessary, or overkill, but...
Expand Down
2 changes: 1 addition & 1 deletion css/LaTeXML-navbar-left.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.ltx_page_navbar {
display:block!important; position:fixed; left:0px; top:0px; width:170px;
margin:0em; padding:1em; font: bold 75% sans-serif;
border: 3px double; overflow-y: auto; height: 95vh;}
border: 3px double; overflow-y: auto; height: 95vh; }
.ltx_page_navbar ul {
margin-left:-2em; }
.ltx_page_main {
Expand Down
2 changes: 1 addition & 1 deletion css/LaTeXML-navbar-right.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.ltx_page_navbar {
display:block!important; position:fixed; left:80%; top:0px; width:20%;
margin:0em; padding:1em; font: bold 75% sans-serif; }
margin:0em; padding:1em; font: bold 75% sans-serif; overflow-y: auto; max-height: 95vh; }
.ltx_page_navbar ul {
margin-left:-2em; }
.ltx_page_main {
Expand Down

0 comments on commit a5fdf17

Please sign in to comment.