용어집 목록의 이름과 설명 사이에 \dotfill을 포함합니다.

용어집 목록의 이름과 설명 사이에 \dotfill을 포함합니다.

\dotfill다음을 사용하여 두문자어 목록의 용어집 항목 이름과 설명 사이에 포함시키려고 합니다.용어집패키지

나는 다음을 사용하여 원하는 결과를 얻었습니다.

\renewcommand{\glossentry}[2]{\glsentryname{#1}\dotfill\glossentrydesc{#1}\par}

하지만 다음 오류 중 45개가 발생합니다.

LaTeX Error: Something's wrong--perhaps a missing \item.

용어집 목록은 해당 줄 없이도 잘 인쇄되지만 내가 원하는 형식은 아닙니다.

이것은 오류 없이 내가 원하는 출력입니다.

원하는 출력

다음은 동일한 오류가 발생하는 예제 코드 조각입니다.

\documentclass{article}
\usepackage[nonumberlist, nopostdot]{glossaries}

\makeglossaries

\newacronym{adl}{ADL}{Activities of Daily Living}
\newacronym{cmc}{CMC}{Carpometacarpal}
\newacronym{dip}{DIP}{Distal Interphalangeal}

\begin{document}

\renewcommand{\glossentry}[2]{\glossentryname{#1}\dotfill\glossentrydesc{#1}\par}

\printglossary[type=\acronymtype, title=List of Acronyms]



\section*{Main Body}
\acrfull{adl}, \acrfull{cmc},\acrfull{dip}

\end{document}

감사합니다!

답변1

기본 용어집 스타일은 본질적으로 description환경이므로 하나 이상의 \item.

theglossary다음 중 하나를 재정의할 수 있습니다.

\renewenvironment{theglossary}{\glslistinit\setlength{\parindent}{0pt}}{}

따라서 항목은 환경 내부에서 조판되지 않습니다 description( \setlength{\parindent}{0pt}MWE가 일관된 들여쓰기를 얻으려면 이와 유사한 것이 필요함).

\glossentry또는 s를 사용하여 a 를 \item포함하는 기본값을 조정할 수 있습니다 .\dotfill

\renewcommand*{\glossentry}[2]{%
\item[\glsentryitem{#1}%
\glstarget{#1}{\glossentryname{#1}}]%
\dotfill%
\glossentrydesc{#1}\glspostdescription\space#2}

enumitem그러면 간격/위치 지정을 더 쉽게 수정할 수 있으므로 영향을 받습니다 .

관련 정보