Skip to content

Commit

Permalink
Add a meta viewport tag to counter small text (modelica#2932)
Browse files Browse the repository at this point in the history
Android Chrome has very small text, which this fixes.
This is one of the problems reported in modelica#2825.
  • Loading branch information
sjoelund committed May 5, 2021
1 parent 5d91261 commit e4417aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .CI/Jenkinsfile
Expand Up @@ -31,6 +31,7 @@ pipeline {
sh 'latexmk -pdf MLS.tex'
sh 'latexml MLS.tex --includestyles --path=media --dest MLS.xml'
sh 'latexmlpost MLS.xml -format html -pmml --splitat=chapter --splitnaming=labelrelative --javascript=LaTeXML-maybeMathjax.js --navigationtoc=context --css=css/MLS.css --css=css/MLS-navbar-left.css --dest MLS.html'
sh '.scripts/patch-viewport.sh'
sh 'ln -s preface.html Chx1.html'
sh 'ln -s lexical-structure.html Ch2.html'
sh 'ln -s operators-and-expressions.html Ch3.html'
Expand Down
5 changes: 5 additions & 0 deletions .scripts/patch-viewport.sh
@@ -0,0 +1,5 @@
#!/bin/sh -xe

sed -i.bak 's;</head>;<meta name="viewport" content="width=device-width, initial-scale=1">\
</head>;' *.html
rm *.html.bak # MacOS sed does not support -i without extension
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -25,3 +25,4 @@ MLS.pdf: *.tex chapters/*.tex
MLS.html: MLS.tex chapters/*.tex
$(LATEXMLPREFIX)latexml MLS.tex --includestyles --path=media --dest MLS.xml
$(LATEXMLPREFIX)latexmlpost MLS.xml -format html -pmml --splitat=chapter --splitnaming=labelrelative --javascript=LaTeXML-maybeMathjax.js --navigationtoc=context --css=css/MLS.css --css=css/MLS-navbar-left.css --dest $@
./scripts/patch-viewport.sh

0 comments on commit e4417aa

Please sign in to comment.