Some notes on how to use this wild setup.
LaTeX support is pretty good! If you can manage to make an equation:
\begin{equation} Γ[q] \end{equation}
Then you can type `C-c ‘` inside the block, and you’ll get to the SAME environment you would have found if you’d inserted an actual LaTeX block.
That is a nicer way to work, honestly, because then inline previewing works too.
I’ve cloned this repository into my ~~/.spacemacs.d~. To get these to work in LaTeX, I had to:
- place the contents of the
snippets
folder that repo intosnippets/text-mode
mkdir org-mode latex-mode
- Copy the dotfiles from the text-mode folder into each subfolder:
cp text-mode/.yas-parents latex-mode
cp text-mode/.yas-make-groups latex-mode
cp text-mode/.yas-ignore-filenames-as-triggers latex-mode
mv text-mode/.yas-parents org-mode
mv text-mode/.yas-make-groups org-mode
mv text-mode/.yas-ignore-filenames-as-triggers org-mode
This makes the snippets accessible. Now that I have this, I can type eq
, then
at the end type M-/
for hippie-expand
and get a nice equation block. So
good!
I’ve also added the auto-completion layer to get this going:
(auto-completion :variables
auto-completion-return-key-behavior 'complete
auto-completion-tab-key-behavior 'complete
auto-completion-enable-snippets-in-popup t)
I haven’t done this yet, but it would be excellent to be able to set up references using Reftex. I’ve never done this properly. Nice opportunity here, when I already have a number of references to other guides that I want to share.
cdlatex is the answer here. This is not so bad right now, I can always go into the latex context, but this might make it more natural.