annotate README.md @ 31:a1abb0cd88cb

dir fig
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Thu, 18 Jan 2024 17:33:14 +0900
parents 18eff4ddae61
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ## How to build tex
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
3 1. Create an environment in which `latexmk` can run.
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 2. Add the following to the VSCode configuration JSON.
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 ```
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 {
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
8 // ---------- Language ----------
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
9
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 "[tex]": {
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
11 // スニペット補完中にも補完を使えるようにする
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 "editor.suggest.snippetsPreventQuickSuggestions": false,
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
13 // インデント幅を2にする
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
14 "editor.tabSize": 2
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
15 },
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
16
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
17 "[latex]": {
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
18 // スニペット補完中にも補完を使えるようにする
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
19 "editor.suggest.snippetsPreventQuickSuggestions": false,
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
20 // インデント幅を2にする
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 "editor.tabSize": 2
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 },
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
23
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 "[bibtex]": {
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
25 // インデント幅を2にする
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 "editor.tabSize": 2
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 },
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
28
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
29
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
30 // ---------- LaTeX Workshop ----------
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
31
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
32 // 使用パッケージのコマンドや環境の補完を有効にする
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 "latex-workshop.intellisense.package.enabled": true,
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
34
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
35 // 生成ファイルを削除するときに対象とするファイル
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
36 // デフォルト値に "*.synctex.gz" を追加
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
37 "latex-workshop.latex.autoClean.run": "onBuilt",
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 "latex-workshop.latex.clean.fileTypes": [
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 "*.aux",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 "*.bbl",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 "*.blg",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 "*.idx",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 "*.ind",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 "*.lof",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 "*.lot",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 "*.out",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 "*.toc",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 "*.acn",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 "*.acr",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 "*.alg",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 "*.glg",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 "*.glo",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 "*.gls",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 "*.ist",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 "*.fls",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 "*.log",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 "*.fdb_latexmk",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 "*.snm",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 "*.nav",
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 "*.dvi",
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
61 "*.ilg",
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 "*.synctex.gz"
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 ],
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
64
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
65 // 生成ファイルを現在のディレクトリに吐き出す
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
66 "latex-workshop.latex.outDir": "",
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
67
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
68 // ビルドのレシピ
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
69 "latex-workshop.latex.recipes": [
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
70 {
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
71 "name": "latexmk",
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
72 "tools": [
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
73 "latexmk"
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
74 ]
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
75 },
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
76 ],
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
77
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
78 // ビルドのレシピに使われるパーツ
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 "latex-workshop.latex.tools": [
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 {
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
81 "name": "latexmk",
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
82 "command": "latexmk",
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 "args": [
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
84 "-silent",
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
85 "-outdir=%OUTDIR%",
3
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 "%DOC%"
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 ],
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 },
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 ],
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 }
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 ```
99e8f2f1a24b add README
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
7
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
93 1. Add following the .latexmk files in home dir.
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
94
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
95 ```
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
96 #!/usr/bin/env perl
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
97
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
98 # LaTeX
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
99 $latex = 'platex -synctex=1 -halt-on-error -file-line-error %O %S';
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
100 $max_repeat = 5;
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
101
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
102 # BibTeX
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
103 $bibtex = 'pbibtex %O %S';
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
104 $biber = 'biber --bblencoding=utf8 -u -U --output_safechars %O %S';
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
105
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
106 # index
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
107 # $makeindex = 'mendex %O -o %D %S';
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
108
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
109 # DVI / PDF
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
110 $dvipdf = 'dvipdfmx %O -o %D %S';
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
111 $pdf_mode = 3;
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
112
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
113 # preview
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
114 $pvc_view_file_via_temporary = 0;
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
115 if ($^O eq 'linux') {
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
116 $dvi_previewer = "xdg-open %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
117 $pdf_previewer = "xdg-open %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
118 } elsif ($^O eq 'darwin') {
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
119 $dvi_previewer = "open %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
120 $pdf_previewer = "open %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
121 } else {
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
122 $dvi_previewer = "start %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
123 $pdf_previewer = "start %S";
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
124 }
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
125
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
126 # clean up
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
127 $clean_full_ext = "%R.synctex.gz"
18eff4ddae61 fix readme
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
128 ```