mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
Emacs : Org mode templates for latex
This commit is contained in:
@ -873,7 +873,8 @@ https://emacs.stackexchange.com/a/30691
|
||||
(add-to-list 'org-structure-template-alist '("cc" . "src c"))
|
||||
(add-to-list 'org-structure-template-alist '("cp" . "src c++"))
|
||||
(add-to-list 'org-structure-template-alist '("rs" . "src rust"))
|
||||
(add-to-list 'org-structure-template-alist '("py" . "src python")))
|
||||
(add-to-list 'org-structure-template-alist '("py" . "src python"))
|
||||
(org-reload))
|
||||
#+end_src
|
||||
|
||||
** Org mode Addons
|
||||
@ -1172,6 +1173,110 @@ https://emacs.stackexchange.com/a/30691
|
||||
(set-face-foreground 'git-gutter:added "LightGreen")
|
||||
(set-face-foreground 'git-gutter:modified "LightGoldenrod")
|
||||
(set-face-foreground 'git-gutter:deleted "LightCoral"))
|
||||
** Org mode latex
|
||||
[[https://github.com/GeneKao/orgmode-latex-templates][reference]]
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'ox-latex
|
||||
(add-to-list 'org-latex-classes
|
||||
'("org-plain-latex"
|
||||
"\\documentclass[a4paper,11pt,titlepage]{memoir}
|
||||
\\usepackage{kotex}
|
||||
[NO-DEFAULT-PACKAGES]
|
||||
[PACKAGES]
|
||||
[EXTRA]
|
||||
\\linespread{1.1}
|
||||
\\hypersetup{pdfborder=0 0 0}"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||
|
||||
(add-to-list 'org-latex-classes
|
||||
'("ethz"
|
||||
"\\documentclass[a4paper,11pt,titlepage]{memoir}
|
||||
\\usepackage{kotex}
|
||||
\\usepackage[utf8]{inputenc}
|
||||
\\usepackage[T1]{fontenc}
|
||||
\\usepackage{fixltx2e}
|
||||
\\usepackage{graphicx}
|
||||
\\usepackage{longtable}
|
||||
\\usepackage{float}
|
||||
\\usepackage{wrapfig}
|
||||
\\usepackage{rotating}
|
||||
\\usepackage[normalem]{ulem}
|
||||
\\usepackage{amsmath}
|
||||
\\usepackage{textcomp}
|
||||
\\usepackage{marvosym}
|
||||
\\usepackage{wasysym}
|
||||
\\usepackage{amssymb}
|
||||
\\usepackage{hyperref}
|
||||
\\usepackage{mathpazo}
|
||||
\\usepackage{color}
|
||||
\\usepackage{enumerate}
|
||||
\\definecolor{bg}{rgb}{0.95,0.95,0.95}
|
||||
\\tolerance=1000
|
||||
[NO-DEFAULT-PACKAGES]
|
||||
[PACKAGES]
|
||||
[EXTRA]
|
||||
\\linespread{1.1}
|
||||
\\hypersetup{pdfborder=0 0 0}"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||
|
||||
|
||||
(add-to-list 'org-latex-classes
|
||||
'("article"
|
||||
"\\documentclass[11pt,a4paper]{article}
|
||||
\\usepackage{kotex}
|
||||
\\usepackage[utf8]{inputenc}
|
||||
\\usepackage[T1]{fontenc}
|
||||
\\usepackage{fixltx2e}
|
||||
\\usepackage{graphicx}
|
||||
\\usepackage{longtable}
|
||||
\\usepackage{float}
|
||||
\\usepackage{wrapfig}
|
||||
\\usepackage{rotating}
|
||||
\\usepackage[normalem]{ulem}
|
||||
\\usepackage{amsmath}
|
||||
\\usepackage{textcomp}
|
||||
\\usepackage{marvosym}
|
||||
\\usepackage{wasysym}
|
||||
\\usepackage{amssymb}
|
||||
\\usepackage{hyperref}
|
||||
\\usepackage{mathpazo}
|
||||
\\usepackage{color}
|
||||
\\usepackage{enumerate}
|
||||
\\definecolor{bg}{rgb}{0.95,0.95,0.95}
|
||||
\\tolerance=1000
|
||||
[NO-DEFAULT-PACKAGES]
|
||||
[PACKAGES]
|
||||
[EXTRA]
|
||||
\\linespread{1.1}
|
||||
\\hypersetup{pdfborder=0 0 0}"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")))
|
||||
|
||||
|
||||
(add-to-list 'org-latex-classes '("ebook"
|
||||
"\\documentclass[11pt, oneside]{memoir}
|
||||
\\setstocksize{9in}{6in}
|
||||
\\settrimmedsize{\\stockheight}{\\stockwidth}{*}
|
||||
\\setlrmarginsandblock{2cm}{2cm}{*} % Left and right margin
|
||||
\\setulmarginsandblock{2cm}{2cm}{*} % Upper and lower margin
|
||||
\\checkandfixthelayout
|
||||
% Much more laTeX code omitted
|
||||
"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}"))))
|
||||
#+end_src
|
||||
|
||||
* Rainbow Delimiters
|
||||
|
||||
@ -1,16 +1,4 @@
|
||||
(setq vc-follow-symlinks t)
|
||||
(with-eval-after-load 'ox-latex
|
||||
(add-to-list 'org-latex-classes
|
||||
'("org-plain-latex"
|
||||
"\\documentclass{article}
|
||||
[NO-DEFAULT-PACKAGES]
|
||||
[PACKAGES]
|
||||
[EXTRA]"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
|
||||
(org-babel-load-file
|
||||
(expand-file-name
|
||||
"emacs.org"
|
||||
|
||||
Reference in New Issue
Block a user