latex config
This commit is contained in:
@@ -43,6 +43,130 @@
|
||||
(setq org-html-preamble `nil)
|
||||
(setq org-html-postamble `nil)
|
||||
|
||||
;; latex export that does not look like an academic paper
|
||||
;; source: https://so.nwalsh.com/2020/01/05-latex
|
||||
;; utf-8 supported by the following lines
|
||||
(setq org-latex-compiler "xelatex")
|
||||
(setq org-latex-pdf-process
|
||||
(list (concat "latexmk -"
|
||||
org-latex-compiler
|
||||
" -recorder -synctex=1 -bibtex-cond %b")))
|
||||
|
||||
;; syntax highlighting for source code
|
||||
(setq org-latex-listings t)
|
||||
|
||||
;; stuff taken care of by the classes that come in the next step can be set to nil.
|
||||
(setq org-latex-default-packages-alist
|
||||
'(("" "graphicx" t)
|
||||
("" "grffile" t)
|
||||
("" "longtable" nil)
|
||||
("" "wrapfig" nil)
|
||||
("" "rotating" nil)
|
||||
("normalem" "ulem" t)
|
||||
("" "amsmath" t)
|
||||
("" "textcomp" t)
|
||||
("" "amssymb" t)
|
||||
("" "capt-of" nil)
|
||||
("" "hyperref" nil)))
|
||||
|
||||
;; lots of latex
|
||||
(setq org-latex-classes
|
||||
'(("article"
|
||||
"\\RequirePackage{fix-cm}
|
||||
\\PassOptionsToPackage{svgnames}{xcolor}
|
||||
\\documentclass[11pt]{article}
|
||||
\\usepackage{fontspec}
|
||||
\\setmainfont{ETBembo RomanOSF}
|
||||
\\setsansfont[Scale=MatchLowercase]{Raleway}
|
||||
\\setmonofont[Scale=MatchLowercase]{Fira Mono}
|
||||
\\usepackage{sectsty}
|
||||
\\allsectionsfont{\\sffamily}
|
||||
\\usepackage{enumitem}
|
||||
\\setlist[description]{style=unboxed,font=\\sffamily\\bfseries}
|
||||
\\usepackage{listings}
|
||||
\\lstset{frame=single,aboveskip=1em,
|
||||
framesep=.5em,backgroundcolor=\\color{AliceBlue},
|
||||
rulecolor=\\color{LightSteelBlue},framerule=1pt}
|
||||
\\usepackage{xcolor}
|
||||
\\newcommand\\basicdefault[1]{\\scriptsize\\color{Black}\\ttfamily#1}
|
||||
\\lstset{basicstyle=\\basicdefault{\\spaceskip1em}}
|
||||
\\lstset{literate=
|
||||
{§}{{\\S}}1
|
||||
{©}{{\\raisebox{.125ex}{\\copyright}\\enspace}}1
|
||||
{«}{{\\guillemotleft}}1
|
||||
{»}{{\\guillemotright}}1
|
||||
{Á}{{\\'A}}1
|
||||
{Ä}{{\\\"A}}1
|
||||
{É}{{\\'E}}1
|
||||
{Í}{{\\'I}}1
|
||||
{Ó}{{\\'O}}1
|
||||
{Ö}{{\\\"O}}1
|
||||
{Ú}{{\\'U}}1
|
||||
{Ü}{{\\\"U}}1
|
||||
{ß}{{\\ss}}2
|
||||
{à}{{\\`a}}1
|
||||
{á}{{\\'a}}1
|
||||
{ä}{{\\\"a}}1
|
||||
{é}{{\\'e}}1
|
||||
{í}{{\\'i}}1
|
||||
{ó}{{\\'o}}1
|
||||
{ö}{{\\\"o}}1
|
||||
{ú}{{\\'u}}1
|
||||
{ü}{{\\\"u}}1
|
||||
{¹}{{\\textsuperscript1}}1
|
||||
{²}{{\\textsuperscript2}}1
|
||||
{³}{{\\textsuperscript3}}1
|
||||
{ı}{{\\i}}1
|
||||
{—}{{---}}1
|
||||
{’}{{'}}1
|
||||
{…}{{\\dots}}1
|
||||
{⮠}{{$\\hookleftarrow$}}1
|
||||
{␣}{{\\textvisiblespace}}1,
|
||||
keywordstyle=\\color{DarkGreen}\\bfseries,
|
||||
identifierstyle=\\color{DarkRed},
|
||||
commentstyle=\\color{Gray}\\upshape,
|
||||
stringstyle=\\color{DarkBlue}\\upshape,
|
||||
emphstyle=\\color{Chocolate}\\upshape,
|
||||
showstringspaces=false,
|
||||
columns=fullflexible,
|
||||
keepspaces=true}
|
||||
\\usepackage[a4paper,margin=1in,left=1.5in]{geometry}
|
||||
\\usepackage{parskip}
|
||||
\\makeatletter
|
||||
\\renewcommand{\\maketitle}{%
|
||||
\\begingroup\\parindent0pt
|
||||
\\sffamily
|
||||
\\Huge{\\bfseries\\@title}\\par\\bigskip
|
||||
\\LARGE{\\bfseries\\@author}\\par\\medskip
|
||||
\\normalsize\\@date\\par\\bigskip
|
||||
\\endgroup\\@afterindentfalse\\@afterheading}
|
||||
\\makeatother
|
||||
[DEFAULT-PACKAGES]
|
||||
\\hypersetup{linkcolor=Blue,urlcolor=DarkBlue,
|
||||
citecolor=DarkRed,colorlinks=true}
|
||||
\\AtBeginDocument{\\renewcommand{\\UrlFont}{\\ttfamily}}
|
||||
[PACKAGES]
|
||||
[EXTRA]"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
|
||||
|
||||
("report" "\\documentclass[11pt]{report}"
|
||||
("\\part{%s}" . "\\part*{%s}")
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
|
||||
|
||||
("book" "\\documentclass[11pt]{book}"
|
||||
("\\part{%s}" . "\\part*{%s}")
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
||||
|
||||
;; make screenshot and paste
|
||||
;; https://zzamboni.org/post/how-to-insert-screenshots-in-org-documents-on-macos/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user