5.2 KiB
Table of Contents
This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources.
Installation
Different ways to install:
-
If
emacs-confis available in acustompacmanrepositorypacman -S emacs-conf ln /opt/emacs-conf/init ~/.config/emacs/ ln /opt/emacs-conf/early-init.el ~/.config/emacs/ -
Download or clone git repo and point the emacs
init(andearly-init.el) file to this configuration. -
(Old) Run one of the following install script commands (using curl, wget or fetch).
sh -c "$(curl -fsSL http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" sh -c "$(wget -O- http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" sh -c "$(fetch -o - http://gitea.weseng.de/daniel/emacs/raw/master/scripts/install.sh)"Installation path is
~/.config/emacs. See details and other installed linux packages as requirements insidesripts/install.sh.
External programs
ripgrep(optional) used bycounsel-rg(packagecounsel)
Usage
See the emacs command my-help for some key-bindings and further
commands and information.
- Org Templates
- Article:
?article[TAB]/ YASnippet - org-mode - Article Templates - Article - Letter:
?letter[TAB]/ YASnippet - org-mode - Letter Templates - Letter
- Article:
- Org Export
- To Article HTML (extended version)
my-org-article-html-export-to-html/ My - Org Export - Article HTMLmy-org-article-html-export-to-html-notify-async(F5) / My - Org Export - Article HTML async
- To Article PDF (LaTeX, extended version)
my-org-article-latex-export-to-pdf/ My - Org Export - Article PDFmy-org-article-latex-export-to-pdf-notify-async(F6) / My - Org Export - Article PDF async
- To Letter (LaTeX)
my-org-letter-latex-export-to-pdf(C-c C-e l t)
- To Article HTML (extended version)
Packages
General key bindings and functions
C-r(query-replace-regexp) replace textC-x RET f(set-buffer-file-coding-system) e.g. set to =utf-8- (
decode-coding-region) e.g. decode toutf-8(e.g. 晴天) - (
diff-buffer-with-file) show a diff between buffer (current state) and file (saved state)
Information
Interlock symlinks and auto-save files. Be aware that symbolic links of the form “.#*” are not auto-save files but interlocks to prevent the simultaneous editing of the same file. See Interlocking in the EmacsManual for details.
Errors
- failed execution of bibtex2html
- see bib2htmlxxxxxx.blg for errors, e.g.
- I couldn’t open style file acmu.bst
- copy/merge the texmf directory into your home directory.
- see bib2htmlxxxxxx.blg for errors, e.g.
- when using this in an Org mode buffer:
#+HEADER: :fit yes :imagemagick yes :iminoptions -density 300- can leads to:
convert: attempt to perform an operation not allowed by the security policy `gs' @ error/delegate.c/ExternalDelegateCommand/378.convert: no images defined `DESY_logo_tikz.png' @ error/convert.c/ConvertImageCommand/3282.
- edit
/etc/ImageMagick-7/policy.xmland comment out<policy domain="delegate" rights="none" pattern="gs" />
- can leads to:
TODOs
- Org / global configuration
- Page formatting
- Modify HTML styling
- Printed page layout, white styled figures
- Modify HTML styling
- Page formatting
- Figures
- Gnuplot
- plot transposed files/tables
- Gnuplot
- Tables
- Wrap Table in div element. For smartphone scrolling.
- Table of contents
\LaTeX; currently headers with no-number property means not included in TOC- HTML; currently generated list, like lot and lol, are not included in toc but own headers without numbers are.
- Equation cancel/strike out with color line
- hcancel[color]{}
- Example:
\(\hcancel[red]{f_{X_2}(x_2)}}\) - Definition:
-
Preamble:
#+LATEX_HEADER: \usepackage{cancel}
#+LATEX_HEADER: \newcommand\hcancel[2][black]{\setbox0=\hbox{$#2$}%
#+LATEX_HEADER: \rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{1pt}}}}#2} -
hcancel: [\"{\\\\setbox0=\\\\hbox{$#2$}\\\\rlap{\\\\raisebox{.45\\\\ht0}{\\\\textcolor{#1}{\\\\rule{\\\\wd0}{1pt}}}}#2}\",2]MathJax.Ajax.config.path[\"Contrib\"] = \"https://cdn.mathjax.org/mathjax/contrib\"; MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () { MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{ cancel: [\"Extension\",\"cancel\"], bcancel: [\"Extension\",\"cancel\"], xcancel: [\"Extension\",\"cancel\"], cancelto: [\"Extension\",\"cancel\"] }); });
-