-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
LaTeX Reader: \expandafter
support
#3983
Comments
Since we have the source file in the Token, I think that in theory we could temporarily add the directory of the source file containing an |
We already parse as if |
OK, we don't yet support |
Currently it's just treated as a synonym for `\newcommand`. Handles the second case mentioned in #3983.
\expandafter
support
Forgot to fix the path on include graphics inside included files. |
Never mind, we can't do what I thought we could with the images. |
Great, thanks!
Why not? Could we do something else instead? |
+++ Mauro Bieg [Oct 20 17 08:14 ]:
Great, thanks!
Since we have the source file in the Token, I think that in theory
we could temporarily add the directory of the source file containing
an \includegraphics command to the resource path.
Never mind, we can't do what I thought we could with the images.
Why not? Could we do something else instead?
Because the actual loading of images occurs not in the LaTeX
reader, which still has information about the tokens, but in
the PDF module, which only has the Pandoc AST.
|
Note: I was able to convert ctfp.tex to HTML after fixing the bad Of course the image paths did not work. They worked with @mb21, was your suggestion actually to modify the image path itself in the AST, so that it points to e.g. |
yes, that's what I had in mind. I tried generating HTML and ePub and in both the images were broken/not included and it seems like the above would resolve it. This should then also work with |
OK, looked more closely. He's actually doing something rather fancy here:
This redefines I think the best I can do is to suggest that you use |
ah, I see... thanks! |
The LaTeX source mentioned in #3971 looks already much better, impressive! There seems to be only one more thing to make it compile. The two testcases should look something like:
Info about \makeatletter...
Finally, images in the AST have their path relative to the included file (included via
\input{file.tex}
) instead of the root file. That's why they are not part of the generated epub (Should I raise a separate issue for that?).The text was updated successfully, but these errors were encountered: