Skip to content

Invalid ')' in \newcolumntype definitions in TEI LaTeX stylesheets #771

@jlq-foss

Description

@jlq-foss

The TEI LaTeX stylesheet generates invalid \newcolumntype definitions in the preamble. For example:

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}

The leading ) is not valid LaTeX syntax. The correct syntax should use > like so:

\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{>{\arraybackslash}p{#1}}
\newcolumntype{B}[1]{>{\arraybackslash}b{#1}}
\newcolumntype{M}[1]{>{\arraybackslash}m{#1}}

Impact:

  • Causes warnings or errors if these column types are used in formulas.
  • Makes it difficult to rely on L, C, R, P, B, M column types in math mode.

Steps to Reproduce:

  1. Generate a LaTeX document from the TEI stylesheet that uses the default preamble.
  2. Inspect the generated .tex file — the \newcolumntype definitions include a leading ).
  3. Compile the LaTeX file using pdflatex or xelatex.

Suggested Fix:

  • Replace the leading ) with > in all affected \newcolumntype definitions:

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions