Skip to content
Snippets Groups Projects
Commit e26966cd authored by Michael Hauspie's avatar Michael Hauspie
Browse files

Indent...

parent e9215415
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#+author: Michaël Hauspie #+author: Michaël Hauspie
#+email: michael.hauspie@univ-lille.fr #+email: michael.hauspie@univ-lille.fr
#+language: en #+language: en
#+options: header-args :results none
Some of my configuration entries where borrowed from other people, see Some of my configuration entries where borrowed from other people, see
[[*Acknowledgment][Acknowledgment]] section for a list. [[*Acknowledgment][Acknowledgment]] section for a list.
...@@ -254,6 +255,13 @@ Define a shortcut to re-indent all buffer. This saves the current point, marks w ...@@ -254,6 +255,13 @@ Define a shortcut to re-indent all buffer. This saves the current point, marks w
#+RESULTS: #+RESULTS:
: mh/indent-buffer : mh/indent-buffer
Set the line width for fill command
#+begin_src emacs-lisp
(setq-default fill-column 100)
#+end_src
** Undo on steroids ** Undo on steroids
Manage undo as a tree so that we can undo/redo more. Bound by default on =C-x u= Manage undo as a tree so that we can undo/redo more. Bound by default on =C-x u=
...@@ -493,10 +501,11 @@ Add shortcuts to quickly add code blocks using =C-,= ...@@ -493,10 +501,11 @@ Add shortcuts to quickly add code blocks using =C-,=
Use =latexmk= to export to Latex Use =latexmk= to export to Latex
#+begin_src emacs-lisp :exports code #+begin_src emacs-lisp :exports code
(setq org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -pdf %f")) (setq org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f"))
#+end_src #+end_src
Use =org-ref= for citation Use =org-ref= for citation
#+begin_src emacs-lisp #+begin_src emacs-lisp
...@@ -514,6 +523,21 @@ And use the same shortcut for =org-reftex-citation= than for =reftex-citation= ...@@ -514,6 +523,21 @@ And use the same shortcut for =org-reftex-citation= than for =reftex-citation=
#+RESULTS: #+RESULTS:
: org-reftex-citation : org-reftex-citation
Define a document class that do not use parts and start with chapters
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("book-noparts"
"\\documentclass{book}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src
** Visuals ** Visuals
Use bullets instead of asterisks Use bullets instead of asterisks
...@@ -685,19 +709,14 @@ using bootstrap template. ...@@ -685,19 +709,14 @@ using bootstrap template.
#+RESULTS: #+RESULTS:
So that code highlighting can be done using [[https://www.ctan.org/pkg/minted][minted]] (which uses Configure code highlighting using [[https://www.ctan.org/pkg/minted][minted]] (which uses
[[https://pygments.org/][Pygments]] as an external tool), we need to change latex export commands. [[https://pygments.org/][Pygments]] as an external tool) for latex export
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; Configure ox-latex to export source block using minted ;; Configure ox-latex to export source block using minted
;; Setting minted cache to false as cache seems to fail when changing the output-directory ;; Setting minted cache to false as cache seems to fail when changing the output-directory
(add-to-list 'org-latex-packages-alist '("cache=false" "minted")) (add-to-list 'org-latex-packages-alist '("cache=false" "minted"))
(setq org-latex-listings 'minted) (setq org-latex-listings 'minted)
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
#+end_src #+end_src
For HTML source code highlight, use =htmlize= For HTML source code highlight, use =htmlize=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment