-
Notifications
You must be signed in to change notification settings - Fork 1
/
localcommands.tex
56 lines (37 loc) · 1.38 KB
/
localcommands.tex
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
%add all your local new commands to this file
\newcommand{\smiley}{:\)}
% ===========
% to get the U+Hexdecimal abbreviations looking good
\newcommand{\uni}[1]
{\@{\small \fontspec[Letters=Uppercase]{LinLibertineO}U+#1}\@}
\newcommand{\unif}[1]
{\@{\footnotesize \fontspec[Letters=Uppercase]{LinLibertineO}U+#1}\@} % small for footnote
% ===========
% use charisSIL in suitable size to fit other text
\newcommand{\charis}[1]
{{\small \fontspec{CharisSIL}#1}}
% use a Tamil font
\newcommand{\tamil}[1]
{{\fontspec{Noto Sans Tamil}#1}}
% use a Tamil font
\newcommand{\sinhala}[1]
{{\Large \fontspec{Sinhala MN}#1}}
% ===========
% mark lonely diacritics with a dotted circle
\newcommand{\dia}[1]
{{\fontspec{CharisSIL}{\large ◌}\symbol{"#1}}} % circle before diacritics
\newcommand{\diareverse}[1]
{{\fontspec{CharisSIL}\symbol{"#1}{\large ◌}}} % circle after diacritic
\newcommand{\diaf}[1]
{{\footnotesize \fontspec{CharisSIL}{\small ◌}\symbol{"#1}}} % small for footnote
% ===========
% scale texttt fontsize, for regular text and for footnotes
\renewcommand{\texttt}[1]
{{\small\ttfamily #1}}
\newcommand{\textttf}[1]
{{\scriptsize\ttfamily #1}} % small for footnote
% ===========
% manually specifying space before and after knitr chunks
\renewenvironment{knitrout}
{\vspace{-0.5em} } % what happens before the code chunk
{\vspace{-0.5em} } % what happens after the code chunk