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

索引へのリンクが正しくない

- Toshio Otaguro の投稿
立て続けに質問して恐縮です.
現在 jsbook や bxjsbook を使って参考文献と索引を含む文章を書いているのですが,つい最近奇妙なことに気づきました.目次や PDF のしおりから索引のページへジャンプしようとすると,索引ではなく参考文献にジャンプしてしまいます.以前はこのようなこと無かったと思います.どの時点でどのパッケージに不具合が入り込んだのかわからずに困っています.以下再現ソースと生成した PDF を添付します.怪しいのは hyperref でしょうか?

uplatex, upmendex, dvipdfmx を使ってコンパイルしています.

% ----------
\RequirePackage{plautopatch}
\documentclass[uplatex,dvipdfmx,ja=standard,b5paper,11pt,openany]{bxjsbook}
%\documentclass[uplatex,dvipdfmx,b5paper,11pt,openany]{jsbook}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{makeidx}

\usepackage[dvipdfmx, colorlinks=true, bookmarks=true, bookmarksnumbered=true,%
  bookmarkstype=toc, filecolor=blue, urlcolor=blue, linkcolor=blue,%
  linktocpage=true, citecolor=red, menucolor=black,%
  pdfnewwindow=true, breaklinks=false]{hyperref}
%\usepackage{pxjahyper}

\title{本の題名}
\author{著者名}
\date{\today}
\makeindex

\begin{document}
\maketitle
\tableofcontents

\chapter{序論}
\section{各種変数,定数の定義}
本書では以下の規則に従って変数名\index{へんすうめい@変数名}や定数名\index{ていすうめい@定数名}を使用する.なお,この規則はガイドライン\cite{foo:Guideline of naming convention}に従ったものである.

\begin{thebibliography}{99}
\bibitem{foo:Guideline of naming convention} Bar, F.\ (2024). \emph{Naming Convention of Variables and Constants}. South Pacific Publishing, Nouméa
\end{thebibliography}
\clearpage

\printindex
\end{document}
% ----------

脚注や後注へのリンク

- Toshio Otaguro の投稿
後注を含む文章を書いているのですが,hyperref を使ったリンクが正しく張れなくて困っています.ちょっと長いのですが再現ソースを示すと同時に,dvipdfmx で作った PDF ファイルを添付します.解決策はあるでしょうか?

% ----------
\documentclass[uplatex,dvipdfmx,ja=standard,b5paper,11pt,openany]{bxjsbook}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{enotez}
\newcommand\myendnotesize{\small\baselineskip=12pt}
\DeclareInstance{enotez-list}{myendnote}{paragraph}{heading=\section*{#1},notes-sep=3pt,format=\myendnotesize}
\setenotez{list-style=myendnote,list-name={後注},reset=false,backref=true}

\usepackage[dvipdfmx, colorlinks=true, bookmarks=true, bookmarksnumbered=true,%
bookmarkstype=toc, filecolor=blue, urlcolor=blue, linkcolor=blue,%
linktocpage=true, citecolor=red, menucolor=black,%
pdfnewwindow=true, breaklinks=false]{hyperref}

\begin{document}
\chapter{脚注と後注}
\section{脚注と後注の使い分け}
一般に脚注はできるだけ避けるべきだが,読んでいるページの下部にちょっとした注\footnote{ちょっとした注とは,単語の別称などの短く形式的な内容が望ましい.\label{fn:Simple footnote}}があるのはページをめくる必要がないので便利だ.

しかしときに本文とは別に長い注を書きたくなる場合がある.翻訳本で訳者が著者と異なる見解を持っていて,訳者なりの論旨を展開したい場合%
\endnote{これは訳者の役割を逸脱した越権行為だと言われるかもしれないが,学術本ではときどき見かける.著者から拒否される場合があるだろうが,それは翻訳出版の契約次第だ.\label{enote:Translator's role}}%
や,数式の導出の補足%
\endnote{空気密度,対気速度,揚力係数,抗力係数,代表面積をそれぞれ$\rho$, $v$, $C_\mathrm{L}$, $C_\mathrm{D}$, $S$とすると,揚力$L$と抗力$D$はそれぞれ,
\begin{align}
L &= (1/2)\rho v^2 S C_\mathrm{L}, \\
D &= (1/2)\rho v^2 S C_\mathrm{D},
\end{align}
と書ける.}\label{enote:Lift and drag}%
を行いたい場合などだ.ただし脚注と後注の併用は避けるべきだ.番号や記号の付け方をどう区別したとしても読者を混乱させてしまう可能性があるからだ.

\section{脚注や後注へのリンク}
ところで脚注自体を本文や他の注の中から参照したい場合は\verb|footnote{}|\,のカッコ内に\verb|label|を書いておくことで脚注番号が正しく得られ,\verb|hyperref|パッケージを使ってリンクも張れる\footnote{実は\texttt{hyperref}のマニュアルには\texttt{footnote}も\texttt{endnote}も\emph{サポートしない}と明記してある.}.さきほど挿入した第1の脚注の番号とリンクは\ref{fn:Simple footnote}だ.

ところが後注の場合,最近開発中のパッケージである\verb|enotez|を使うと,同じやり方では第1の後注の番号が\ref{enote:Translator's role}となって正しく得られない,がリンク先は正しい.\verb|endnote{}|\,のカッコ外側直後に\verb|label|を置けば第2の後注番号は正しく\ref{enote:Lift and drag}と得られる.しかし張られたリンクが指すのは後注自体ではなく本文中の注番号なのだ.これでは不便だ.脚注と同じように後注本文を指すようにするにはどうすればよいのだろうか?

\printendnotes
\end{document}
% ----------

texliveのインストールについて

- Ⅽ r の投稿
現在、texliveのインストールに数日の間、苦戦しております。
windows11を使用中、名前は半角
通信環境は良好です。

試したこと
・https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q13293554468
このサイトの質問者です。
・isoイメージをダウンロード、実行済み
・環境変数を編集
・新規ユーザーを半角文字で作り、そこでインストール

正直、パソコンに詳しいわけではないため原因究明とともにインストールを成功させたいです。
ご教授いただけると幸いです。よろしくお願いいたします。

↓エラーメッセージです。
Installing to: C:/texlive/2023
Installing [1/6, time/total: ??:??/??:??]: hyphen-base [23k]
tar: Skipping to next file header
TLUtils::untar: C:\Users\user\AppData\Local\Temp\nspC989.tmp\install-tl-20240219\tlpkg\installer\tar.exe xmf C:\tmp\ZlAfl7_r2q\5pOKo3QIGu/hyphen-base.tar failed (in C:/texlive/2023/texmf-dist)
TLPDB::_install_data: untar failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/hyphen-base.tar.xz
TLUtils::install_packages: Failed to install hyphen-base
hyphen-base will be retried later.
Installing [2/6, time/total: ??:??/??:??]: kpathsea [1048k]
xz: (stdin): Compressed data is corrupt
TLPDB::_install_data: Decompressing C:\tmp\ZlAfl7_r2q\RcRgUUQMaj/kpathsea.tar.xz failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/kpathsea.tar.xz
TLUtils::install_packages: Failed to install kpathsea
kpathsea will be retried later.
Installing [3/6, time/total: ??:??/??:??]: luatex [1925k]
tar: Skipping to next file header
TLUtils::untar: C:\Users\user\AppData\Local\Temp\nspC989.tmp\install-tl-20240219\tlpkg\installer\tar.exe xmf C:\tmp\ZlAfl7_r2q\cnY_85Zbi8/luatex.tar failed (in C:/texlive/2023)
TLPDB::_install_data: untar failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/luatex.tar.xz
TLUtils::install_packages: Failed to install luatex
luatex will be retried later.
Installing [4/6, time/total: ??:??/??:??]: texlive-scripts [534k]
tar: Skipping to next file header
tar: Skipping to next file header
TLUtils::untar: C:\Users\user\AppData\Local\Temp\nspC989.tmp\install-tl-20240219\tlpkg\installer\tar.exe xmf C:\tmp\ZlAfl7_r2q\YYtRfsOXrf/texlive-scripts.tar failed (in C:/texlive/2023)
TLPDB::_install_data: untar failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/texlive-scripts.tar.xz
TLUtils::install_packages: Failed to install texlive-scripts
texlive-scripts will be retried later.
Installing [5/6, time/total: ??:??/??:??]: texlive.infra [553k]
xz: (stdin): Compressed data is corrupt
TLPDB::_install_data: Decompressing C:\tmp\ZlAfl7_r2q\u23j94oszP/texlive.infra.tar.xz failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/texlive.infra.tar.xz
TLUtils::install_packages: Failed to install texlive.infra
texlive.infra will be retried later.
Installing [6/6, time/total: ??:??/??:??]: tlperl.windows [7087k]
xz: (stdin): Compressed data is corrupt
TLPDB::_install_data: Decompressing C:\tmp\ZlAfl7_r2q\Gs03_ufmFM/tlperl.windows.tar.xz failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/tlperl.windows.tar.xz
TLUtils::install_packages: Failed to install tlperl.windows
tlperl.windows will be retried later.
Retrying to install: hyphen-base [23k]
tar: Skipping to next file header
TLUtils::untar: C:\Users\user\AppData\Local\Temp\nspC989.tmp\install-tl-20240219\tlpkg\installer\tar.exe xmf C:\tmp\ZlAfl7_r2q\dLqDuLxtbQ/hyphen-base.tar failed (in C:/texlive/2023/texmf-dist)
TLPDB::_install_data: untar failed for https://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet/archive/hyphen-base.tar.xz
Installation failed.
Rerunning the installer will try to restart the installation.
Or you can restart by running the installer with:
install-tl-windows.bat --profile installation.profile [YOUR-EXTRA-ARGS]
C:/Users/user/AppData/Local/Temp/nspC989.tmp/install-tl-20240219/install-tl: Writing log in current directory: C:/Users/user/AppData/Local/Temp/nspC989.tmp/install-tl.log
Wide character in print at C:/Users/user/AppData/Local/Temp/nspC989.tmp/install-tl-20240219/install-tl line 2725, line 220.
Wide character in print at C:/Users/user/AppData/Local/Temp/nspC989.tmp/install-tl-20240219/install-tl line 2725, line 220.
Wide character in print at C:/Users/user/AppData/Local/Temp/nspC989.tmp/install-tl-20240219/install-tl line 2725, line 220.

jlreq [2024/02/13] のバグ?

- m c の投稿

jlreqがアップデートされたので,https://okumuralab.org/tex/mod/forum/discuss.php?d=3677を再度試してみましたが,添付のログファイルのように6398行目でエラーが出るようです.

! Undefined control sequence.
<argument> \l__jlreq_tmpb_prop

l.6398 ...n_running_head={},clear_markcommand=false}

LuaLaTeXだけでなく,upLaTeX (ptex2pdf)も同様です.

【追記】revision番号は69887です.一つ前の67400でも同様のエラーがl.6355で出ました.

字間アキに関して

- 小林 コウキ の投稿
字間のアキについて質問です。

ああああ{\color{red}{いいい}}ううう\linebreak{}

上記データで
「あ」 と 「い」
「い」 と 「う」

の間(\colorで囲った前後)がベタになってしまいます。
均等に空きが入るようなコマンド,または指定はありますか。

ご存じの方がいらっしゃいましたら,教えてください。

よろしくお願いいたします。

lmodern.styを使用しても数式中のフォントがcmrのままで変わりません

- 小林 コウキ の投稿
lmodern.styを使用しても数式中のフォントがcmrのままで変わりません。

本文中の英数字はLatin Modernになるのですが,
align環境や$$の中ではcmrのママとなってしまいます。

TeXのヴァージョンは以下になります。
This is pTeX, Version 3.141592-p3.1.4 (sjis) (Web2C 7.5.3)

texファイル,PDFを添付します。

よろしくお願いいたします。

TeX Wiki のエラー報告用の標準データセットの画像がリンク切れになっています

- はやて (h20y6m) の投稿
「質問のしかた」からたどれる
TeX Wiki の「エラー報告用の標準データセット」の画像がリンク切れになっています。

https://texwiki.texjp.org/?%E3%82%A8%E3%83%A9%E3%83%BC%E5%A0%B1%E5%91%8A%E7%94%A8%E3%81%AE%E6%A8%99%E6%BA%96%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BB%E3%83%83%E3%83%88

画像のリンク先は https://okumuralab.org/~okumura/texwiki/files/tiger.* になっていますがファイルがなくなってしまっているようです。

「編集」でコードを見ると

[[tiger.eps>添付ファイル:tiger.eps]]

というようになっていて、 URL は設定されていないようなのですが、ブラウザで見ると https://okumuralab.org/~okumura/texwiki/files/tiger.eps へのリンクになっています。
TeX Wiki 側の問題でしょうか?

VSCodeにおいてエラーが出力されずビルドを続けてしまう

- x Zen の投稿
Texlive2023を使いVSCodeにおいてplatexを使っています。
OS: Windows 11 Home 23H2
platexを導入する際にあたって活用したサイトはこちらです: https://qiita.com/warper/items/cae0ea700bd49106f059
(settings.jsonもこちらにあるものと変わりません)

問題: 本来ならばエラーが起きるであろうlatexファイルをコンパイルするとエラーを出力せずビルドを続けてしまう。

直したいこと: エラーをちゃんと出力し、エラーがあったらビルドを止めてほしい

現状: コンパイラーログにはエラーが表示される。ただ、PROBLEMSの欄に出てこないでビルドを続ける(左下のぐるぐるマークが回転したまま)になる。エラーが出て直した後に再コンパイルするには手作業でコンパイルを一度中止(ずっとコンパイルしてるので)してから再度Ctrl+Alt+bを押す必要がある。

具体的な例:
\documentclass[dvipdfmx,a4paper, 12pt]{jsarticle}
\usepackage{amsmath}
\begin{document}
こんにちは。
\begin{equation*}
    x_x_2
\end{equation*}
\end{document}

のようなエラーを含むファイル(この場合はdouble subscript)をコンパイルしたときにエラーが出ないでビルドを続ける


コンパイラーログ:
This is ptex2pdf[.lua] version 20200520.0.
Processing c:/Workspace/Temp/assign1
This is e-upTeX, Version 3.141592653-p4.1.0-u1.29-230214-2.6 (utf8.sjis) (TeX Live 2023) (preloaded format=platex)
restricted \write18 enabled.
entering extended mode
(c:/Workspace/Temp/assign1.tex
pLaTeX2e <2023-02-14>+1, based on
LaTeX2e <2023-11-01>
L3 programming layer <2023-12-11>
(c:/texlive/2023/texmf-dist/tex/platex/jsclasses/jsarticle.cls
Document Class: jsarticle 2023/02/23 jsclasses (okumura, texjporg)
(c:/texlive/2023/texmf-dist/tex/platex/jsclasses/jslogo.sty)) (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(c:/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty)) (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty) (c:/texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty)) (c:/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def)
No file assign1.aux.
! Double subscript.
l.7    x_x_
            2
?

ファイルにVS Code立ち上げ→エラーを含むファイル(上の例)をコンパイルした際のLATEX Workshop Extension Logを添付します。
追加で必要な情報などありましたら教えてください。よろしくお願いします。

luatexja-rubyで下側ルビ・両側ルビを振る方法

- 三星 聯 の投稿
pxrubricaパッケージでは\ruby[Sg]{親文字}{ルビ}で下側ルビが、\truby{親文字}{上側ルビ}{下側ルビ}で両側ルビが振れますが、luatexja-rubyパッケージで同様の出力を得ることはできるでしょうか。

Tex Live 2023に画像ファイルが貼り付けられない

- 和人 松井 の投稿
Tex Live 2023をインストールして以来Texworksを使って文書を作成して特に問題は無い様に思いますが、jpgなどの画像ファイルを貼り付けようとしますとエラーがでます。そんなに特殊な記述ではないので、何故エラーが何故出るのか苦慮しています。 使用していますタイプセットはpLaTex(ptex2pdf)です。 \documentclass[dvipdfmx]{jsarticle} \usepackage[dvipdfmx]{color} \usepackage[dvipdfmx]{graphicx} \begin{document} \begin{figure}[h] \centering \includegraphics[scale=0.5]{CurriculaCS2013.jpg} \end{figure} \end{document} エラーの内容は:ー This is ptex2pdf[.lua] version 20200520.0. Processing jpg_test_UTF8.tex This is e-upTeX, Version 3.141592653-p4.1.0-u1.29-230214-2.6 (utf8.sjis) (TeX Live 2023) (preloaded format=platex) restricted \write18 enabled. entering extended mode (./jpg_test_UTF8.tex pLaTeX2e <2023-02-14>+1, based on LaTeX2e <2023-06-01> patch level 1 L3 programming layer <2023-08-29> (c:/texlive/2023/texmf-dist/tex/platex/jsclasses/jsarticle.cls Document Class: jsarticle 2023/02/23 jsclasses (okumura, texjporg) (c:/texlive/2023/texmf-dist/tex/platex/jsclasses/jslogo.sty)) (c:/texlive/texmf-local/tex/latex/graphics/color.sty (c:/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg) (c:/texlive/texmf-local/tex/latex/dvipdfmx-def/dvipdfmx.def) (c:/texlive/texmf-local/tex/latex/graphics/dvipsnam.def)) (c:/texlive/texmf-local/tex/latex/graphics/graphicx.sty (c:/texlive/texmf-local/tex/latex/graphics/keyval.sty) (c:/texlive/texmf-local/tex/latex/graphics/graphics.sty (c:/texlive/texmf-local/tex/latex/graphics/trig.sty) (c:/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg))) (c:/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-dvipdfmx.def) (./jpg_test_UTF8.aux) ! Argument of \@tempa has an extra }. \par l.8 ...udegraphics[scale=0.5]{CurriculaCS2013.jpg} ? OSはWindows11です。 以上 宜しくお願い致します。 松井