feat[latex,bash] Updated latex templates

I updated the latex templates and process.
I updated the mechanism for accessing bash and other shells.
This commit is contained in:
Judah Sotomayor 2024-01-26 18:27:26 -05:00
parent 476ab85aec
commit d28cd4d88e
Signed by: judahsotomayor
SSH Key Fingerprint: SHA256:9Dq4ppxhfAjbX+7HLXEt+ROMiIojI6kqQgUyFUJb9lI

View File

@ -38,13 +38,14 @@ Set the theme.
+I also prefer relative line numbers because of *evil* mode+
Relative line numbers don't seem to work, because of folding in Org-mode.
#+begin_src emacs-lisp
(setq doom-theme 'doom-one)
(setq doom-theme 'doom-homage-black)
(condition-case nil
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 16 :weight 'medium))
(error (set-face-attribute 'default nil :height 130)))
(setq auto-save-default nil) ;I don't like autosaving. Let me do it myself.
#+end_src
** Doom splash screen
I really don't like the widgets, and I think it takes longer to load so I get rid of them
#+begin_src emacs-lisp
@ -63,6 +64,8 @@ I want a non-ESC way to get back to normal mode:
(after! org-mode (map! :desc "Delete previous character in insert mode" :i "C-h" #'evil-delete-backward-char))
(map! :desc "Increment number below or after cursor" :n "C-a" #'evil-numbers/inc-at-pt)
(map! :desc "Decrement number below or after cursor" :n "C-x" #'evil-numbers/dec-at-pt)
(map! :n "g j" #'evil-next-visual-line)
(map! :n "g k" #'evil-previous-visual-line)
#+end_src
* Terminal setup
@ -72,13 +75,48 @@ I like to just use bash:
"Lauch term with /bin/bash"
(interactive)
(term "/bin/bash"))
(map!
:desc "Start a bash shell"
"<f6>" #'bash)
(defun dash nil
"Lauch term with /bin/dash"
(interactive)
(term "/bin/dash"))
(defun zsh nil
"Lauch term with /bin/zsh"
(interactive)
(term "/bin/zsh"))
#+end_src
I don't like the modeline in the terminal.
#+RESULTS:
: zsh
** Shell mappings
#+begin_src emacs-lisp
(map! :leader (:prefix ("k" . "shell")
:desc "Start a bash shell"
:n "b" #'bash
:desc "Start a dash shell"
:n "d" #'dash
:desc "Start a zsh shell"
:n "z" #'zsh
:desc "Start an elisp repl"
:n "e" #'+emacs-lisp/open-repl
:desc "Start a python repl"
:n "j" #'+python/open-repl))
#+end_src
#+RESULTS:
,#+RESULTS:
I don't like the modeline in the terminal.
,#+begin_src emacs-lisp
(add-hook 'term-mode-hook 'hide-mode-line-mode)
#+end_src
* Sage-math
@ -229,8 +267,9 @@ And then we want to call this before building the agenda:
*** Filtering the agenda
I don't want the agenda to show more than one day be default.
#+begin_src emacs-lisp
(after! org
(setq org-agenda-start-day "-8d")
(setq org-agenda-span 9)
(setq org-agenda-span 9))
#+end_src
#+RESULTS:
@ -295,17 +334,20 @@ Edna allows better dependency handling for todos and the like.
(org-habit-graph-column 1)
(org-habit-preceding-days 10)
(org-habit-following-days 1)
(org-habit-show-habits-only-for-today nil))
(org-habit-show-habits-only-for-today t))
#+end_src
** Anki editing in org-mode
Anki editor is a good one for large cards that need high complexity.
#+begin_src emacs-lisp :tangle packages.el
(package! anki-editor)
#+end_src
*** Configuring inline-anki
*** inline-anki
Inline anki is far better for small cards, and where it is best to maintain a /single source of truth/.
#+begin_src emacs-lisp :tangle packages.el
(package! asyncloop)
(package! inline-aki
@ -316,6 +358,18 @@ Edna allows better dependency handling for todos and the like.
(setq inline-anki-note-type "Katex and Markdown Cloze")
(setq inline-anki-use-tags t)
#+end_src
**** Inline Anki symbol
By default, [[*inline-anki][Inline-anki]] uses _underscore_ to specify the card type.
This is okay, but I'd rather find something that isn't already used.
#+begin_src emacs-lisp
(add-to-list 'org-emphasis-alist '("." nil))
(setq inline-anki-emphasis-type "_")
#+end_src
#+RESULTS:
: _
** calfw Calendar View
#+begin_src emacs-lisp :tangle "packages.el"
(package! calfw
@ -386,10 +440,7 @@ I've found that lualatex does a good job processing PDFs. $hi$
#+begin_src emacs-lisp
(after! ox-latex
(setq org-latex-pdf-process
'("lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f"
"lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f"))
)
'("lualatex --output-directory=/home/user/Documents -shell-escape -interaction nonstopmode %f")))
#+end_src
$x + 1 = 3$
@ -701,24 +752,41 @@ Org-roam enables features essential to a Zettelkasten such as inter-ID linking.
:init (setq org-roam-directory "~/org/")) :custom
#+end_src
I use several capture templates to make it easy to get notes into my various sections.
I only use [[#md-roam-config][Markdown]] in the team wiki, so I have it set to that.
I also have a capture template form my [[Website]]
#+begin_src emacs-lisp
(after! org-roam
:ensure t
:custom
(setq org-roam-capture-templates
`(
("d" "default" plain "%?"
:target (file+head "%<%Y%m%d-%H%M%S>.org"
"#+TITLE: ${title}\n")
:unnarrowed t)
`(
("d" "default" plain "%?"
:target (file+head "%<%Y%m%d-%H%M%S>.org"
"#+TITLE: ${title}\n")
:unnarrowed t)
("c" "encrypted" plain "%?"
:target (file+head "%<%Y%m%d-%H%M%S>.sec.org.age"
"#+TITLE: ${title}\n#+FILETAGS: :secure:noexport:\n#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"css/retro.css\" />\n\n\n* No Export Below This Line")
:unnarrowed t))))
("c" "encrypted" plain "%?"
:target (file+head "%<%Y%m%d-%H%M%S>.sec.org.age"
"#+TITLE: ${title}\n#+FILETAGS: :secure:noexport:\n\n* No Export Below This Line")
:unnarrowed t)
("m" "Markdown" plain ""
:target
(file+head "training-resources/content/${title}.md"
"---\ntitle: ${title}\nid: %<%Y-%m-%dT%H%M%S>\ncategory: \n---\n")
:unnarrowed t)
("w" "Website" plain "%?"
:target
(file+head "website/src/posts/%<%Y%m%d-%H%M%S>.org"
"#+TITLE: ${title}\n#+DRAFT: true\n")
:unnarrowed t))))
#+end_src
#+RESULTS:
| d | default | plain | %? | :target | (file+head %<%Y%m%d-%H%M%S>.org #+TITLE: ${title} |
*** Keybinds
Org-roam has many commands, of which I have bound the most important below.
This entails creating a local leader.
@ -789,7 +857,7 @@ I use =r= for this purpose. It is close and goes well with *roam*.
))))
#+END_SRC
**** Function to pull up org-roam ui
**** COMMENT Function to pull up org-roam ui
#+begin_src emacs-lisp
(defun open-org-roam-ui ()
(interactive)
@ -859,7 +927,23 @@ I want to be able to ignore headings on export.
:config
(ox-extras-activate '(latex-header-blocks ignore-headlines)))
#+end_src
*** Resume template
*** McDowell Resume Template
This template is supposed to be the standard.
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("mcdowellcv"
"\\documentclass[]{mcdowellcv}
\\usepackage{amsmath}
\\usepackage[]{multicol}
\\usepackage[hidelinks]{hyperref}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]"
("\\begin{cvsection}{%s}" "\\end{cvsection}")
("\\begin{cvsubsection}{%s}" "\\end{cvsubsection}")))
#+end_src
*** Altacv template :ARCHIVE:
This is no longer really used.
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("altacv" "\\documentclass[10pt,a4paper,ragged2e,withhyper]{altacv}
@ -905,33 +989,6 @@ I want to be able to ignore headings on export.
("\\cvsection{%s}" . "\\cvsection*{%s}")
("\\cvevent{%s}" . "\\cvevent*{%s}")))
#+end_src
*** McDowell Resume Template
This template is supposed to be the standard.
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("mcdowellcv"
"\\documentclass[]{mcdowellcv}
\\usepackage{amsmath}
\\usepackage[]{multicol}
\\usepackage[hidelinks]{hyperref}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")
("\\cvsection{%s}" . "\\cvsection*{%s}")
("\\cvevent{%s}" . "\\cvevent*{%s}")))
#+end_src
** Better EViL keybinds
*** Remapping =g-j/k=
#+begin_src emacs-lisp
(map! :n "g j" #'evil-next-visual-line)
(map! :n "g k" #'evil-previous-visual-line)
#+end_src
* Company-mode for great autocompletes
I don't really want company-mode to run on timeouts.
I want VIM-like autocompletion, where =C-x o= and friends gives me my autocompletion.
@ -960,6 +1017,9 @@ We need to bring in the correct SSH agent values, so that Emacs is aware of wher
#+end_src
* Md-roam
:PROPERTIES:
:CUSTOM_ID: md-roam-config
:END:
** Packages
#+begin_src emacs-lisp :tangle "packages.el"
(package! md-roam
@ -978,21 +1038,6 @@ We need to bring in the correct SSH agent values, so that Emacs is aware of wher
(setq md-roam-use-org-extract-ref nil)
(org-roam-db-autosync-mode 1))
#+end_src
** COMMENT Capture template for documentation
#+begin_src emacs-lisp
(add-to-list 'org-roam-capture-templates
'("m" "Markdown" plain ""
:target
(file+head "training-resources/content/${title}.md"
"---\ntitle: ${title}\nid: %<%Y-%m-%dT%H%M%S>\ncategory: \n---\n")
:unnarrowed t)
'("w" "Website" plain "%?"
:target
(file+head "website/src/posts/%<%Y%m%d-%H%M%S>.org"
"#+TITLE: ${title}\n#+DRAFT: true\n")
:unnarrowed t))
#+end_src
* Funny Stuff
** Spray
#+begin_src emacs-lisp