Open6
Latex+VS Code, Mac
Install brew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
$ source ~/.zprofile
$ brew --version
Install vscode
$ brew install --cask visual-studio-code
.latexmkrc
#!/usr/bin/env perl
# LaTeX
$latex = 'platex -synctex=1 -halt-on-error -file-line-error %O %S';
$max_repeat = 5;
# BibTeX
$bibtex = 'pbibtex %O %S';
$biber = 'biber --bblencoding=utf8 -u -U --output_safechars %O %S';
# index
$makeindex = 'mendex %O -o %D %S';
# DVI / PDF
$dvipdf = 'dvipdfmx %O -o %D %S';
$pdf_mode = 3;
# preview
$pvc_view_file_via_temporary = 0;
if ($^O eq 'linux') {
$dvi_previewer = "xdg-open %S";
$pdf_previewer = "xdg-open %S";
} elsif ($^O eq 'darwin') {
$dvi_previewer = "open %S";
$pdf_previewer = "open %S";
} else {
$dvi_previewer = "start %S";
$pdf_previewer = "start %S";
}
# clean up
$clean_full_ext = "%R.synctex.gz"
vscode
install extension latex-workshop
vscode/settings.json
// ---------- LaTeX Workshop ----------
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": ["latexmk"]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": ["-silent", "-outdir=%OUTDIR%", "%DOC%"]
}
]
textlint
install npm
$ brew install nodebrew
$ curl -L http://git.io/nodebrew | perl - setup
$ nodebrew install-binary stable
$ nodebrew use stable
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile
$ source ~/.zprofile
$ npm -v
.textlintrc
{
"plugins": ["latex2e"],
"rules": {
"preset-ja-technical-writing": {
"no-exclamation-question-mark": {
"allowFullWidthExclamation": true,
"allowFullWidthQuestion": true,
},
"no-doubled-joshi": {
"strict": false,
"allow": ["か"],
},
},
"preset-ja-spacing": {
"ja-space-between-half-and-full-width": false,
"ja-space-around-code": false,
},
"ja-technical-writing/ja-no-mixed-period": false,
"ja-technical-writing/sentence-length": false,
"ja-technical-writing/max-kanji-continuous-len": false,
"ja-technical-writing/max-comma": false,
}
}
todo:
saveOnFormat: true
にするとエラーが出る。