現在,東京大学の入試問題をTeXで再現しています。
添付PDFのような状況で,mhchemが提供する\ce{H2}などの化学式に下線を引きたいと思っています。
lua-ulを使うと改行部分で下線がずれてしまい上手くいきません。
こちらも拝見しましたが,解決には至っていません。
TeX Live 2025でLuaLaTeX+jlreqを使用しています。
お力添えいただければ幸いです。よろしくお願いいたします。
お世話になります。北川です。
最近、別行立て数式の前後について考えており、参考書のように調整したいと思いました。『大学への数学』(東京書籍)をみると、数式の上下のスペースは、通常のテキストの行間と等しいことが分かりました。ここで、「行間」とは\baselineskipのことではなく、ある行とその次の行に和文字の隙間(\baselineskip-1\zhに相当?)のことです。
また、alignの上下やalign中の各数式の上下のスペースも同様でした。
テキスト中の数式に分数やインテグラルを用いた場合は、「行間」が挿入されていることが分かりました。
そこで、各パラメータを次のように設定しました。
今日、今まで使用していた
失礼致します.上山と申します.
luatexja+jlreq で lua-ul パッケージを用いて,とりあえずマニュアルに従いながら以下のような波線マクロを定義しました:
\newunderlinetype\beginUnderWaby{\cleaders\hbox{% \begin{tikzpicture}[xscale=1.3,baseline=4pt,x=1pt,y=0.75pt]% \clip (1,1+1pt) rectangle (5,-1-1pt); \draw[semithick] (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0) sin (5,1) cos (6,0); \end{tikzpicture}% }}\NewDocumentCommand{\underWaby}{+m}{{\beginUnderWaby#1}}document.texのように以下のcode($J_3^\star\coloneq\~~)をexa環境内に入れた場合はerrorが出ないのですが、document(1).texのように以下のcodeをexa環境外に出すと何故か
document.tex: エラー: 210: Undefined control sequence. ...brary {graphs,graphdrawing} \usegdlibrary
document.tex: エラー: 213: Package pgfkeys Error: I do not know the key '/tikz/tree layout' and I am going to ignore it. Perhaps you misspelled it. sibling distance=5mm, level distance=5mm]
document.tex: エラー: 213: Package pgfkeys Error: I do not know the key '/tikz/significant sep', to which you passed '1em', and I am going to ignore it. Perhaps you misspelled it. sibling distance=5mm, level distance=5mm]
document.tex: エラー: 213: Package pgfkeys Error: I do not know the key '/tikz/minimum number of childred it. sibling distance=5mm, level distance=5mm]
document.tex: エラー: 216: Package tikz Error: You need to say \usetikzlibrary{graphs} in order to use the graph syntax. }
などのerrorが出ます。そのcode($J_3^\star\coloneq\~~)は途中にすでに書いてあるcodeでそれのみを入力したときにはerrorが出ません。
$J_3^\star\coloneq\usetikzlibrary {graphs,graphdrawing} \usegdlibrary {trees}
\tikz [grow'=up, baseline=(a.base), tree layout, significant sep=1em,
minimum number of children=1,
sibling distance=5mm, level distance=5mm]
\graph [nodes={circle, inner sep=0pt, minimum size=2mm, fill, as=}]{
a -- { b -- {e, f}, c -- {g, h}, d -- {i, j} }
};$
よろしければご教授お願いします。
お世話になります。
LuaLaTeX + jlreqで縦書きをしており、波線を引きたく、「uline--」パッケージが提供するowaveを用いたところ、添付したpdfのように、波線が2本出力されました。
私個人としては縦書き時のbaselineが横書き時のそれとは異なることが原因ではないかと考えています。事実、JFM=jlreqvのdepthとheightを横書きのJFM=jlreqと同じ値にしたところ、この問題は解決しました。
しかし、この方法では組版全体に影響を及ぼしてしまいます。
そこで、縦書き時に波線が2重に表記されないようにする別のアプローチがあればご教授頂きたく、質問させていただいた次第でございます。
よろしくお願いいたします。
北川直樹
P.S. uline--パッケージに拘る理由は、オプションでusetype1を指定したときの波線のデザインが最も理想的なものだからです。
Windows11の富士通ノートパソコンにTEX23年版をのせて論文をかいています。シュプリンガー社の雑誌に投稿しようとしたところ、bibファイルの使用を求められました。そこで美文書作成入門第8版11.7「BIBTEXの実行例」に見習って、下のようなサンプルファイル(infinit290.tex)とbibファイル(mini.bib)を作って、添付のスクリーンショットbib1~bib5のようにテスト
してみましたがうまくいきません。
(infinit290.tex)
\documentclass[sn-mathphys]{sn-jnl}
\setlength{\textwidth}{16cm}
\setlength{\oddsidemargin}{0cm}
%\setlength{\oddsidemargin}{0.5cm}
\setlength{\evensidemargin}{0cm}
\setlength{\topmargin}{-2cm}
\setlength{\textheight}{25cm}
%iicol,referee,,pdflatex
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{setspace}
\doublespacing
\begin{document}
\title{(manuscript)
The infinite and contradiction: The history of mathematical physics by dialectical approach}
\maketitle
keywords: infinity, contradiction, history, mathematical physics, dialectic, reverse mathematics
\section{Introduction}
\ \
"Philosophy of science without history of science is empty; history of science without philosophy of science is blind." \cite{Lakatos}
E. Wigner said, "The first point is that the enormous usefulness of mathematics in the natural sciences is something bordering on the mysterious and that there is no rational explanation for it."\cite{Wigner} This quotation from the pioneer of quantum physics shows that elucidating the essential nature of mathematics is important for the natural science.
\bibliographystyle{sn-mathphys}
\bibliography{mini}
\end{document}
(mini.bib)
@book{Lakatos,
author = {Lakatos, Imre},
year = {1970},
title = {History of science and its rational reconstructions},
booktitle = {Proceedings of the Biennial Meeting of Philosophy of Science Association},
pages = {91-136},
publisher = {Springer},
}
@book{Wigner,
author = {Wigner, Eugene P},
year = {1967},
title = {The unreasonable effectiveness of mathematics in the natural sciences},
booktitle = {Symmetries and reflections},
publisher = {Indiana Univ. Press},
}
以下texworksで作業しました。まずinfinit290.texをpdfLATEXでタイプセットすると、スクリーンショットbib1のようにPDFのタイプセット前に\citeで文献を指示した箇所に???が入ります。次にスクリーンショットbib2のようにタスクバーのタイプセット欄にBIBTEXを入れてタイプセットし(タスクバー左端の三角形をクリックし)、続いてまたpdfLATEXでタイプセットすると、スクリーンショットbib3のようにエラーで中断されます。さらにまたpdfLATEXでタイプセットすると、スクリーンショットbib4のようにbib1と同じ画面になり、もう一度pdfLATEXでタイプセットすると、スクリーンショットbib5のようにbib3のようにエラーで中断されます。bibファイルについて教えていただければ幸いです。
参考にlogファイルを保存したもの(infinit290log.txt)と使用されたシュプリンガー社提供ファイル3件(sn-...)を添付します。(以前和田様にbibファイルについて教えて頂きましたがまた分からなくなりました。すみません。)
植木
下に添付したanswerbox.styというファイルをネットでゲットしたのですが(https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://hohei3108.hatenablog.com/entry/2022/01/27/005123&ved=2ahUKEwig5d-X2MGNAxXioa8BHQFcAQMQFnoECAkQAQ&usg=AOvVaw24Izjng9HyNrKcY68L4R2E)
、ltjsreportだとうまく出力されるのに、ltjtreportだと一応出力はされるのにエラーが出てしまいます。ただエラー箇所がエディタ上に明示されないのでどこなのかよくわかりません。うまく改変できないでしょうか。