Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

缩略词表在overleaf上编译后,列宽不符合模板要求了,请问如何更改呢 #214

Open
TheWind111 opened this issue Mar 14, 2023 · 3 comments

Comments

@TheWind111
Copy link

编译后;
image
模板:
image

@note286
Copy link

note286 commented Mar 14, 2023

\newglossarystyle{uestc-chinese}{
\setlength{\glsdescwidth}{.3\textwidth}
\setlength{\glspagelistwidth}{.3\textwidth}
\renewenvironment{theglossary}%
{\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
\renewcommand*{\glossaryheader}{%
\heiti 缩略词 &\heiti 英文全称 &
\heiti 中文全称 \tabularnewline\endhead}%
\renewcommand*{\glsgroupheading}[1]{}%
\renewcommand{\glossentry}[2]{
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glsentrylong{##1} & \glsentrydesc{##1}\tabularnewline
}
\renewcommand*{\subglossentry}[3]{
\glossentry{##2}{##3}}
}

主要是下面这一行

{\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}%

@kingskymoon
Copy link

image
我修改了列宽,使得第二列略宽,为什么缩略词不能左对齐

\newglossarystyle{uestc-chinese}{ 
   \setlength{\glsdescwidth}{.5\textwidth} 
   \setlength{\glspagelistwidth}{.4\textwidth} 
   \renewenvironment{theglossary}% 
   {\begin{longtable}{p{0.1\textwidth}p{\glsdescwidth}p{\glspagelistwidth}}}% 
     {\end{longtable}}% 
   \renewcommand*{\glossaryheader}{% 
     \heiti 缩略词 &\heiti 英文全称 & 
     \heiti 中文全称 \tabularnewline\endhead}% 
   \renewcommand*{\glsgroupheading}[1]{}% 
   \renewcommand{\glossentry}[2]{ 
     \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & 
     \glsentrylong{##1} & \glsentrydesc{##1}\tabularnewline 
   } 
   \renewcommand*{\subglossentry}[3]{ 
     \glossentry{##2}{##3}} 
 } 

@sikouhjw
Copy link
Contributor

我修改了列宽,使得第二列略宽,为什么缩略词不能左对齐

这是你的认知错误,修改列宽跟对齐没有因果关系。即使不修改,也没有做到你所说的对齐。

如果要去掉多出来的空格,需要修改

\renewcommand{\glossentry}[2]{
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glsentrylong{##1} & \glsentrydesc{##1}\tabularnewline
}

将其改为

\renewcommand{\glossentry}[2]{%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants