Open6

Latex+VS Code, Mac

tishii2479tishii2479

Install brew

https://brew.sh/index_ja

$ /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
tishii2479tishii2479

.latexmkrc

https://pyteyon.hatenablog.com/entry/2019/12/24/225305

#!/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"
tishii2479tishii2479

textlint

install npm

https://qiita.com/joh_luck/items/36d04b33bd5a73756451

$ 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,
  }
}