Make it easier to export my Org-mode reports and notes

This commit is contained in:
Gerard Vermeulen 2022-02-21 15:56:27 +01:00
parent 69e355d1d5
commit a3f825e61b
1 changed files with 50 additions and 11 deletions

View File

@ -1,6 +1,6 @@
#+title: Emacs setup for use with LaTeX, Org, and Python
#+author: Gerard Vermeulen
#+latex_class: article
#+latex_class: article-1+2+3
#+latex_class_options: [11pt,a4paper,english,svgnames,tables]
#+setupfile: "setup-include.org"
#+include: "setup-include.org"
@ -1750,7 +1750,11 @@ this broken function (broken, since it relies on support only in org-mode before
;; Reverse to go upwards to avoid wrecking the list of
;; block positions in the file that would occur in case
;; of going downwards.
(reverse blocks))))))
(reverse blocks)))))
;; Push the filter on the hook.
(cl-pushnew #'org-latex-header-blocks-filter
org-export-before-parsing-hook))
#+end_src
This file uses the new way, while keeping the old way for backwards
@ -1815,8 +1819,8 @@ the tools for the [[https://orgmode.org/][Org mode]] =kbd= macro in [[file:setup
,#+startup: content
#+end_src
#+caption[Define the tools of the org-mode =kbd= macro]:
#+caption: Define the tools for the org-mode =kbd= macro.
#+caption[Define the tools of the =Org-mode= =kbd= macro]:
#+caption: Define the tools for the =Org-mode= =kbd= macro.
#+name: lst:by-backend-kbd-org-macro
#+begin_src emacs-lisp
(with-eval-after-load 'ox
@ -1832,15 +1836,50 @@ the tools for the [[https://orgmode.org/][Org mode]] =kbd= macro in [[file:setup
#+end_src
Listing [[lst:use-latex-header-1]], [[lst:use-latex-header-2]], [[lst:use-latex-header-3]],
and [[lst:use-latex-header-4]] tangle into the [[file:setup-include.org][setup-include.org]] file in order to
create the [[https://www.latex-project.org/][LaTeX]] preamble.
[[lst:use-latex-header-4]], and [[lst:use-latex-header-5]] tangle into the
[[file:setup-include.org][setup-include.org]] file in order to create the [[https://www.latex-project.org/][LaTeX]] preamble.
#+caption[LaTeX preamble: language, lists and floats]:
#+caption: LaTeX preamble: language, lists and floats.
#+caption[LaTeX preamble: replacing the =Org-mode= default packages]:
#+caption: LaTeX preamble: replacing the =Org-mode= default packages.
#+name: lst:use-latex-header-1
#+begin_src org
,#+begin_src latex-header
% LuaLaTeX-, PdfLaTeX-, or XeTeX-COMPILER COMPATIBILITY:
% Prevent collisions by using font packages before compiler specific packages.
\usepackage{ifthen,ifluatex,ifxetex}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pifont} % check mark (\ding{52}) and cross mark (\ding{56})
\usepackage{textcomp} % \texttimes
\usepackage{wasysym} % \diameter
\ifthenelse{\boolean{luatex}}{
\usepackage{fontspec} % lualatex
\usepackage{unicode-math} % lualatex
}{\ifthenelse{\boolean{xetex}}{
\usepackage{mathspec} % xetex
}{
\usepackage[T1]{fontenc} % pdflatex
\usepackage[utf8]{inputenc} % pdflatex
}
}
% Org-mode REQUIREMENTS:
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{capt-of}
\usepackage{hyperref}
,#+end_src
#+end_src
#+caption[LaTeX preamble: language, lists and floats]:
#+caption: LaTeX preamble: language, lists and floats.
#+name: lst:use-latex-header-2
#+begin_src org
,#+begin_src latex-header
% LANGUAGE:
\usepackage{babel}
\usepackage{fvextra}
@ -1875,7 +1914,7 @@ create the [[https://www.latex-project.org/][LaTeX]] preamble.
#+caption[LaTeX preamble: page layout]:
#+caption: LaTeX preamble: page layout.
#+name: lst:use-latex-header-2
#+name: lst:use-latex-header-3
#+begin_src org
,#+begin_src latex-header
% PAGE LAYOUT:
@ -1900,7 +1939,7 @@ create the [[https://www.latex-project.org/][LaTeX]] preamble.
#+caption[LaTeX preamble: float barriers]:
#+caption: LaTeX preamble: float barriers.
#+name: lst:use-latex-header-3
#+name: lst:use-latex-header-4
#+begin_src org
,#+begin_src latex-header
% FLOAT BARRIERS:
@ -1929,7 +1968,7 @@ create the [[https://www.latex-project.org/][LaTeX]] preamble.
#+caption[LaTeX preamble: fancy headers and footers]:
#+caption: LaTeX preamble: fancy headers and footers.
#+name: lst:use-latex-header-4
#+name: lst:use-latex-header-5
#+begin_src org
,#+begin_src latex-header
% FANCY HEADERS AND FOOTERS: