LaTeXの設定備忘録
投稿日: 更新日:
LaTeX環境設定備忘録
普段使っているlatexmkの設定等の備忘録です
エンジンはLuaLaTeXを使っています。また、pdf生成後に一時ファイルを消すように設定しています。
Latexmk
.latexmkrc
の内容
$latex = 'lualatex -synctex=1 -interaction=nonstopmode %O %S';
$pdf_mode = 4;
$max_repeat = 5;
$bibtex_use = 2;
$bibtex = 'pbibtex %O %B';
$clean_ext = 'aux log out toc synctex.gz bbl blg';
VSCodeのtools、recipes
tools
の内容
[
{
"name": "LuaLaTeX latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "latexmk clean",
"command": "latexmk",
"args": [
"-c",
]
}
],
recipes
の内容
[
{
"name": "LuaLaTeX",
"tools": ["LuaLaTeX latexmk", "latexmk clean"],
}
]
LaTeXのテンプレート
\documentclass[titlepage, 11pt]{ltjsarticle}
\usepackage{amsmath, amssymb}
\usepackage{listings, xcolor}
\usepackage{graphicx}
\usepackage{float}
\usepackage{bm}
\parindent = 0pt
\lstset{
basicstyle = {\ttfamily}, % 基本的なフォントスタイル
frame = {tbrl}, % 枠線の枠線。t: top, b: bottom, r: right, l: left
breaklines = true, % 長い行の改行
numbers = left, % 行番号の表示。left, right, none
showspaces = false, % スペースの表示
showstringspaces = false, % 文字列中のスペースの表示
showtabs = false, % タブの表示
keywordstyle = \color{blue}, % キーワードのスタイル。intやwhileなど
commentstyle = {\color[HTML]{1AB91A}}, % コメントのスタイル
identifierstyle = \color{black}, % 識別子のスタイル 関数名や変数名
stringstyle = \color[HTML]{5F4129} % 文字列のスタイル
}
\begin{document}
\end{document}