質問用フォーラムです。ご質問の前に質問のしかたをご覧ください。

VScode で処理した際に出るエラーが理解できません

- 山下 山下 の投稿
こんにちは

VScode で TeX ファイルを処理したところ,エラーが出て作業が途中で止まります.

何となく makeindex 関係のトラブルではないかと思えるのですが,正確なところが理解できないため,ヒント等頂戴できればと存じます.

当方の設定は,PCは Windows 10 Home edition

TeX は TeX Live 2023 を minimal スキームでインストール.
チェックしたコレクションはLaTeX基本パッケージ,LaTeX推奨パッケージ,LuaTeXパッケージ,Windows専用プログラム(最初からチェックあり),必須プログラムとファイル(最初からチェックあり),推奨フォント,数学・自然科学・計算機科学パッケージ,画像と図表
普段は LuaLaTeX を使っています.

VScode の settings.json に追記した内容は
// レシピ
"latex-workshop.latex.recipes": [
{
"name": "latexmk (lualatex)",
"tools": [
"lualatexmk"
]
}
],
// レシピ用のパーツ
"latex-workshop.latex.tools": [
{
"name": "lualatexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {}
}
],

.latexmkrc の内容は
#!/usr/bin/env perl
$latex = 'lualatex -synctex=1 %O %S';
$bibtex = 'pbibtex %O %B';
$pdflatex = 'lualatex -shell-escape';
$makeindex = 'mendex %O -o %D %S';
$pvc_view_file_via_temporary = 0;
$max_repeat = 5;

以上です.この環境下で TeX ファイル

\documentclass[lualatex,a4j,9pt]{ltjsarticle}
\usepackage[haranoaji,bold,no-math,expert]{luatexja-preset}
\begin{document}
\begin{equation}
3+2=5\label{eq01}
\end{equation}
式(\ref{eq01})
\end{document}

をコンパイル(Build LaTeX project をクリック)したところ,まず途中で

Recipe terminated with error. Retry building the project.

という警告(黄色のビックリマーク)が出ます.しかし作業は続き,またしばらくして

Recepe terminated with error.

というメッセージ(赤い×)が出て,作業が止まります.この段階で一応 PDF ファイルはできていますが,相互参照は(??)となっています.

最後に,長くなりますが処理した際に出てきたログを写します.

Initial Win CP for (console input, console output, system): (CP932, CP932, CP932)
I changed them all to CP932
Rc files read:
  C:/Users/user1/.latexmkrc
  .latexmkrc
Latexmk: This is Latexmk, John Collins, 4 Apr. 2023. Version 4.80.
No specific requests made, so using default for latexmk.
No existing .aux file, so I'll make a simple one, and require run of *latex.
Latexmk: applying rule 'latex'...
Rule 'latex':  Reasons for rerun
Category 'other':
  Rerun of 'latex' forced or previously required

------------
Run number 1 of rule 'latex'
------------
------------
Running 'lualatex -synctex=1  -synctex=1 -interaction=nonstopmode -file-line-error -recorder  "c:/Users/user1/Desktop/TexliveVscode/Sample.tex"'
------------
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)
restricted system commands enabled.
(c:/Users/user1/Desktop/TexliveVscode/Sample.tex
LaTeX2e <2023-06-01>
L3 programming layer <2023-06-05>
(c:/texlive/2023/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
Document Class: ltjsarticle 2022/09/12 ltjsclasses
(c:/texlive/2023/texmf-dist/tex/luatex/luatexja/luatexja.sty (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/luatexja-core.sty (c:/texlive/2023/texmf-dist/tex/luatex/luatexbase/luatexbase.sty (c:/texlive/2023/texmf-dist/tex/luatex/ctablestack/ctablestack.sty)) (c:/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (c:/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (c:/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (c:/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty)) (c:/texlive/2023/texmf-dist/tex/latex/xkeyval/xkeyval.sty (c:/texlive/2023/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/texlive/2023/texmf-dist/tex/generic/xkeyval/xkvutils.tex (c:/texlive/2023/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (c:/texlive/2023/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (c:/texlive/2023/texmf-dist/tex/latex/everyhook/everyhook.sty (c:/texlive/2023/texmf-dist/tex/latex/svn-prov/svn-prov.sty)) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/ltj-base.sty) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/ltj-latex.sty (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty (c:/texlive/2023/texmf-dist/tex/latex/base/tuenc.def)) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
(c:/texlive/2023/texmf-dist/tex/luatex/luatexja/jfm-ujisv.lua)
(c:/texlive/2023/texmf-dist/tex/luatex/luatexja/jfm-ujis.lua)) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty (c:/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3.sty (c:/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-luatex.def))) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty (c:/texlive/2023/texmf-dist/tex/generic/iftex/ifluatex.sty)))) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty)) (c:/texlive/2023/texmf-dist/tex/platex/jsclasses/jslogo.sty)) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty (c:/texlive/2023/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty (c:/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec.sty (c:/texlive/2023/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (c:/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (c:/texlive/2023/texmf-dist/tex/latex/base/fontenc.sty) (c:/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty) (c:/texlive/2023/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-27c.sty))

Package luatexja-preset Warning: Japanese fonts will be scaled by 0.924715.


Package luatexja-fontspec Warning: \addjfontfeature(s) ignored;
(luatexja-fontspec)                it cannot be used with a font that wasn't
(luatexja-fontspec)                selected by luatexja-fontspec.

)

LaTeX Warning: Unused global option(s):
    [lualatex].

(./Sample.aux) (c:/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd)

LaTeX Warning: Reference `eq01' on page 1 undefined on input line 9.

[1{c:/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./Sample.aux)

LaTeX Warning: There were undefined references.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

)
840 words of node memory still in use:
  7 hlist, 1 vlist, 4 rule, 2 glue, 3 kern, 1 glyph, 151 attribute, 49 glue_spec, 22 attribute_list, 1 write, 9 user_defined nodes
  avail lists: 1:12,2:575,3:14,4:23,5:24,6:4,7:80,8:7,9:34
<c:/texlive/2023/texmf-dist/fonts/opentype/public/lm/lmroman10-bold.otf><c:/texlive/2023/texmf-dist/fonts/opentype/public/haranoaji/HaranoAjiMincho-Regular.otf><c:/texlive/2023/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf><c:/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on Sample.pdf (1 page, 14714 bytes).

SyncTeX written on Sample.synctex.gz.
Transcript written on Sample.log.
Latexmk: ===For rule 'latex', the extensions differ between the
  actual output file 'Sample.pdf',
  and the expected output 'Sample.dvi'.
  I could not accommodate the changed output extension
  (either because the configuration does not allow it
  or because there is a conflict with requested filetypes).
Latexmk: ====List of undefined refs and citations:
  Reference `eq01' on page 1 undefined on input line 9
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'c:/Users/user1/Desktop/TexliveVscode/Sample':
  Could not handle change of output extension
----------------------
Latexmk: If appropriate, the -f option can be used to get latexmk
  to try to force complete processing.
Latexmk: Getting log file 'Sample.log'
Latexmk: Examining 'Sample.fls'
Latexmk: Examining 'Sample.log'
Latexmk: References changed.
Latexmk: Log file says output to 'Sample.pdf'
Latexmk: Summary of warnings from last run of *latex:
  Latex failed to resolve 1 reference(s)
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  latex: failed to create output file

C:\texlive\2023\bin\windows\runscript.tlu:921: command failed with exit code 12:
perl.exe c:\texlive\2023\texmf-dist\scripts\latexmk\latexmk.pl -synctex=1 -interaction=nonstopmode -file-line-error -outdir=c:/Users/user1/Desktop/TexliveVscode c:/Users/user1/Desktop/TexliveVscode/Sample

この設定が間違っている,そもそも TeX Live インストール時に不足があったはず等のご指摘を賜れば幸いです.

山下


.bstを適当に修正して多分 crossref 相互参照

- 古島 健太 の投稿
前略失礼します.表題の件は

.bstを適当に修正してある文献項目から他の文献項目を参照した上で
文字列を組み合わせるにはどうすればいいですか?
下記の例でいうと  "  この項目は  文献 crossref    と同じ作家である  "
という文章にしたいのです.
crossref  が効いているのは確認済みですが組合せがうまくいかないのです.


\documentclass{jsarticle}
%使用例 
\begin{document}
      \nocite{*}
      \bibliographystyle{jplain}
      \bibliography{WithoutMath}
\end{document}

.bibファイルは以下
@book{カラマーゾフの兄弟,
        author = {ドストエフスキー}, editor = {小沼文彦訳},
        yomi = {ドストエフスキー},
        title = {カラマーゾフの兄弟},
        publisher = {筑摩書房},
        year = {2010},
        month={9},   
        note={小沼文彦訳},
        journal = {acmsc}
      }
@book{カラマーゾフ亀山郁夫,
        author = {ドストエフスキー}, editor = {亀山郁夫訳},
        yomi = {ドストエフスキー},
        title = {カラマーゾフの兄弟},
        publisher = {光文社},
        year = {2006},
        month={10},
        volume = {}, number = {},
        series = {古典新訳文庫}
      }

VSCODEでのコンパイル時のエラーについて

- 宜史 江田 の投稿
windows11 Homeのバージョン22H2、VSCODEでコンパイルをしたときに、かなりの高頻度で以下のエラーが発生します。環境構築については
https://qiita.com/passive-radio/items/623c9a35e86b6666b89e
というページに書いてあることをそっくりそのまま実行しました。

I can't write on file `SAGT.pdf'.
Please type another file name for output
c:/Users/takaf/TEX_TEST/SAGT.tex:51: Emergency stop.
...not:N \tex_shipout:D \box_use:N \l_shipout_box

[{
"resource": "/c:/Users/takaf/TEX_TEST/SAGT.tex",
"owner": "LaTeX",
"severity": 8,
"message": " ==> Fatal error occurred, no output PDF file produced!\nTranscript written on SAGT.log.\nLatexmk: Getting log file 'SAGT.log'\nLatexmk: Examining 'SAGT.fls'\nLatexmk: Examining 'SAGT.log'\nLatexmk: Errors, in force_mode: so I tried finishing targets\n------------\nRunning 'start start \"SAGT.pdf\"'\n------------\nCollected error summary (may duplicate other messages):\n",
"source": "LaTeX",
"startLineNumber": 51,
"startColumn": 1,
"endLineNumber": 51,
"endColumn": 65536
}]

一応コンパイルはできているのですが目次の部分が表示されず、またVSCODEを再起動したときに限り問題なくコンパイルできます。メッセージを頼りに色々調べてはみたのですが、良い情報は得られず、自分では何に問題があるのか皆目見当も付きません。どうか問題解決にご協力お願いします。

年を入れる 文献データベース year = {2006}

- 古島 健太 の投稿
すみません,またまた. 例えば @PROCEEDINGS {conference:06, editor = {エンゲルス}, booktitle = {Proceedings of the Xth Conference on XYZ}, year = {2006}, month = {October}, } の場合 year = {2006年} とするとエラーがでて𠮟られます. 2006年と印字させたいのですが.

目次ページを自由なデザインで作りたい

- 佐藤 清 の投稿
jlreqを使っているのですが、目次ページをデフォルトのデザインから要素の位置とか大きさとか「・・・」の有無とかを変えたいです。 どうしたらできますか?

unicode-mathでceo

- 髙橋 政晴 の投稿

この度、久々に数式を組むことになりまして、LuaLaTeXでやっていきたいと思っているのですが、今までceo.styにお世話になって使ってきたものでLuaLaTeXの環境下でも数式部分だけでも使いたいと考えています。

LuaLaTeXでは「unicode-math」を使うことで数式書体を随意に変更できるということなのでそちらを用いて実現したいと考えております。現在、こちらを参考にしているのですが、インテグラルやシグマ、+、-といったものまで変更するにはどうしたら良いのでしょうか?

TeXShop での \newindex について

- noza0702 の投稿
私はMacユーザーではないのですが、Macユーザーの知人から質問を受けました。

以下、質問です。
複数の索引(著者索引、事項索引など)を作成する場合、通常は、以下のようにします。

本文のプリアンブルに記述
\newindex{aut}{auidx}{auind}{Author Index}

著者索引のindファイルを生成
mendex -o book.auind book.auidx

上記のように、mendexコマンドに追加のオプション引数を指定することはMacのTeXShopでは可能でしょうか。
つまり、TeXShopのみで、\newindex を用いた複数索引の作成は可能でしょうか。あるいは、ターミナルを使う必要があるでしょうか。
自分自身は、Windows + コマンドプロンプト で、\newindex を用いた複数索引の作成はできております。

可能な場合、設定方法などを教えていただけると助かります。
以上です。
どうぞよろしくお願いいたします。

tikzで色付き斜線

- 髙橋 政晴 の投稿

質問内容がここでするのに適していないかもしれませんが…

cloudlatexでlualatexを使用しています。


\documentclass{jlreq} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{patterns} \pagestyle{empty} \begin{document} \begin{tikzpicture} \path[pattern color=blue!50!red!50,pattern = north east lines] (0,0) rectangle (5,5); \end{tikzpicture} \end{document}

ここに示したコードをコンパイルすると紫色の斜線がしっかり出力されるのですが、iPadの標準機能の「プリント」を通してメモなどに保存したり、goodnote6などからpdfとして書き出しを行うと斜線の色がすべて黒色になってしまうのですが、何かコードに問題があるのでしょうか?

添付 IMG_9695.jpeg

.bib ファイルについて

- ueki ichiro の投稿
Windows10の富士通のノートパソコンに美文書作成入門第8版付録のCDからTEXをインストールして使っています。ある雑誌に論文を投稿したところ、編集部から次のようなメールが届きました。 Please upload all the source file of your LaTeX submission including the .bib file. 私の論文は下記のような組み立てですが、このように thebibliography を使ったことで .bib file を含めたことになるのでしょうか。 植木 \documentclass[fleqn,12pt,onecolumn,a4paper]{article} \setlength{\textwidth}{16cm}き \setlength{\oddsidemargin}{0cm} \setlength{\evensidemargin}{0cm} \setlength{\topmargin}{-2cm} \setlength{\textheight}{25cm} \usepackage{amsmath} \usepackage{graphicx} \usepackage{setspace} \doublespacing \begin{document} ... "Philosophy of science ... is blind." \cite{Lakatos} ... \begin{thebibliography}{99} \bibitem {Lakatos} Lakatos, Imre. (1970). ''History of science and its rational reconstructions," Proceedings of the Biennial Meeting of Philosophy of Science Association, Volume \textbf{1970}, pages 91-136, Springer. ... \end{thebibliography} \end{document}

Overleafでタイムアウトしてしまう問題について

- J S の投稿
overleafにて現在論文を書いているのですが、以下のような形でjecon.bstというスタイルファイル(武田史郎さん作成https://github.com/ShiroTakeda/jecon-bst参照)を指定した上でコンパイルしようとしたところ、タイムアウトしてしまいます。 TeXShopにてローカルに行った場合は特に問題は発生しませんでした。 なお、Overleafの設定はコンパイラLuaLateX、TeXLive 2022です。 \documentclass[a4paper, 12pt]{ltjsreport} %==================================================================================== % パッケージ %==================================================================================== \usepackage{graphicx} % Required for inserting images \usepackage[top=1in, bottom=1in, right=1in, left=1in]{geometry} \usepackage[T1]{fontenc} % European fonts \usepackage[colorlinks=true, citecolor=blue]{hyperref} \usepackage[flushmargin, hang, bottom]{footmisc} % Fixes footnotes at bottom \usepackage{amsmath} % Allows to suppress equation numbers \usepackage{natbib} %==================================================================================== % 表紙 %==================================================================================== \title{{\Huge 論文}\\ なんとか実証分析} \author{ほげほげ} \date{2023年X月} \begin{document} \maketitle \chapter{ほげほげ} \section{ほげほげ} \par \citet{alesina1989partisan}は\citet{alesina1995partisan}と同一人物らしい\citep{altiparmakis2020bailouts}。 \chapter{ほげほげ} \section{ほげほげ} \bibliography{bibliography.bib} \bibliographystyle{jecon} \end{document} jeconを用いた他のテンプレート(https://ja.overleaf.com/latex/templates/wu-zang-ye-mei-shu-da-xue-ci-slash-cllun-wen-tenpureto/bkvcxgkypttm)を試したところ問題なく動くため、原因をご教示いただければと思います。 よろしくお願いいたします。