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

appendixのラベル名と番号形式を変更したい

- matushiro 97 の投稿

appnedix 命令以降の見出しは,デフォルトでは付録A,付録B,…となりますが,これを付論1,付論2,…に変更することを考えています.

付論を付録に変更することは\renewcommandでできたのですが,A,Bを1,2にする方法がわかりません.ご教示いただければありがたいです.

タグ:

相互参照の後ろで改行するとスペースが生じる

- ya ra の投稿
  • TeX Live 2024
  • LuaLaTeX

相互参照で遊んでいる際に見つけた疑問です。

問題

見出しのための \ref コマンドとして、第\ref{#1}節\secref として定義しました。

この \secref の後で改行し和文を続けると、“節” と “その後の和文” の間に謎のスペースが生じます。

このスペースはどうして生じるのでしょうか。また、対策方法はありますか。

最小再現

\documentclass{jlreq}
\newcommand{\secref}[1]{第\ref{#1}節}
\begin{document}

\section{セクション}\label{sec}

あいうえお
\secref{sec}
かきくけこ

%% 以下はふつうに出力される
%%
% あいうえお
% 第\ref{sec}節
% かきくけこ
%
% あいうえお
% 第1節
% かきくけこ

\end{document}
添付 スクリーンショット 2024-05-12 022343.png

図の表示と相対参照で日本文字が表示されない

- matushiro 97 の投稿

図の表示と参照時にエラーが発生し,グーグルなどで色々と調べたのですが,解決できないので問い合わせました.
解決策をご教授いただければ幸いです.

添付の"画像.tex"をtexWorks2024からタイプセットluaLatexで実行しました.
2回以上実行しました.図のラベルや相対参照を含む段落の日本語が全て表示されません.
ログを見ると,消失している文字のcodeが発見できないと有るのですが.使用している文字は全て平凡な全角文字なので,何かが文字コードの使用を邪魔しているのだと推測するのですが,解決策がわかりません.

"画像.tex"の最初に"\input{preamble.tex}"とあるのは,もとのtexファイルが100ページくらいの数式を多用する大きなファイルですので,10個くらいに分割して作成しており,その際にプリアンブルを共通化するための工夫です.
そののプリアンブルは,「日本語の数式を多用する論文のおすすめのプリアンブル」をAIに聞き,その回答と必要なものを追加したものです.

よろしくお願いします

添付 movetoupface.png
添付 setOfTecGoods.png

jlreq: twocolumn時にchapterが新ページから始まる

- 佐藤 清 の投稿

jlreqでtwocolumnで書いています。

既存のchapterに続けて新しいchapterを始める時、

期待する動作: 新しいchapterが次のcolumnから始まる

実際の動作: 新しいchapterが次のページから始まる

どうしたらいいですか?

このフォントってなんですか?

- @ ユウキ の投稿
画像は予備校の問題解説の際に配られた解説PDFの一部です。 画像にあるような数式のフォントを知りたいです。 使っている方、どなたか知っていれば教えて下さい。
添付 画像

セクション番号について

- t bz の投稿

セクション番号を

1

2

3

4

5

ではなくて、

1

2

3.1

3.2

4

といった感じにしたいのですが、どうすれば宜しいでしょうか?

latex2024のタイトルの仕様に関して

- 田中 秋吉 の投稿

latex2024を使用しています。pcを新調しlatex2021でコンパイルしていたレポートをそのままlatex2024でコンパイルしたのですが、参考文献が強制的に改ページされてしまうのと、タイトルがtitlepageを使用していないのに、改ページされてしまうようになってしまいました。

参考文献がに関してはなんとかなりました。

以下に私が使用しているプリアンブルを書きますので、タイトルが改ページされないようにする方法があれば教えてください。よろしくお願いします。

\documentclass[article,11pt]{jreport}
\usepackage{titlesec}
\usepackage{float}
% \titleformat*{\section}{\small\bfseries}
% \titleformat*{\subsection}{\small\bfseries}
\usepackage{bm}
\usepackage{amsmath,amsfonts}
\usepackage{wrapfig}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
% 画像
\usepackage[dvipdfmx]{graphicx}
\usepackage{multirow}
\usepackage{graphicx}
%余白
\usepackage[margin=15mm]{geometry}
\usepackage{enumerate}
%\usepackage{subfigure}
\usepackage{mathtools}
\usepackage{url}

\usepackage[hang,small,bf]{caption}
\usepackage[subrefformat=parens]{subcaption}
\captionsetup{compatibility=false}            
\usepackage{physics}
\usepackage[super]{cite}
\renewcommand\citeform[1]{[#1]} %参考文献

\renewcommand{\bibname}{参考文献}


%%%%%%%%%%参考文献が改ページされるのを抑制してる%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%https://okumuralab.org/tex/mod/forum/discuss.php?d=594%%%%%%
\makeatletter
\renewenvironment{thebibliography}[1]{%
  \global\let\presectionname\relax
  \global\let\postsectionname\relax
  \section*{\bibname}\@mkboth{\bibname}{}%
  \addcontentsline{toc}{section}{\bibname}%
  \list{\@biblabel{\@arabic\c@enumiv}}%
        {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty\clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}
  {\def\@noitemerr
    {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%プログラムを貼り付け%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings, jlisting}
\renewcommand{\lstlistingname}{code}
\lstset{language=Matlab,%
        basicstyle=\ttfamily,%
        commentstyle=\textit,%
        classoffset=1,%
        keywordstyle=\bfseries,%
  frame=tb,framesep=5pt,%
  showstringspaces=false,%
        numbers=left,stepnumber=1,numberstyle=\ttfamily%
  }%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pdfpages}
\title{課題レポート}
\author{名前}
\date{}
\begin{document}
\maketitle

bmパッケージでImproper alphabetic or KANJI constant.

- 清水 の投稿

こんにちは

下記のサンプルでコンパイルすると「Improper alphabetic or KANJI constant.」エラーが出ます

\documentclass[dvipdfmx]{jsarticle}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}

\begin{document}
$\bm{A\hspace{5pt}A}$
\end{document}

しかし

\documentclass[dvipdfmx]{jsarticle}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}

\begin{document}
$\bm{{A\hspace{5pt}A}}$
\end{document}

bmコマンド部分を括弧で括るとエラーは解消されます。

これはなぜ起こるのでしょうか。
ご教授願えると幸いです。

texlive2024のインストール後のbeamerのコンパイルについて

- Y Ueno の投稿
環境は windows10。 以前はtexlive2020を使っていて、最新版にインストールをしたい。 「install-tl-windows.exe」をダウンロードし、texlive2024をダウンロード完了。 古いtexlive2020はそのままにしてあります。 状況としては、texlive2024で texworks を使い、 通常のプリント作成であれば、タイプセットした後、pdfを作成し、印刷できます。 一方で、beamerとなると、タイプセットができません。 正直、パソコンに詳しくないので、どのように直したらよいのか、 全く検討がつきません。 以前に戻したら、特に問題なく作業はできますが、 この機会に新しいバージョンにできたら助かります。 アドバイスしていただけると助かります。 下記に、ファイルやログなどを載せます。 ファイル名は「beamer-tamesi.tex」 \documentclass[12pt,dvipdfmx]{beamer} % \renewcommand{\kanjifamilydefault}{\gtdefault} \usepackage{graphicx} \usepackage{color}% \begin{document} \begin{frame}[t] \begin{center} {\Huge \fbox{1}\ ためし} \bigskip {\Large ためし2} \end{center} \end{frame} \end{document} ***ログ表示*** This is ptex2pdf[.lua] version 20200520.0. Processing beamer-tamesi.tex This is e-upTeX, Version 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.sjis) (TeX Live 2024) (preloaded format=platex) restricted \write18 enabled. entering extended mode (./beamer-tamesi.tex pLaTeX2e <2023-02-14>+1, based on LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-03-14> (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamer.cls Document Class: beamer 2024/01/06 v3.71 A class for typesetting presentations (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasemodes.sty (c:/texlive/2024/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasedecode.sty)) (c:/texlive/2024/texmf-dist/tex/generic/iftex/iftex.sty) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbaseoptions.sty (c:/texlive/2024/texmf-dist/tex/latex/graphics/keyval.sty)) (c:/texlive/2024/texmf-dist/tex/latex/geometry/geometry.sty (c:/texlive/2024/texmf-dist/tex/generic/iftex/ifvtex.sty)) (c:/texlive/2024/texmf-dist/tex/latex/pgf/math/pgfmath.sty (c:/texlive/2024/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def) (c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (c:/texlive/2024/texmf-dist/tex/generic/pgf/pgf.revision.tex))) (c:/texlive/2024/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (c:/texlive/2024/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.co de.tex))) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.te x) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric .code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.t ex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.co de.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex ) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.te x) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex ) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithm etics.code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (c:/texlive/2024/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex))) (c:/texlive/2024/texmf-dist/tex/latex/base/size12.clo) (c:/texlive/2024/texmf-dist/tex/latex/base/atbegshi-ltx.sty) (c:/texlive/2024/texmf-dist/tex/latex/hyperref/hyperref.sty (c:/texlive/2024/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty) (c:/texlive/2024/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (c:/texlive/2024/texmf-dist/tex/generic/pdfescape/pdfescape.sty (c:/texlive/2024/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (c:/texlive/2024/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (c:/texlive/2024/texmf-dist/tex/generic/infwarerr/infwarerr.sty))) (c:/texlive/2024/texmf-dist/tex/latex/hycolor/hycolor.sty) (c:/texlive/2024/texmf-dist/tex/latex/auxhook/auxhook.sty) (c:/texlive/2024/texmf-dist/tex/latex/hyperref/nameref.sty (c:/texlive/2024/texmf-dist/tex/latex/refcount/refcount.sty) (c:/texlive/2024/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty (c:/texlive/2024/texmf-dist/tex/latex/kvoptions/kvoptions.sty))) (c:/texlive/2024/texmf-dist/tex/latex/hyperref/pd1enc.def) (c:/texlive/2024/texmf-dist/tex/generic/intcalc/intcalc.sty) (c:/texlive/2024/texmf-dist/tex/latex/hyperref/puenc.def) (c:/texlive/2024/texmf-dist/tex/latex/url/url.sty) (c:/texlive/2024/texmf-dist/tex/generic/bitset/bitset.sty (c:/texlive/2024/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) Package hyperref Message: Stopped early. ) (c:/texlive/2024/texmf-dist/tex/latex/hyperref/hdvipdfm.def (c:/texlive/2024/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (c:/texlive/2024/texmf-dist/tex/latex/base/atveryend-ltx.sty) (c:/texlive/2024/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbaserequires.sty (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasecompatibility.sty) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasefont.sty (c:/texlive/2024/texmf-dist/tex/latex/amsfonts/amssymb.sty (c:/texlive/2024/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (c:/texlive/2024/texmf-dist/tex/latex/sansmathaccent/sansmathaccent.sty (c:/texlive/2024/texmf-dist/tex/latex/koma-script/scrlfile.sty (c:/texlive/2024/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty (c:/texlive/2024/texmf-dist/tex/latex/koma-script/scrlogo.sty))))) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasetranslator.sty (c:/texlive/2024/texmf-dist/tex/latex/translator/translator.sty)) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasemisc.sty) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbasetwoscreens.sty) (c:/texlive/2024/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty ! Undefined control sequence. l.390 \newcolormixin \beamer@colorhook ? ***Error, wornings, badboxes*** beamerbaseoverlay.sty 390 Undefined control sequence. l.390 \newcolormixin \beamer@colorhook 390行目を消して、同様にタイプセットすると、 また違うエラーが出てきてします。

captionの条件によってTeX capacity exceeded, sorry [input stack size=10000]とエラーがでる

- 伊藤 直人 の投稿

現在、下記のようなTeXコードを考えていて、\caption{Au,Ag,Alの融点$\left[\degreeCelsius\right]$}とするとTeX capacity exceeded, sorry [input stack size=10000].\degreeCelsius ->\si {\degreeCelsius とエラーが出ますが\caption{Au,Ag,Alの融点}とするとエラーは出ません。

エラーの内容を見るにメモリを使い切ったというものだと思うのですがこの程度のことでメモリを使い切ってしまうものなのでしょうか。

なにかご存知の方がおられましたらご教授頂けると幸いです。

\documentclass{jlreq}
\usepackage{multicol}
\usepackage{siunitx}
\newcommand{\degreeCelsius}{\si{\degreeCelsius}}
\begin{document}
Au,Ag,Alの融点を表\ref{Au,Ag,Alの融点}にまとめる。

\begin{table}
    \centering
    \caption{Au,Ag,Alの融点$\left[\degreeCelsius\right]$}
    \label{Au,Ag,Alの融点}
    \begin{tabular}{c|r}
        素材 & \multicolumn{1}{c}{融点$\left[\degreeCelsius\right]$} \\ \hline
        Au  & 100\\ \hline
        Ag  & 200\\ \hline
        Al  & 300\\ 
    \end{tabular}    
\end{table}
\end{document}