
このコードは、解決策はここにあります。
テーブルを次のように左揃えにするにはどうすればよいでしょうか?
コードは次のとおりです:
\documentclass{article}
\usepackage[acronym,toc]{glossaries}
\makeglossaries
\newacronym{uri}{URI}{Unique Resonance Identifier}
\newacronym{led}{LED}{light-emitting diode}
\newacronym{eeprom}{EEPROM}{electrically erasable programmable
read-only memory}
\glsaddall[types=\acronymtype]
\newglossarystyle{custom_acronyms}
{
\setglossarystyle{long3colheader}%
\renewcommand*{\glossaryheader}{}%
\renewcommand{\glossentry}[2]{%
\textbf{\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}}
& \glossentrydesc{##1}
& ##2
\tabularnewline}%
}
\begin{document}
No acronyms here.
%\printglossaries
\printglossary[type=acronym,style=custom_acronyms]
\end{document}
答え1
用語集は実際にはlongtableを使用して用語集を生成するので、LaTeXに表のデフォルトの余白設定を不要と伝える必要があります。これは によって行われます\setlength{\LTleft}{0pt}
。それでもまだ十分に左にない場合は、負の数を使用して表をさらに左に移動できます。\setlength{\LTleft}{-5pt}
これが私のMWEです
\documentclass{article}
\usepackage[acronym,toc]{glossaries}
\makeglossaries
\newacronym{uri}{URI}{Unique Resonance Identifier}
\newacronym{led}{LED}{light-emitting diode}
\newacronym{eeprom}{EEPROM}{electrically erasable programmable
read-only memory}
\glsaddall[types=\acronymtype]
\newglossarystyle{custom_acronyms}
{
\setglossarystyle{long3col}%
\renewcommand*{\glossaryheader}{}%
\renewcommand{\glossentry}[2]{%
\textbf{\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}}
& \glossentrydesc{##1}
& ##2
\tabularnewline}%
}
\begin{document}
Acronyms here (so that the glo file will be generated): \gls{uri}, \gls{led}, \gls{eeprom}.
%\printglossaries
\setlength\LTleft{-5pt}
\printglossary[type=acronym,style=custom_acronyms]
\end{document}
それによって