VS CodeでLatexを使うときに設定したメモ。Latex関連以外の拡張機能も追加している。
-
- Tex Liveのインストール。以下のサイトから install-tl-windows.exeをダウンロード実行する。ダブルクリックするとインストーラが起動するので指示に従ってインストールする。インストールに時間がかかるので気長に待つ.私の光回線環境でも1時間6分かかった.
- VS Codeの拡張機能に追加
- Japanese language pack for Visual Studio Code
- Latex Workshop
- Awesome Emacs Keymap
- Markdown Preview Enhanced
- Zenkaku
- これがおすすめかどうかよくわからないが、VS CodeのSettings.jsonは次のとおり.
- VS Codeの拡張機能に追加
{
"terminal.integrated.fontSize": 16,
"editor.fontFamily": "Ricty Diminished",
//"Atom One Dark"で気に入らない部分を変更
"editor.tokenColorCustomizations": {
//変数
"variables": "#f8f8f8",
//コメントアウト
"comments": {
"foreground": "#7ACC7A",
},
//if,for文など
"keywords": {
"fontStyle": "bold"
},
},
//tabの空欄の大きさ
"editor.tabSize": 2,
//拡張機能を自動更新
"C_Cpp.updateChannel": "Insiders",
//新規ファイルはUntitledでファイル作成
"workbench.startupEditor": "newUntitledFile",
//texの設定
"latex-workshop.hover.preview.newcommand.parseTeXFile.enabled": true,
//自動アプデをしない
"extensions.autoUpdate": false,
//texのコンパイル設定
"latex-workshop.latex.recipes": [
{
"name": "ptex2pdf",
"tools": [
"ptex2pdf" //タイプセットに使うtoolの名前
]
},
{
"name": "bibtex",
"tools": [
"bibtex" //タイプセットに使うtoolの名前
]
}
],
"latex-workshop.latex.tools": [ //タイプセットに使うtool一覧
{
"name": "ptex2pdf",
"command": "ptex2pdf",
"args": [
"-l",
"-ot",
"-kanji=utf8 -synctex=1",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "pbibtex",
"args": [
"%DOC%"
]
}
],
// 保存時のコンパイルを無効にする
"latex-workshop.latex.autoBuild.run": "never"
//texのコンパイルpdfをどこに表示するか
"latex-workshop.view.pdf.viewer": "tab",
// サイドバーの位置
"workbench.sideBar.location": "left",
//デフォルトのターミナルをshellにする(windows)
"terminal.integrated.shell.windows": "C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps\\ubuntu.exe",
//VSCodeからの警告通知を無視しない
"extensions.ignoreRecommendations": false,
//ファイル削除時に確認しない
"explorer.confirmDelete": false,
//画面サイズは前回の大きさを引き継ぐ
"window.newWindowDimensions": "inherit",
// 空白文字列の表示
"editor.renderWhitespace": "boundary",
//新しいファイルは別タブで開く
"workbench.editor.enablePreview": false,
//リポジトリからの変更を定期的に更新
"git.autofetch": true,
//Debug処理中にエラーが起きても続行
"debug.onTaskErrors": "debugAnyway",
//スペース部分の変更も無視しない
"diffEditor.ignoreTrimWhitespace": false,
//提案リストの最初の選択肢を選択
"editor.suggestSelection": "first",
//Visual Studio IntelliCodeの設定
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
//カラーテーマ
"workbench.colorTheme": "Atom One Dark",
//フォーマッタの起動
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false,
//gitの忠告無視
"git.ignoreLegacyWarning": true,
"files.autoGuessEncoding": true,
"editor.wordWrap": "on",
"git.enableSmartCommit": true,
"latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false,
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
"workbench.editor.untitled.hint": "hidden",
"window.zoomLevel": 1
}
終わり


コメント