0

I have a very particular problem. I wrote my PhD in a certain style but now the publishing agency asked me to use their stylesheet. Since applying it, one of the problems I got is that the edges of my tables don't close anymore :

enter image description here

When I use \begin{tabularx}, the tables look fine, but in this case, I need to use \begin{tabular} so I can specify that each column can be max. 3.4mm (otherwise the table goes over the edge of the page with no linebreak happening).

Here the code :

\documentclass[openany,french]{book}
  \usepackage[small]{dgruyter}
  \usepackage{microtype}
  \usepackage{fontspec}
  \usepackage[main=french,italian, spanish, portuguese, latin, greek]{babel}
  \usepackage{amsmath,amsfonts,amssymb}
  \usepackage{graphicx}
  \usepackage{lmodern}
  \usepackage{xcolor,colortbl}
  \usepackage{slantsc}
  \usepackage{longtable} 
   \usepackage{tablefootnote}
  \usepackage{tabularx,latblex}
  \usepackage{array}
  \usepackage{adjustbox}
  \usepackage{caption}
  \usepackage{makecell}
  \usepackage{multirow}

  \begin{document}

  \begin{center}
      \begin{small}
       \begin{tabular}{|>{\arraybackslash}p{3.4cm}|>{\arraybackslash}p{3.4cm}|>{\centering\arraybackslash}p{3.4cm}|}
    \textbf{Suffixe en graphie classique} & \textbf{Suffixe en graphie phonématique} & \textbf{Nombre de lexèmes}\\
    \hline
    \textit{-\={a}tus} & */-\textquotesingle{}at-u/ & 22 \\
    \hline
    \textit{-bilis} & */\textquotesingle{}-βil-e/ & 8 \\
    \hline
    \textit{-ium} & */\textquotesingle{}-i-u/ & 53 \\
    \hline
    \textit{-ivus} & */\textquotesingle{}-iβ-u/ & 7 \\
    \hline
    \textit{-m\u{e}ntum} & */-\textquotesingle{}mɛnt-u/ & 27 \\ 
    \hline
    \textit{-or(e)} & */-\textquotesingle{}or-e/ & 70 \\
    \hline
    \textit{-\={o}ria}/\textit{-\={o}rium}/\textit{-\={o}rius}  &    */-\textquotesingle{}ori-a/ / */-\textquotesingle{}ori-u/ & 44 \\
       \hline
    \textit{-\={u}ra} & */-\textquotesingle{}ur-a/ & 54\\
   \end{tabular}
   \captionof{table}{Nomenclature IV}\label{nomenclature4}
\end{small}
  \end{center}
 \end{document}

I guess it must be due to the .sty file I have to use, because in a simple layout it works fine. The only thing about tabular I could find is the following :

\RequirePackage{tabularx}[2014/05/13]
\def\TX@endtabularx{%
  \expandafter\expandafter\expandafter
     \TX@find@endtabularxa\csname end\TX@\endcsname
     \endtabularx\TX@\endtabularx\TX@find@endtabularxa
   \expandafter\TX@newcol\expandafter{\tabularxcolumn{\TX@col@width}}%
  \let\verb\TX@verb
  \def\@elt##1{\value{##1}\the\value{##1}\relax}%
  \edef\TX@ckpt{\cl@@ckpt}%
  \let\@elt\relax
  \TX@old@table\maxdimen
  \TX@col@width\TX@target
   \global\TX@cols\@ne
   \TX@typeout@
    {\@spaces Table Width\@spaces Column Width\@spaces X Columns}%
   \TX@trial{\def\NC@rewrite@X{%
           \global\advance\TX@cols\@ne\NC@find p{\TX@col@width}}}%
   \loop
     \TX@arith
     \ifTX@
     \TX@trial{}%
   \repeat
  {\let\@footnotetext\TX@ftntext\let\@xfootnotenext\TX@xftntext
    \csname tabular*\expandafter\endcsname\expandafter\TX@target
     \the\toks@
   \csname endtabular*\endcsname}%
 \global\TX@ftn\expandafter{\expandafter}\the\TX@ftn
 \ifnum0=`{\fi}%
  \expandafter\expandafter\expandafter
  \TX@find@endtabularxbb
   \expandafter\end\expandafter{\TX@}%
   \endtabularx\TX@\endtabularx\TX@find@endtabularxb}

Here you can see the full .sty file : dgruyter.sty

Can anyone help?

9
  • 1
    don't post disconnected fragments, (and mostly the source of tabularx which you are not using) post a small but complete document that people can run to see the problem, then it should be easy to debug and help. Commented Feb 15, 2020 at 19:36
  • the heavy top and bottom rule, and the side rules are not from the code you show. Commented Feb 15, 2020 at 19:37
  • Hope now it's clearer... Commented Feb 15, 2020 at 19:56
  • Oh that style:( Line 24 completely breaks latex (I reported it to them years ago but it still seems to be the same...) Commented Feb 15, 2020 at 19:58
  • 1
    Try issuing \baretabulars in the preamble after \usepackage{dgruyter}. (Fished out from memory, can't test now.)
    – campa
    Commented Feb 15, 2020 at 20:02

2 Answers 2

2

\baretabulars in the preamble after \usepackage{dgruyter} works perfectly to make the tables look as they should be.

4
  • 1
    @Sebastiano This is an answer to the question. dgruyter.sty redefines tabular but provides \baretabulars to restore LaTeX's original definitions.
    – campa
    Commented Feb 15, 2020 at 21:09
  • @campa Can I restore my flag? Excuse me for my mistake. I have removed my delete. I hope that the answer not will delete.
    – Sebastiano
    Commented Feb 15, 2020 at 21:11
  • 2
    @Sebastiano Nothing to be sorry about. I know it only because I've had to do with this sorry style before :-)
    – campa
    Commented Feb 15, 2020 at 21:13
  • @campa I reiterate my apology also with another method :-)
    – Sebastiano
    Commented Feb 15, 2020 at 21:18
0

Does the publisher require the vertical lines, and the horizontal lines between rows?

I ask because the .sty file uses the booktabs package which is designed to work without any vertical lines.

The documentation is here, or here for the French version. It contains a long essay about why you shouldn't use vertical lines in tables, and why it makes no attempt to make them join up. If the publisher has used the booktabs package, this suggests to me that they don't want verrical lines.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .