
현재 여러 열과 열 머리글이 포함된 약어를 작성하는 데 문제가 있습니다. 열 머리글만 사용하여 약어를 작성했지만 여러 열에 이를 작성하는 방법을 알 수 없습니다. MWE는 다음과 같습니다.
\documentclass[a4paper,openany]{report}
\usepackage[breaklinks,draft]{hyperref}
\usepackage[acronym,section,nopostdot,nonumberlist,nogroupskip,nostyles]
{glossaries}
\usepackage{glossary-mcols}
\makeglossaries
\begin{document}
\newglossaryentry{cur}{name=cur, description={Just a random name.}}
\newglossaryentry{mmee}{name=mmee, description={Just a random name.}}
\newglossaryentry{fsda}{name=fs, description={Just a random name.}}
\newglossaryentry{dcsc}{name=ddad, description={Just a random name.}}
\newglossaryentry{ccs}{name=adax, description={Just a random name.}}
\newglossaryentry{ccc}{name=acDc, description={Just a random name.}}
\newglossaryentry{vfvv}{name=gegfvv, description={Just a random name.}}
\newglossaryentry{fvafv}{name=gdgdfv, description={Just a random name.}}
\newglossaryentry{bgbb}{name=gegvf, description={Just a random name.}}
\newglossaryentry{gfvfv}{name=qefrwfav, description={Just a random name.}}
\gls{cur}
\gls{mmee}
\gls{fsda}
\gls{dcsc}
\gls{ccs}
\gls{ccc}
\gls{vfvv}
\gls{fvafv}
\gls{gfvfv}
\gls{bgbb}
\printglossary[style=mcolindex,title=List of Acronyms]
\end{document}
답변1
long
스타일 버전을 갖는 것은 불가능합니다 mcols
. 환경 은 환경 longtable
내부에서 허용되지 않으며 모드에서( 클래스 옵션과 함께 또는 클래스 옵션으로) multicols
사용할 수도 없습니다 .twocolumn
\twocolumn
longtable
이를 구현하는 가장 간단한 방법 은 4개의 열(약어 및 설명 두 쌍)을 갖는 것입니다 .
\documentclass[a4paper,openany]{report}
\usepackage{array}
\usepackage{longtable}
\usepackage[breaklinks,draft]{hyperref}
\usepackage[acronym,section,nostyles,entrycounter]
{glossaries}
\makeglossaries
\newlength\descwidth
\setlength{\descwidth}{0.25\textwidth}
\renewcommand*{\glsentrycounterlabel}{}%
\newglossarystyle{pairedtable}%
{%
\renewenvironment{theglossary}%
{\begin{longtable}{l>{\raggedright}p{\descwidth}l>{\raggedright}p{\descwidth}}}%
{\end{longtable}}%
\renewcommand*{\glossaryheader}{%
\bfseries \entryname & \bfseries
\descriptionname &
\bfseries \entryname & \bfseries
\descriptionname
\tabularnewline\endhead
}%
\renewcommand*{\glsgroupheading}[1]{}% no letter group headings
\renewcommand*{\glsgroupskip}{}% no gap between letter groups
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrydesc{##1}% number list omitted
\ifodd\value{glossaryentry}\def\next{&}\else\def\next{\tabularnewline}\fi
\next
}%
\renewcommand{\subglossentry}[3]{\glossentry{##2}{##3}}%
}
\newglossaryentry{cur}{name=cur, description={Just a random name.}}
\newglossaryentry{mmee}{name=mmee, description={Just a random
name.}}
\newglossaryentry{fsda}{name=fs, description={Just a random name.}}
\newglossaryentry{dcsc}{name=ddad, description={Just a random
name.}}
\newglossaryentry{ccs}{name=adax, description={Just a random
name.}}
\newglossaryentry{ccc}{name=acDc, description={Just a random
name.}}
\newglossaryentry{vfvv}{name=gegfvv, description={Just a random
name.}}
\newglossaryentry{fvafv}{name=gdgdfv, description={Just a random
name.}}
\newglossaryentry{bgbb}{name=gegvf, description={Just a random
name.}}
\newglossaryentry{gfvfv}{name=qefrwfav, description={Just a random
name.}}
\begin{document}
\gls{cur}
\gls{mmee}
\gls{fsda}
\gls{dcsc}
\gls{ccs}
\gls{ccc}
\gls{vfvv}
\gls{fvafv}
\gls{gfvfv}
\gls{bgbb}
\printglossary[style=pairedtable,title=List of Acronyms]
\end{document}
불행하게도 테이블이 행별로 구성되어 있으므로 순서가 잘못되었습니다.
makeindex
위에서 아래로 정렬되도록 항목을 정렬하는 쉬운 방법은 없습니다 . 항목 수가 적은 경우 수동으로 주문하고 glossaries-extra
'을 사용할 수 있습니다 \printunstglossary
(번호 목록을 원하지 않기 때문에). 예:
\documentclass[a4paper,openany]{report}
\usepackage{array}
\usepackage{longtable}
\usepackage[breaklinks,draft]{hyperref}
\usepackage[acronym,section,nostyles,entrycounter]
{glossaries-extra}
\newlength\descwidth
\setlength{\descwidth}{0.25\textwidth}
\renewcommand*{\glsentrycounterlabel}{}%
\newglossarystyle{pairedtable}%
{%
\renewenvironment{theglossary}%
{\begin{longtable}{l>{\raggedright}p{\descwidth}l>{\raggedright}p{\descwidth}}}%
{\end{longtable}}%
\renewcommand*{\glossaryheader}{%
\bfseries \entryname & \bfseries
\descriptionname &
\bfseries \entryname & \bfseries
\descriptionname
\tabularnewline\endhead
}%
\renewcommand*{\glsgroupheading}[1]{}% no letter group headings
\renewcommand*{\glsgroupskip}{}% no gap between letter groups
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrydesc{##1}% number list omitted
\ifodd\value{glossaryentry}\def\next{&}\else\def\next{\tabularnewline}\fi
\next
}%
\renewcommand{\subglossentry}[3]{\glossentry{##2}{##3}}%
}
\newglossaryentry{ccc}{name=acDc, description={Just a random
name.}}
\newglossaryentry{fvafv}{name=gdgdfv, description={Just a random
name.}}
\newglossaryentry{ccs}{name=adax, description={Just a random
name.}}
\newglossaryentry{vfvv}{name=gegfvv, description={Just a random
name.}}
\newglossaryentry{cur}{name=cur, description={Just a random name.}}
\newglossaryentry{bgbb}{name=gegvf, description={Just a random
name.}}
\newglossaryentry{dcsc}{name=ddad, description={Just a random
name.}}
\newglossaryentry{mmee}{name=mmee, description={Just a random
name.}}
\newglossaryentry{fsda}{name=fs, description={Just a random name.}}
\newglossaryentry{gfvfv}{name=qefrwfav, description={Just a random
name.}}
\begin{document}
\gls{cur}
\gls{mmee}
\gls{fsda}
\gls{dcsc}
\gls{ccs}
\gls{ccc}
\gls{vfvv}
\gls{fvafv}
\gls{gfvfv}
\gls{bgbb}
\printunsrtglossary[style=pairedtable,title=List of Acronyms]
\end{document}
항목이 많은 경우에는 특히 편리하지 않습니다. 대안은 병렬 tabular
환경을 구성하는 것이지만 올바른 행 수를 결정해야 합니다. 아래 예에서는 glossaries
용어집을 채우기 위해 패키지 와 함께 제공된 테스트 항목을 로드했습니다 .
\documentclass[a4paper,openany]{report}
\usepackage{array}
\usepackage[breaklinks,draft]{hyperref}
\usepackage[acronym,section,nostyles]{glossaries}
\makeglossaries
\loadglsentries[\acronymtype]{example-glossaries-acronym}% dummy entries
\newlength\descwidth
\setlength{\descwidth}{0.25\textwidth}
\newcounter{rowcount}
\newglossarystyle{table}%
{%
\renewenvironment{theglossary}%
{%
\setcounter{rowcount}{0}%
\begin{tabular}[t]{l>{\raggedright}p{\descwidth}}%
\bfseries \entryname & \bfseries
\descriptionname \tabularnewline
}
{\end{tabular}}%
\renewcommand*{\glossaryheader}{}%
\renewcommand*{\glsgroupheading}[1]{}% no letter group headings
\renewcommand*{\glsgroupskip}{}% no gap between letter groups
\renewcommand{\glossentry}[2]{%
\stepcounter{rowcount}%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrydesc{##1}% number list omitted
\ifnum\value{rowcount}=25 % 25 entries per column
\def\next{%
\end{tabular}\hfill
\setcounter{rowcount}{0}%
\begin{tabular}[t]{l>{\raggedright}p{\descwidth}}%
\bfseries \entryname & \bfseries
\descriptionname \tabularnewline
}%
\else
\def\next{\tabularnewline}%
\fi
\next
}%
\renewcommand{\subglossentry}[3]{\glossentry{##2}{##3}}%
}
\begin{document}
\glsaddall
\printglossary[type=\acronymtype,style=table,title=List of Acronyms]
\end{document}