Q&A
前提・実現したいこと
現在、MacBookでLaTeXで文章を書くための環境を構築しています。
これまではLaTeXで文章を作成してことがなかったのですが、VS codeはエディターとして気に入っているため、ここでLaTexを作成できるようにQiitaの「VSCode で最高の LaTeX 環境を作る」を参考にインストールを進めています。下記のような出力が得られるためインストール自体は完了していると考えています。
しかし、実際にサイトに従い、ビルトとプレビューをしようとすると多数のエラーが発生し、プレビューできません。1行目からエラーが出ているため、インストールしているもの足りない可能性もあると思うのですが、知識があまりなく検討もつきません。教えて頂けると幸いです。
コンパイル時にplatex dvipdfmxの順を踏めばpdfに正しく表示されるため、.latexmkrcかsetting.jsonのどちらがが怪しいと考えています。
% latex --version pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019) kpathsea version 6.3.1 Copyright 2019 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.36; using libpng 1.6.36 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.01 % latexmk Latexmk: This is Latexmk, John Collins, 17 March 2019, version: 4.63b. Latexmk: No file name specified, and I couldn't find any Use latexmk -help to get usage information
発生している問題・エラーメッセージ
出力されない
該当のソースコード
latexmkrc
1#!/usr/bin/env perl 2 3# LaTeX 4$latex = 'platex -synctex=1 -halt-on-error -file-line-error %O %S'; 5$max_repeat = 5; 6 7# BibTeX 8$bibtex = 'pbibtex %O %S'; 9$biber = 'biber --bblencoding=utf8 -u -U --output_safechars %O %S'; 10 11# index 12$makeindex = 'mendex %O -o %D %S'; 13 14# DVI / PDF 15$dvipdf = 'dvipdfmx %O -o %D %S'; 16$pdf_mode = 3; 17 18# preview 19$pvc_view_file_via_temporary = 0; 20if ($^O eq 'linux') { 21 $dvi_previewer = "xdg-open %S"; 22 $pdf_previewer = "xdg-open %S"; 23} elsif ($^O eq 'darwin') { 24 $dvi_previewer = "open %S"; 25 $pdf_previewer = "open %S"; 26} else { 27 $dvi_previewer = "start %S"; 28 $pdf_previewer = "start %S"; 29} 30 31# clean up 32$clean_full_ext = "%R.synctex.gz"
settingjson
1{ 2 "workbench.iconTheme": "vscode-icons", 3 "editor.suggestSelection": "first", 4 "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", 5 "python.jediEnabled": false, 6 "files.autoSave": "afterDelay", 7 "window.zoomLevel": -1, 8 "vsicons.dontShowNewVersionMessage": true, 9 "C_Cpp.updateChannel": "Insiders" 10} 11{ 12 // ---------- Language ---------- 13 14 "[tex]": { 15 // スニペット補完中にも補完を使えるようにする 16 "editor.suggest.snippetsPreventQuickSuggestions": false, 17 // インデント幅を2にする 18 "editor.tabSize": 2 19 }, 20 21 "[latex]": { 22 // スニペット補完中にも補完を使えるようにする 23 "editor.suggest.snippetsPreventQuickSuggestions": false, 24 // インデント幅を2にする 25 "editor.tabSize": 2 26 }, 27 28 "[bibtex]": { 29 // インデント幅を2にする 30 "editor.tabSize": 2 31 }, 32 33 34 // ---------- LaTeX Workshop ---------- 35 36 // 使用パッケージのコマンドや環境の補完を有効にする 37 "latex-workshop.intellisense.package.enabled": true, 38 39 // 生成ファイルを削除するときに対象とするファイル 40 // デフォルト値に "*.synctex.gz" を追加 41 "latex-workshop.latex.clean.fileTypes": [ 42 "*.aux", 43 "*.bbl", 44 "*.blg", 45 "*.idx", 46 "*.ind", 47 "*.lof", 48 "*.lot", 49 "*.out", 50 "*.toc", 51 "*.acn", 52 "*.acr", 53 "*.alg", 54 "*.glg", 55 "*.glo", 56 "*.gls", 57 "*.ist", 58 "*.fls", 59 "*.log", 60 "*.fdb_latexmk", 61 "*.snm", 62 "*.nav", 63 "*.dvi", 64 "*.synctex.gz" 65 ], 66 67 // 生成ファイルを "out" ディレクトリに吐き出す 68 "latex-workshop.latex.outDir": "out", 69 70 // ビルドのレシピ 71 "latex-workshop.latex.recipes": [ 72 { 73 "name": "latexmk", 74 "tools": [ 75 "latexmk" 76 ] 77 }, 78 ], 79 80 // ビルドのレシピに使われるパーツ 81 "latex-workshop.latex.tools": [ 82 { 83 "name": "latexmk", 84 "command": "latexmk", 85 "args": [ 86 "-silent", 87 "-outdir=%OUTDIR%", 88 "%DOC%" 89 ], 90 }, 91 ], 92}
試したこと
いろいろなサイトを閲覧して試してみましたが一向に解決の気配がしません。
補足情報(FW/ツールのバージョンなど)
MacBook
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2020/04/02 07:07
2020/04/02 07:23 編集
2020/04/02 07:23
2020/04/02 07:29
2020/04/02 08:18
2020/04/02 08:27 編集
2020/04/02 08:29
2020/04/02 08:40
2020/04/02 08:42