summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ximera/src/pagesetup.dtx
blob: 9bf13d3cd93819c459d47fa767bfbfe16572345c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% \subsection{Page setup}
% We want non-indented spaced-out paragraphs.
%    \begin{macrocode}
%<*classXimera>
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt}
%</classXimera>
%    \end{macrocode}
% To avoid weird margins in 2-sided mode, change the margins.
%    \begin{macrocode}
%<*classXimera>
\oddsidemargin 62pt
\evensidemargin 62pt
\textwidth 345pt
\headheight 14pt
%</classXimera>
%    \end{macrocode}
% On the HTML side, there is more complicated page setup to perform.
%    \begin{macrocode}
%<*cfgXimera>
\Preamble{xhtml}

% We don't want to translate font suggestions with ugly wrappers like
% <span class="cmti-10"> for italic text
\NoFonts

% Don't output xml version tag
\Configure{VERSION}{}
 
% Output HTML5 doctype instead of the default for HTML4
\Configure{DOCTYPE}{\HCode{<!doctype html>\Hnewline}}
 
% Custom page opening
\Configure{HTML}{\HCode{<html lang="en">\Hnewline}}{\HCode{\Hnewline</html>}}

% Reset <head>, aka delete all default boilerplate; alternatively set up new content
\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="ximera" content="version 0.0.1" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link href="https://ximera.osu.edu/public/stylesheets/standalone.css" rel="stylesheet" media="screen"/>\Hnewline}}
\Configure{@HEAD}{\HCode{<script type="text/javascript" async src="https://ximera.osu.edu/public/javascripts/standalone.min.js"></script>\Hnewline}}
%</cfgXimera>
%    \end{macrocode}
% Disable certain ligatures in HTML.
%    \begin{macrocode}
%<*htXimera>
\usepackage{microtype}
\DisableLigatures[f]{encoding=*}
%</htXimera>
%    \end{macrocode}
% I am not sure what this does.
%    \begin{macrocode}
%<*htXimera>
\NewEnviron{html}{\HCode{\BODY}}
%</htXimera>
%    \end{macrocode}