Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hevea spacing of tabbing looks wrong #1

Open
gasche opened this issue May 20, 2018 · 0 comments
Open

Hevea spacing of tabbing looks wrong #1

gasche opened this issue May 20, 2018 · 0 comments

Comments

@gasche
Copy link

gasche commented May 20, 2018

I recently worked on getting a Hevea output for the Menhir manual -- see the corresponding merge request. There was a bug in the visual output that I had to fix, and I think this is a problem with Hevea: I believe that the spacing of the tabbing environment is wrong, at least for this use-case.

Menhir uses tabbing to show a textual representation of parse trees, see Figure 6 in my HTML rendering. In the PDF, it looks roughly as follows:

expression
IF expression THEN expression
                   IF expression THEN expression . ELSE expression

But the default translation of tabbing by Hevea uses the class cellpadding0 for HTML tables generated by tabbing, which sets padding:0; for the <td> columns, which results in the columns between next to each other with no space in between. The Hevea output looks like this:

expression
IF expression THENexpression
                  IF expression THEN expression . ELSE expression

For the Menhir manual, I implemented a workaround, which is to replace all occurrences of cellpadding0 by cellpadding1 in the generated HTML -- see the corresponding commit. This gives me a rendering closer to what LaTeX generates.

As far as I can tell, cellpadding0 is only used for the tabbing environment (open_tabbing in latexscan.mll). What is a reason for not using cellpadding1 there instead? In my case, using cellpadding0 is a rendering bug, but are there other cases where having any padding gives worse rendering? (Where LaTeX would itself not insert any spacing when using tabbing?)

I uploaded with this report a small ZIP archive
repro-hevea-tabbing.zip which contains a minimal reproduction case. I also uploaded online the following files from this example:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant