From 25a03bc77f39a5bd950b36a783df4ab65f0f9556 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Fri, 11 Mar 2022 15:58:47 +0100 Subject: [PATCH] Pimp latex export --- files/emacs/.emacs.d/init.org | 4 ++-- files/tmux/.tmux.conf | 11 ++++++----- files/zsh/.zshrc | 4 ++-- org/notes.org | 35 ++++++++++++++++++++++++++++++++++- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/files/emacs/.emacs.d/init.org b/files/emacs/.emacs.d/init.org index 51d75e7..14abe4a 100644 --- a/files/emacs/.emacs.d/init.org +++ b/files/emacs/.emacs.d/init.org @@ -247,7 +247,7 @@ I mainly use these fonts: + Noto Emoji to show emojis in emacs + Noto JP for japanese characters #+begin_src emacs-lisp :tangle yes -(set-face-attribute 'default nil :font "JuliaMono" :height 80) +(set-face-attribute 'default nil :font "JuliaMono" :height 100) (set-fontset-font t 'unicode "Noto Color Emoji" nil 'prepend) (set-fontset-font t 'unicode "Noto Sans Mono CJK JP" nil 'append) #+end_src @@ -588,7 +588,7 @@ Also fix math =utf8= chars. "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f") org-latex-inputenc-alist '(("utf8" . "utf8x")) org-latex-default-packages-alist (cons '("mathletters" "ucs" nil) org-latex-default-packages-alist) - org-format-latex-options (plist-put org-format-latex-options :scale 1.5)) + org-format-latex-options (plist-put org-format-latex-options :scale 0.5)) #+end_src For some reason =\alert= is misinterpreted in LaTeX. diff --git a/files/tmux/.tmux.conf b/files/tmux/.tmux.conf index 4205040..4c46bf5 100644 --- a/files/tmux/.tmux.conf +++ b/files/tmux/.tmux.conf @@ -6,9 +6,9 @@ set -g default-terminal "tmux-256color" # enable true color terminal set -ga terminal-overrides ",*256col*:Tc" -# new panes -bind-key -n M-v split-window -h -bind-key -n M-s split-window -v +# new panes (open with current path) +bind-key -n M-v split-window -h -c "#{pane_current_path}" +bind-key -n M-s split-window -v -c "#{pane_current_path}" # pane selection bind-key -n M-h select-pane -L @@ -16,11 +16,12 @@ bind-key -n M-j select-pane -D bind-key -n M-k select-pane -U bind-key -n M-l select-pane -R -# pane modifications +# pane / window modifications bind-key -n M-z resize-pane -Z +bind-key -n M-, command-prompt "rename-window '%%'" # new windows -bind-key -n M-c new-window +bind-key -n M-c new-window -c "#{pane_current_path}" # navigate windows bind-key -n M-1 select-window -t 1 diff --git a/files/zsh/.zshrc b/files/zsh/.zshrc index 615a55e..ee1ce1e 100644 --- a/files/zsh/.zshrc +++ b/files/zsh/.zshrc @@ -20,10 +20,10 @@ DIR="%{$fg[blue]%}%~" GIT="%{$fg[red]%}\$vcs_info_msg_0_" # if [[ -n "$SSH_CONNECTION" ]]; then - HOSTNAME="%B%{$fg[yellow]%}%m%b " + PC="%B%{$fg[yellow]%}%m%b " # fi -export PROMPT="${HOSTNAME}${DIR}${GIT} ${ICON}%{$reset_color%} " +export PROMPT="${PC}${DIR}${GIT} ${ICON}%{$reset_color%} " zstyle ':vcs_info:git:*' formats ' %b ' case $TERM in diff --git a/org/notes.org b/org/notes.org index f78ed36..936396d 100644 --- a/org/notes.org +++ b/org/notes.org @@ -2,6 +2,7 @@ #+LaTeX_CLASS_OPTIONS: [a4paper] #+LANGUAGE: de #+OPTIONS: toc:t +#+LATEX_HEADER: \date{\today} #+LATEX_HEADER: \usepackage{a4wide} #+LATEX_HEADER: \usepackage{mathtools} @@ -18,16 +19,48 @@ #+LATEX_HEADER: \usepackage{listings} #+LATEX_HEADER: \usepackage{color} #+LATEX_HEADER: \usepackage{proof} +#+LATEX_HEADER: \usepackage{xcolor} +%%% break page on new section +#+LATEX_HEADER: \usepackage{titlesec} +#+LATEX_HEADER: \newcommand{\sectionbreak}{\clearpage} + +%%% remove page numbers (fancyhdr provides its own) +#+LATEX_HEADER: \usepackage{nopageno} + +%%% fancy headers and footers +#+LATEX_HEADER: \usepackage{fancyhdr} +#+LATEX_HEADER: \pagestyle{fancy} +#+LATEX_HEADER: \fancyhf{} +#+LATEX_HEADER: \renewcommand{\headrulewidth}{1pt} +#+LATEX_HEADER: \fancyhead[L]{\rightmark} +#+LATEX_HEADER: \fancyhead[R]{\thepage} + +%%% theorem-style environments +% use `most` if you don't want the boxes +#+LATEX_HEADER: \usepackage[]{tcolorbox} + +% definition #+LATEX_HEADER: \theoremstyle{definition} #+LATEX_HEADER: \newtheorem{definition}{Definition}[section] +#+LATEX_HEADER: \tcolorboxenvironment{definition}{blanker,before skip=10pt,after skip=10pt} +% TODO: color boxes +% theorem #+LATEX_HEADER: \newtheorem{theorem}{Satz}[section] +#+LATEX_HEADER: \tcolorboxenvironment{theorem}{blanker,before skip=10pt,after skip=10pt} +% algorithm #+LATEX_HEADER: \theoremstyle{definition} #+LATEX_HEADER: \newtheorem{algo}{Algorithmus}[section] +#+LATEX_HEADER: \tcolorboxenvironment{algo}{blanker,before skip=10pt,after skip=10pt} +% remark #+LATEX_HEADER: \theoremstyle{definition} #+LATEX_HEADER: \newtheorem*{remark}{Bemerkung} +#+LATEX_HEADER: \tcolorboxenvironment{remark}{blanker,before skip=10pt,after skip=10pt} -#+LATEX_HEADER: \date{\today} +%%% code blocks +#+latex_header: \usepackage{minted} +#+latex_header: \usemintedstyle{friendly} +#+LATEX_HEADER: \tcolorboxenvironment{minted}{blanker,before skip=10pt,after skip=10pt}