8000 LaTeX reader: support (ignore) stackengine by ip1981 · Pull Request #6898 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

LaTeX reader: support (ignore) stackengine #6898

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ip1981
Copy link
Contributor
@ip1981 ip1981 commented Nov 28, 2020

No description provided.

@jgm
Copy link
Owner
jgm commented Nov 29, 2020

We support commands from some more common packages, but it would be madness to try to support every package. I've never heard for stackengine. What does it do? Why do you need to ignore this? Won't it be parsed as raw tex, which will be ignored anyway in most formats?

@ip1981
Copy link
Contributor Author
ip1981 commented Nov 29, 2020

It turned out to be the simplest way to adjust (vertically) table cells in some cases. But since pandoc doesn't understand it, the content of the cells is lost in translation 😏

So the stackengine is a means to make an original document neat and this PR fixes translation to other forms.

Original: :)

Screenshot_2020-11-29_14-13-27

LaTeX:

      \begin{tabularx}{\textwidth}{X|r|r}
        \hline\hline
        & \multicolumn{2}{c}{От атомизатора}\\
        \cline{2-3}
        & 4 фута & \addstackgap{$5\frac12$ футов} \\
 %...

PDF:
Screenshot_2020-11-29_14-09-42

PDF without \addstackgap:
Screenshot_2020-11-29_14-16-17

HTML with this PR:
Screenshot_2020-11-29_14-10-04

HTML without this PR:
Screenshot_2020-11-29_14-18-19

@jgm
Copy link
Owner
jgm commented Nov 29, 2020

Could you work around this by giving a definition of the macro in your document:

\newcommand{\addstackgap}[1]{\rule{0pt}{1.5em}#1}

or something like that?

@ip1981
Copy link
Contributor Author
ip1981 commented Nov 29, 2020

Could you work around this by giving a definition of the macro in your document:

\newcommand{\addstackgap}[1]{\rule{0pt}{1.5em}#1}

or something like that?

I tried this (\rule) too :) It adds an unwanted hr in HTML for example.

@jgm
Copy link
Owner
jgm commented Nov 29, 2020

Maybe try with \hspace?

@ip1981
Copy link
Contributor Author
ip1981 commented Nov 29, 2020

Maybe try with \hspace?

And that too (assuming \vspace) :) And \\[2em] neither do the right thing:

Screenshot_2020-11-29_20-28-13

@jgm
Copy link
Owner
jgm commented Nov 29, 2020

I've just pushed a fix so that \rule with width 0 will no longer create a horizontal rule.
That may help with the first solution proposed above.

@@ -0,0 +1,18 @@
# stackengine
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be renamed test/command/6898.md -- that makes it easier for us to locate the issue to which a test corresponds.

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

Successfully merging this pull request may close these issues.

2 participants
0