![Список научных констант](https://rvso.com/image/298824/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA%20%D0%BD%D0%B0%D1%83%D1%87%D0%BD%D1%8B%D1%85%20%D0%BA%D0%BE%D0%BD%D1%81%D1%82%D0%B0%D0%BD%D1%82.png)
Какой лучший способ создать список констант? Стоит ли мне сделать глоссарий или есть более удачная практика или пакет?
Спасибо!
решение1
Вот простой метод использованияlongtable
:
\documentclass{book}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{longtable}
\begin{document}
\chapter{System of Units etc}
\section{International system of units}
\begin{longtable}{llll}
\toprule
\bfseries Quantity & \bfseries Unit &
\bfseries Symbol & \bfseries Dimension\\\midrule\endhead
Length & meter & \si{\meter} & \\
Mass & kilogram & \si{\kilo\gram}\\
Frequency & hertz & \si{\hertz} & \si{\per\second}\\
\bottomrule
\end{longtable}
\end{document}
Это производит:
Вот эквивалентglossaries
метод:
\documentclass{book}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{glossaries}
\makenoidxglossaries
\glsnoexpandfields
\let\glsunit\glsuseri
\let\glsdim\glsuserii
\newglossaryentry{length}{%
name=length,%
description={},%
symbol={\si{\meter}},
user1={meter}% unit
}
\newglossaryentry{mass}{%
name=mass,%
description={},%
symbol={\si{\kilo\gram}},
user1={kilogram}% unit
}
\newglossaryentry{frequency}{%
name=frequency,%
description={},%
symbol={\si{\hertz}},
user1={hertz},% unit
user2={\si{\per\second}}% dimension
}
\newglossarystyle{units}{%
\setglossarystyle{long4col}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\Glossentryname{##1}} &
\glsentryuseri{##1} &
\glossentrysymbol{##1} &
\glsentryuserii{##1}\tabularnewline
}%
\renewcommand*{\glossaryheader}{%
\toprule
\bfseries Quantity &\bfseries Unit&
\bfseries Symbol& \bfseries Dimension\tabularnewline
\midrule\endhead
\bottomrule\endfoot
}%
\renewcommand*{\glsgroupskip}{}%
}
\setglossarystyle{units}
\begin{document}
\chapter{Sample}
\gls{length}, \glsunit{length}, \glssymbol{length}.
\gls{mass}, \glsunit{mass}, \glssymbol{mass}.
\gls{frequency}, \glsunit{frequency}, \glssymbol{frequency},
\glsdim{frequency}.
\printnoidxglossary[sort=def,title={Systems of Units etc}]
\end{document}
Первая страница:
Список символов:
Оба метода требуют двух запусков LaTeX для обеспечения актуальности документа.