
最近、glossaries
パッケージを使い始めました。LaTeX の初心者なので、いくつか問題に遭遇したので質問したいと思います。コードは次のようになります。
\documentclass[11pt,a4paper]{report}
\usepackage{glossaries}
\usepackage[a4paper,bindingoffset=0.2in,left=1in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
\usepackage[colorlinks=true]{hyperref}
\newglossary{symbols}{sym}{sbl}{List of Abbreviations and Symbols}
\newglossaryentry{fn}{type=symbols,name={$F_nF_nF_nF_nF_n$},sort=fn,
description={Empirical (sample) distribution function Empirical (sample) distribution function Empirical (sample) distribution function Empirical (sample) distribution function Empirical (sample) distribution function Empirical (sample) distribution function}}
\newglossaryentry{fncon}{type=symbols,name={\ensuremath{F^{n^\ast}}},sort=fnc,
description={$n$-fold convolution of the distribution function/distribution $F$ convolution of the distribution function convolution of the distribution function convolution of the distribution function}}
\makeglossary
\begin{document}
\title{Latex World}
\author{James Brown}
\date{\today}
\maketitle
\printglossaries
\newpage
\gls{fn}
\gls{fncon}
\end{document}
私の質問は
- 命名前に作成された空のページを削除したいと思います。
- シンボルを右揃えにし、複数行の説明については、説明の最初の行が始まった行の下から始まるように、次の行を水平に揃えたいと思います。
- シンボルをグループ化し、各グループの最初のシンボルに小さな太字のタイトルを追加したいと思います。
- シンボル間の垂直間隔を変更して、説明行と同じ間隔になるようにしたいと思います。ただし、グループ間の現在の間隔は維持したいと思います。
私はこの分野の初心者で、学習中なので、どなたか助けていただけると大変ありがたいです。よろしくお願いします。
答え1
- 命名前に作成された空のページを削除したいと思います。
main
空のページは、 ですべての用語集を反復処理したときに用語集が空であるために発生します\printglossaries
。解決策は 2 つあります。
nomain
用語集の自動作成を防ぐには、パッケージ オプションを使用しますmain
。(この用語集が必要ない場合にのみ、これを実行してください。)- 使用
\printglossary[type=symbols]
- シンボルを右揃えにし、複数行の説明については、説明の最初の行が始まった行の下から始まるように、次の行を水平に揃えたいと思います。
この要件の 2 番目の部分は、次のスタイルで取得できますaltlist
。
\documentclass[11pt,a4paper]{report}
\usepackage[a4paper,bindingoffset=0.2in,left=1in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
\usepackage[colorlinks=true]{hyperref}
\usepackage{glossaries}% always load after hyperref
\newglossary{symbols}{sym}{sbl}{List of Abbreviations and Symbols}
\makeglossaries
\newglossaryentry{fn}{type=symbols,name={$F_nF_nF_nF_nF_n$},sort=fn,
description={Empirical (sample) distribution function Empirical
(sample) distribution function Empirical (sample) distribution
function Empirical (sample) distribution function Empirical (sample)
distribution function Empirical (sample) distribution function}}
\newglossaryentry{fncon}{type=symbols,name={\ensuremath{F^{n^\ast}}},sort=fnc,
description={$n$-fold convolution of the distribution
function/distribution $F$ convolution of the distribution function
convolution of the distribution function convolution of the
distribution function}}
\title{Latex World}
\author{James Brown}
\date{\today}
\begin{document}
\maketitle
\printglossary[type=symbols,style=altlist]
\newpage
\gls{fn}
\gls{fncon}
\end{document}
このスタイルでは、シンボルを右揃えにすると、幅の広いシンボルが$F_nF_nF_nF_nF_n$
説明の上に広がるため、見た目がおかしくなります。
より良い選択肢としては、次のalttree
スタイルを使用することです。
\documentclass[11pt,a4paper]{report}
\usepackage[a4paper,bindingoffset=0.2in,left=1in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
\usepackage[colorlinks=true]{hyperref}
\usepackage{glossaries}% always load after hyperref
\newglossary{symbols}{sym}{sbl}{List of Abbreviations and Symbols}
\makeglossaries
\newglossaryentry{fn}{type=symbols,name={$F_nF_nF_nF_nF_n$},sort=fn,
description={Empirical (sample) distribution function Empirical
(sample) distribution function Empirical (sample) distribution
function Empirical (sample) distribution function Empirical (sample)
distribution function Empirical (sample) distribution function}}
\newglossaryentry{fncon}{type=symbols,name={\ensuremath{F^{n^\ast}}},sort=fnc,
description={$n$-fold convolution of the distribution
function/distribution $F$ convolution of the distribution function
convolution of the distribution function convolution of the
distribution function}}
\glssetwidest{$F_nF_nF_nF_nF_n$}
\renewcommand*{\glstreenamebox}[2]{%
\makebox[#1][r]{#2~}%
}
\title{Latex World}
\author{James Brown}
\date{\today}
\begin{document}
\maketitle
\printglossary[type=symbols,style=alttree]
\newpage
\gls{fn}
\gls{fncon}
\end{document}
- シンボルをグループ化し、各グループの最初のシンボルに小さな太字のタイトルを追加したいと思います。
これは、スタイルを から に変更することで取得できalttree
ますalttreegroup
。
- シンボル間の垂直間隔を変更して、説明行と同じ間隔になるようにしたいと思います。ただし、グループ間の現在の間隔は維持したいと思います。
この例では異なるグループはありませんが、ツリー スタイルはリスト スタイルよりもコンパクトなので、スタイルはalttreegroup
この要件に適合するはずです。
ぜひご覧になってみてくださいすべての定義済みスタイルのギャラリーそしてまたより一般的なギャラリーさらなるアイデアについては。