이것을 참고하세요우편, 나는 약어 목록에 기호 목록을 적용하려고 노력합니다.
약어 목록
% Setup list of abbreviations
\newglossarystyle{mylong}{
\setglossarystyle{long}
\renewenvironment{theglossary}{\vspace{-3mm}\begin{longtable*}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}{\end{longtable*}}}
\printglossary[style=mylong,type=\acronymtype,title=Abkürzungsverzeichnis]
이제 나는 내 기호 목록에 대해 매우 유사한 프레젠테이션을 만들고 싶습니다.
기호 목록
\newglossary{symbolslist}{syi}{syg}{}
\glsaddstoragekey{unit}{}{\glsentryunit}
\newglossarystyle{symbunitlong}{
\setglossarystyle{long3col}
\renewenvironment{theglossary}{\vspace{-3mm}
\begin{longtable*}[l]{lp{\glsdescwidth}>{\arraybackslash}p{1cm}}}{\end{longtable*}}
\renewcommand*{\glossentry}[2]{
\glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1} & \glsentryunit{##1}\\
}
}
\printunsrtglossary[type=symbols,style=symbunitlong,title=Symbolverzeichnis]
기호 목록을 왼쪽 정렬하는 방법과 기호 사이의 거리를 CAD에서 CRC까지의 거리에 맞게 조정하는 방법은 무엇입니까?
편집1
수직 거리 문제를 해결하려면 다음과 같이 새 기호 정의에 정렬 속성을 추가하면 됩니다.
\glsxtrnewsymbol[
description={test1},
unit={m},
sort={a}]
{y}{y}
자세한 내용은 @leandriis에게 감사드립니다.우편.
편집2
@leandriis가 언급한 것처럼 줄을 이렇게 변경하면
\begin{longtable*}[l]{@{}lp{\glsdescwidth}>{\arraybackslash}p{1cm}}}{\end{longtable*}}
더 나은 것 같지만 완벽하지는 않습니다.
편집3
MWE
\documentclass[]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[binary-units=true,locale = DE]{siunitx}
\usepackage{caption}
\usepackage[nonumberlist,acronym,toc,symbols,nomain]{glossaries-extra}
\usepackage{showframe} % just for the example
% Setup list of abbreviations
\newglossarystyle{mylong}{
\setglossarystyle{long}
\renewenvironment{theglossary}{%
\vspace{-3mm}%
\begin{longtable*}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{\dimexpr\textwidth-\tabcolsep-2cm}@{}}%
}{\end{longtable*}}
}
\setabbreviationstyle[acronym]{long-short}
\newacronym[
plural={Test},
firstplural={Test (Test)},
description={Test}]
{Test}{Test}{Test}
\newacronym[
plural={Test1},
firstplural={Test1 (Test1)},
description={Test1}]
{Test1}{Test1}{Test1}
% Setup list of symbols
\newglossary{symbolslist}{syi}{syg}{}
\glsaddstoragekey{unit}{}{\glsentryunit}
\newglossarystyle{symbunitlong}{
\setglossarystyle{long3col}
\renewenvironment{theglossary}{\vspace{-3mm}\begin{longtable*}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{\glsdescwidth}>{\arraybackslash}p{1cm}}}{\end{longtable*}}
\renewcommand*{\glossentry}[2]{
\glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1} & \glsentryunit{##1}\\
}
}
\glsxtrnewsymbol[
description={test0},
unit={m},
sort={a}]
{x}{x}
\glsxtrnewsymbol[
description={test1},
unit={m},
sort={a}]
{y}{y}
\makeglossaries
\glsadd{x}
\glsadd{y}
\glsadd{Test}
\glsadd{Test1}
\begin{document}
\printglossary[type=\acronymtype,style=mylong,title=Abkürzungsverzeichnis]
\printunsrtglossary[type=symbols,style=symbunitlong,title=Symbolverzeichnis]
\end{document}
결과
답변1
너비를 추측하지 말고 왼쪽 거리를 다시 정의하십시오.
\documentclass[]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[binary-units=true,locale = DE]{siunitx}
\usepackage{caption}
\usepackage[nonumberlist,acronym,toc,symbols,nomain]{glossaries-extra}
\usepackage{showframe} % just for the example
% Setup list of abbreviations
\newglossarystyle{mylong}{
\setglossarystyle{long}
\renewenvironment{theglossary}{%
\vspace{-3mm}%
\begin{longtable*}{
@{}
p{\dimexpr 2cm-\tabcolsep}
p{\dimexpr\textwidth-\tabcolsep-2cm}
@{}
}%
}{\end{longtable*}}
}
\setabbreviationstyle[acronym]{long-short}
% Setup list of symbols
\newglossary{symbolslist}{syi}{syg}{}
\glsaddstoragekey{unit}{}{\glsentryunit}
\newglossarystyle{symbunitlong}{
\setglossarystyle{long3col}%
\renewenvironment{theglossary}{%
\vspace{-3mm}%
\setlength{\LTleft}{0pt}%
\begin{longtable*}{%
@{}
p{\dimexpr 2cm-\tabcolsep}
p{\glsdescwidth}
r
@{}
}%
}{\end{longtable*}}
\renewcommand*{\glossentry}[2]{%
\glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1} & \glsentryunit{##1}\\
}%
}
\newacronym[
plural={Test},
firstplural={Test (Test)},
description={Test}]
{Test}{Test}{Test}
\newacronym[
plural={Test1},
firstplural={Test1 (Test1)},
description={Test1}]
{Test1}{Test1}{Test1}
\glsxtrnewsymbol[
description={test0},
unit={m},
sort={a}]
{x}{x}
\glsxtrnewsymbol[
description={test1},
unit={m},
sort={a}]
{y}{y}
\makeglossaries
\glsadd{x}
\glsadd{y}
\glsadd{Test}
\glsadd{Test1}
\begin{document}
\printglossary[type=\acronymtype,style=mylong,title=Abkürzungsverzeichnis]
\printunsrtglossary[type=symbols,style=symbunitlong,title=Symbolverzeichnis]
\end{document}
잊지 마세요\usepackage[T1]{fontenc}