-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
LaTeX reader: ignore \noindent and flush(left|right) environments. #3956
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
base: main
Are you sure you want to change the base?
Conversation
I don't understand why we'd want to omit |
Okay, fair enough. I'm trying to cut down on the 'skipped content' warning noise, since they can indicate possibly-important things getting lost; I'd figured that How about dropping |
+++ bucklereed [Oct 07 17 02:19 ]:
How about dropping \noindent if raw_tex is off, and preserving it as a
raw inline if it's on? The only issue with that is that I will need to
figure out how to test the absence of warnings.
No, I think that when raw_tex is off it's particularly
important to warn about skipped content, since in many cases
people may be expecting something not to be skipped.
|
Though, to be sure, we do ignore some things without warning, like Another thing to consider is whether these warnings for skipped content should be INFO rather than WARNING level. That would reduce noise. |
I was thinking of having a whitelist of presentational-ish things that are OK to skip if I am not sure about knocking the warning level down. The warnings are good; there are just a lot of them, and I suspect that a lot of that lot will be presentational stuff that can be dropped if the aim isn't to round-trip back to the input format. So, what I'd like is for pandoc to ignore stuff that it knows won't survive a trip through the AST without using raw blobs. Here's another straw proposal: |
I think that's a great idea. It's hard to debug conversion of a huge document if it's full of "skipped \noindent" warnings. Maybe we could just reduce the logger level for the things in the whitelist from WARNING to INFO as proposed by jgm? Regardless of the |
+++ Mauro Bieg [Oct 23 17 08:10 ]:
I was thinking of having a whitelist of presentational-ish things
that are OK to skip
I think that's a great idea. It's hard to debug conversion of a huge
document if it's full of "skipped \noindent" warnings. Maybe we could
just reduce the logger level for the things in the whitelist from
WARNING to INFO?
That's not currently possible, since this type of LogMessage
is assigned WARNING log level. (We could introduce another
message like InnocuousSkippedContent, but it seems a bit
ugly.)
One idea would be to reduce the log level for all skipped
content to INFO. Not sure about that, but it might make
sense.
|
Not sure about that... in the discussed use-case, if pandoc skips something it doesn't understand, I'd like to know about it (because e.g. in the case of \lettrine, I needed to either fix pandoc or the latex source to get the part of that text). On the other hand, if pandoc is just skipping known presentational command (like \noindent), then I would like that to be somehow separable from the former (e.g. the former WARNING, the latter INFO). I haven't looked at |
+++ Mauro Bieg [Oct 23 17 18:57 ]:
One idea would be to reduce the log level for all skipped
content to INFO.
Not sure about that... in the discussed use-case, if pandoc skips
something it doesn't understand I'd like to know about it (because
B4BD
e.g.
in the case of \lettrine, I needed to either fix pandoc or the latex
source to get the part of that text). On the other hand, if pandoc is
just skipping known presentational command (like \noindent), then I
would like that to be somehow separable from the former (e.g. the
former WARNING, the latter INFO).
Given that pandoc will typically skip quite a bit in any
real-world HTML or LaTeX document, I'm now thinking that it
makes more sense to make this an INFO level message.
Warnings are things that almost certainly require a fix,
while with the majority of these, you'll just want to ignore
them.
Of course, sometimes they're important, but I'd rather let
the author rather than pandoc figure out which are important
and which aren't (using --verbose to get the output).
|
I think this PR should be closed, and we should perhaps open an issue suggesting changing the log level of the "skipped content" messages to INFO. Though that is something that certainly needs more discussion. |
No description provided.