-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathmlsshared.sty
More file actions
54 lines (49 loc) · 1.86 KB
/
mlsshared.sty
File metadata and controls
54 lines (49 loc) · 1.86 KB
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
% Package with preamble content to be shared by the main document and its figures.
% Formatting for filenames, URIs, etc.
% For now, the content is wrapped in \mbox to avoid hyphenation to inject
% hyphens. A better solution could be to change the directory separator
% characters to also produce an \allowbreak{} following the directory separator.
\newcommand{\filename}[1]{\mbox{\textsf{#1}}}
% Pick a tt font that meets all of the following requirements:
% - Not too wide (to reduce need for manual breaking of long lines)
% - Has boldface variant that is distinctively heavier than its medium weight variant.
% - Medium weight variant is heavy enough to not make non-black colors blend too much with the
% white background due to anti-aliasing and similar effects.
% Warning: Note that changing to a font with different width -- especially a wider one -- means
% that existing manual line breaks are potentially becoming out of place.
% Finally, don't use newtexttt in listings in the LaTeXML build, see:
% - https://github.com/brucemiller/LaTeXML/issues/1713
\ifpdf
\usepackage{newtxtt}
\fi
\usepackage{textcomp}
\ifpdf
\usepackage{mlslistings}
\else
\include{mlslistings.sty}
\fi
% Misc math
\newcommand{\ud}{\mathrm{d}}
\newcommand{\udfrac}[3][\@nil]{%
\def\tmp{#1}%
\ifx\tmp\@nnil
\frac{\ud#2}{\ud#3}%
\else
\frac{\ud^{#1}#2}{\ud#3^{#1}}%
\fi%
}
\newcommand{\pdfrac}[3][\@nil]{%
\def\tmp{#1}%
\ifx\tmp\@nnil
\frac{\partial#2}{\partial#3}%
\else
\frac{\partial^{#1}#2}{\partial#3^{#1}}%
\fi%
}
\newcommand{\abs}[1]{\left\lvert #1{} \right\rvert}
% Text mode additions
\newcommand{\textgreatereq}{$\geq$}
\newcommand{\textlesseq}{$\leq$}
% For simpler links:
\newcommand{\specpull}[1]{\href{https://github.com/modelica/ModelicaSpecification/pull/#1}{\#{#1}}}
\newcommand{\specissue}[1]{\href{https://github.com/modelica/ModelicaSpecification/issue/#1}{\#{#1}}}