LaTex in spacemacs
Steps in short
- Install latexmk:
sudo dnf install latexmk - Add latex layer to spacemacs:
SPC f e dto open the~.spacemacsfile;- add
latexto thedotspacemacs-configuration-layers variable; SPC f e Rto download layer and apply changes.
- Open a .tex file and compile a pdf with
, borlatex/build
If you, like me, enjoy working with 2 windows with code in the first one and the resulting pdf in the second one then do this:
- Open a .tex file:
C-x C-f - Divide your window in two:
SPC w / - Go to the second window and open a pdf that you just build there.
If you see pdf as plan text - enable
doc-view-mode - Change the .tex, press
, bto rebuild and see changes applied in the second window.

it's a png so zoon in
Pro tip: regulate the width of both screens with going into window-transient-state (SPC w ,) and pressing [ and ].
Story behind
I like compiling things and having my documents version-controlled, that’s why I like tex. I tried TexMaker and TexStudio but they both have funny UI. I use spacemacs for my day-to-day, so I tried to give it a shot. Turned out it’s quite decent.