![과학 상수 목록](https://rvso.com/image/298824/%EA%B3%BC%ED%95%99%20%EC%83%81%EC%88%98%20%EB%AA%A9%EB%A1%9D.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를 두 번 실행해야 합니다.