How to Latex

Installing

brew install --cask mactex-no-gui
sudo tlmgr update --self --all

Exporting org files

<C-c> <C-e> then ll

typesetting

the raw commands will be the following, but the the latexmk makes this obsolete.

uplatex latex_test && dvipdfmx latex_test.dvi

using latexmk

$latex = 'uplatex';
$latex_silent = 'uplatex -interaction=batchmode';
$dvi_previewer = 'start dviout';
$dvipdf = 'dvipdfmx %O -o %D %S';
$pdf_previewer = 'open -a Preview %S';
$preview_continuous_mode = 1;
$pdf_mode = 3;
$pdf_update_method = 4;

below will start a server that watches the .tex file

latexmk -pvc -pdf <filename>

cleaning latex

Note that .tex and .pdf is .gitignored.

find . -depth 1 -type f | rg -v '.org$|.tex$|.pdf$' | xargs rm

Citations

奥村先生の本(奥村, 晴彦 and 黒木, 裕介, 2017)

奥村, 晴彦 and 黒木, 裕介 (2017). LATEX2ε美文書作成入門, 技術評論社.

Date: 2022-03-21 Mon 19:04