adamb924 / ot-tableau

Optimality theoretic tableau in LaTeX
3 stars 1 forks source link

Sequence `\; \textsc{...}` broken in tabulars #1

Closed kopeckyf closed 2 years ago

kopeckyf commented 2 years ago

Hey there,

the sequence \; \textsc{...} is broken in tabulars when ot-tableau is loaded. For example:

\documentclass{article}
\begin{document}
\begin{tabular}{ll}
  Hello\; \textsc{hello} & World
\end{tabular}
\end{document}

compiles as expected. But adding \usepackage{ot-tableau} breaks the code:

! Argument of \textsc  has an extra }.
<inserted text> 
                \par 
l.5 ^^I^^IHello\; \textsc

I scanned ot-tableau's source code and some of its dependencies for definitions of \; but didn't find any.

Best, Felix

kopeckyf commented 2 years ago

(My ot-tableau version is 2021-05-19)

adamb924 commented 2 years ago

Thank you for discovering that. I will have a look, but my initial thought is that some package that ot-tableau loads is creating the error, since (as you say) I don't define that macro. In the meantime I noticed that the problem can be addressed by adding curly braces:

\documentclass{article}
\usepackage{ot-tableau}
\begin{document}
\begin{tabular}{ll}
  Hello\;{} \textsc{hello} & World
\end{tabular}
\end{document} 
kopeckyf commented 2 years ago

Thanks for the quick reply!

Inserting {} is helpful!

I also noticed that the effects of \; seem to be disabled, i.e. no space is inserted by the command. This might have to do with the re-definition of \; by some other package.

adamb924 commented 2 years ago

It turned out to be a problem with the tipa package, which is loaded by default. You can use the notipa option to solve this. (Mnemonic fail: notipa was intended as “no tipa” but looks like “not ipa”!)

\documentclass{article}
\usepackage[notipa]{ot-tableau}
\begin{document}
\begin{tabular}{ll}
  Hello\; \textsc{hello} & World
\end{tabular}
\end{document}

As I imagine tipa is used very rarely now that we have XeTeX, I guess I'll eventually make it not load tipa by default.

kopeckyf commented 2 years ago

Well spotted! Thanks a lot!