-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasync-init.el
45 lines (43 loc) · 2.11 KB
/
async-init.el
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
;; -*- eval: (flycheck-mode -1); lexical-binding: t; -*-
(require 'org)
(require 'ox)
(with-eval-after-load 'ox-latex
(setq org-latex-compiler "xelatex")
(add-to-list 'org-latex-classes
'("tufte-book"
"\\documentclass{tufte-book}
\\usepackage{ifluatex, ifxetex}
%Next block avoids bug, from http://tex.stackexchange.com/a/200725/1913
\\ifx\\ifxetex\\ifluatex\\else % if lua- or xelatex http://tex.stackexchange.com/a/140164/1913
\\newcommand{\\textls}[2][5]{%
\\begingroup\\addfontfeatures{LetterSpace=#1}#2\\endgroup
}
\\renewcommand{\\allcapsspacing}[1]{\\textls[15]{#1}}
\\renewcommand{\\smallcapsspacing}[1]{\\textls[10]{#1}}
\\renewcommand{\\allcaps}[1]{\\textls[15]{\\MakeTextUppercase{#1}}}
\\renewcommand{\\smallcaps}[1]{\\smallcapsspacing{\\scshape\\MakeTextLowercase{#1}}}
\\renewcommand{\\textsc}[1]{\\smallcapsspacing{\\textsmallcaps{#1}}}
\\fi "
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-latex-classes
'("tufte-handout"
"\\documentclass{tufte-handout}
\\usepackage{ifluatex, ifxetex}
%Next block avoids bug, from http://tex.stackexchange.com/a/200725/1913
\\ifx\\ifxetex\\ifluatex\\else % if lua- or xelatex http://tex.stackexchange.com/a/140164/1913
\\newcommand{\\textls}[2][5]{%
\\begingroup\\addfontfeatures{LetterSpace=#1}#2\\endgroup
}
\\renewcommand{\\allcapsspacing}[1]{\\textls[15]{#1}}
\\renewcommand{\\smallcapsspacing}[1]{\\textls[10]{#1}}
\\renewcommand{\\allcaps}[1]{\\textls[15]{\\MakeTextUppercase{#1}}}
\\renewcommand{\\smallcaps}[1]{\\smallcapsspacing{\\scshape\\MakeTextLowercase{#1}}}
\\renewcommand{\\textsc}[1]{\\smallcapsspacing{\\textsmallcaps{#1}}}
\\fi "
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))