Here is a sample output.

NEW: TikZ book now 40% off at Amazon.com for a short time.
\tabularnewline
command doesn't give me even spaces.Code: Select all
\documentclass{article}\usepackage{array}% makes >{decl.} available\usepackage[automake, nogroupskip]{glossaries}% source: styles/glossary-long.sty\newglossarystyle{longwithseparator}{%\setglossarystyle{long}%% \renewcommand{\arraystretch}{2}%\renewenvironment{theglossary}%{\begin{longtable}[l]{>{\raggedright}p{.2\textwidth}c%@{\quad---\quad}>{\raggedright}p{\glsdescwidth}}}%{\end{longtable}}%\renewcommand{\glossentry}[2]{%\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & --- &\glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline& \tabularnewline}%}\makeglossaries% source: test-entries\loadglsentries{example-glossaries-long}\renewcommand{\glsnumberformat}[1]{[\glshypernumber{#1}]}\glsaddall\begin{document}\printglossary[style=longwithseparator]\end{document}
\arraystretch
variant?
Code: Select all
\documentclass{article}\usepackage{array}% makes >{decl.} available\usepackage[automake, nogroupskip]{glossaries}% source: styles/glossary-long.sty\newglossarystyle{longwithseparator}{%\setglossarystyle{long}%\renewcommand{\arraystretch}{2}%\renewenvironment{theglossary}%{\begin{longtable}[l]{@{}% no extra indent before the entries>{\raggedright}p{.2\textwidth}@{\quad---\quad}>{\raggedright}p{\glsdescwidth}@{}% no extra horizontal space after the entries}}%{\end{longtable}}%}\makeglossaries% source: test-entries\loadglsentries{example-glossaries-long}\renewcommand{\glsnumberformat}[1]{[\glshypernumber{#1}]}\glsaddall\begin{document}\printglossary[style=longwithseparator]\end{document}
\end{xltabular}
in the <end code> of a \newenvironment
does usually result in an error. So you have to use the (somehow internal) \xltabular
, \endxltabular
:
Code: Select all
\documentclass{article}\usepackage{array}% makes >{decl.} available\usepackage[automake, nogroupskip]{glossaries}\usepackage{xltabular}% source: styles/glossary-long.sty\newglossarystyle{xlongwithseparator}{%\setglossarystyle{long}%\renewcommand{\arraystretch}{2}%\renewenvironment{theglossary}%{\xltabular{\linewidth}{% Note: You cannot use \begin{xltabular} here.@{}% no extra indent before the entries>{\raggedright}p{.2\textwidth}@{\quad---\quad}%>{\raggedright}% optional ragged right for last columnX@{}% no extra horizontal space after the entries}%}%{\endxltabular}% Note: You cannot use \end{xltabular} here.}\makeglossaries% source: test-entries\loadglsentries{example-glossaries-long}\renewcommand{\glsnumberformat}[1]{[\glshypernumber{#1}]}\glsaddall\begin{document}\printglossary[style=xlongwithseparator]\end{document}
Ijon Tichy wrote:You even could use packageCode: Select all
Code, edit and compile here:\begin{document}\printglossary[style=longwithseparator]\end{document}xltabular to automatically stretch the table to the whole text width. But this is a little bit tricky, because
\end{xltabular}
in the <end code> of a\newenvironment
does usually result in an error. So you have to use the (somehow internal)\xltabular
,\endxltabular
:This is the same trick, that is also documented forCode: Select all
Code, edit and compile here:\documentclass{article}\usepackage{array}% makes >{decl.} available\usepackage[automake, nogroupskip]{glossaries}\usepackage{xltabular}% source: styles/glossary-long.sty\newglossarystyle{xlongwithseparator}{%\setglossarystyle{long}%\renewcommand{\arraystretch}{2}%\renewenvironment{theglossary}%{\xltabular{\linewidth}{% Note: You cannot use \begin{xltabular} here.@{}% no extra indent before the entries>{\raggedright}p{.2\textwidth}@{\quad---\quad}%>{\raggedright}% optional ragged right for last columnX@{}% no extra horizontal space after the entries}%}%{\endxltabular}% Note: You cannot use \end{xltabular} here.}\makeglossaries% source: test-entries\loadglsentries{example-glossaries-long}\renewcommand{\glsnumberformat}[1]{[\glshypernumber{#1}]}\glsaddall\begin{document}\printglossary[style=xlongwithseparator]\end{document}tabularx.
The command increases the space between the heading and the first entry. Since I didn't know whether this would bother the topic starter, I decided against it.Ijon Tichy wrote:@Bartman Why not the somehow more simple\arraystretch
variant?
You can simply changeBartman wrote:The command increases the space between the heading and the first entry. Since I didn't know whether this would bother the topic starter, I decided against it.Ijon Tichy wrote:@Bartman Why not the somehow more simple\arraystretch
variant?
\LTpre
to compensate this, e.g. add
Code: Select all
\setlength{\LTpre}{0pt}% No initial vertical skip.
Code: Select all
\setlength{\LTpre}{\smallskipamount}% Only a small initial vertical skip.
\begin{longtable}
resp. \xltabular
.Code: Select all
\documentclass[a4paper,14pt, oneside]{extarticle}\usepackage{fontspec}\setmonofont{CMU Typewriter Text}\newfontfamily\cyrillicfonttt{CMU Typewriter Text}\defaultfontfeatures{Ligatures=TeX}\setmainfont{Times New Roman}\newfontfamily\cyrillicfont{Times New Roman}\setsansfont{Arial}\newfontfamily\cyrillicfontsf{Arial}\usepackage{microtype}\sloppy\usepackage[english, russian]{babel}\makeatletter\AtBeginDocument{\let\@elt\relax}\makeatother % babel 3.40 fix% ГОСТовские настройки для полей\usepackage[left=30mm,right=10mm,top=20mm,bottom=20mm, nofoot, nomarginpar]{geometry}\setlength{\topskip}{0pt}\setlength{\footskip}{12.3pt}\usepackage{misccorr}\usepackage{indentfirst}\usepackage{enumitem}\setlength{\parindent}{1.25cm}\usepackage{setspace}\onehalfspacing\usepackage{tabularx}\usepackage{multirow, longtable}\usepackage{booktabs} %Книжные таблицы\usepackage{xltabular}\usepackage[xindy={glsnumbers=false}, nonumberlist, nopostdot, nogroupskip, toc, translate=babel, acronym, automake]{glossaries}%\usepackage{glossaries-extra}
NEW: TikZ book now 40% off at Amazon.com for a short time.