Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Tle longtable package issue with endfirsthead etc. followed by hline #155

Open
lahvak opened this issue Mar 29, 2022 · 3 comments
Open

Tle longtable package issue with endfirsthead etc. followed by hline #155

lahvak opened this issue Mar 29, 2022 · 3 comments

Comments

@lahvak
Copy link

lahvak commented Mar 29, 2022

The longtable commands endhead, endfirsthead, endfoot and endlastfoot append {} after the command, which breaks when there is a hline right after one of these commands. For example

endhead <> hline <> "Some text"

renders as

\endhead{}\hline Some text

which fails with "misplaced \noalign". The correct LaTeX code seems to be

\endhead\hline Some text
@Daniel-Diaz
Copy link
Owner

Thanks for taking the time to open an issue.

Would never appending {} to \endhead fix this? Do you have a full example I can add to the Examples folder?

@lahvak
Copy link
Author

lahvak commented Mar 29, 2022

I don't think {} needs to be appended, but either that or a space must be there in case there is text immediately after.

I made an example that I extracted from my application: https://gist.github.com/lahvak/e561467cfac48fb272fb13c48b85bab5

feel free to use it as you see fit. Also, there is an error in the documentation for LongTable:

It says to use the package do

usepackage [] longtable

but it should be longtablep.

@Daniel-Diaz
Copy link
Owner

I found this which could be related: https://tex.stackexchange.com/questions/463694/misplaced-omit-in-table-and-at-the-end-of-a-command

I guess the real solution is to be smarter about what follows a command. Either {}, a space, or nothing.

@Daniel-Diaz Daniel-Diaz added this to the Smarter command printing milestone Jan 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants