question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rebber: some parser mistakes

See original GitHub issue

From this attempt, I notice some mistakes in the parsing process:

  • Parser bug: \addSecret\addSpoiler (see below)
  • Parser bug: \includeGraphics\includegraphics (this is a LaTeX base command, not a custom one, so it is lowercase). See #119 anyway, because \image is better 😉
  • Parser bug (?): insecable space (U+202F) before each : (I don’t know if it is the parser that add these, anyway using a unicode-supported flavor of TeX may also be a solution, as XeTeX). Also, I don’t know if you force the replacement from ' to typographic one, but TeX prefers to deal with that on its own.
  • Parser bug: \captionof{path}\captionof{figure}{path}
  • Parser bug: some ## were left intact in the document (but were escaped correctly, so it didn’t cause any issue 😃 )
  • Parser bug: what is \ref{} supposed to be translated from ? Footnotes or something else ? (because if there is \ref{}, there should be \label{}) Ok, I get it. Every time you have a footnote, you put \ref{t}\footnote{\label{t} xxx}, which is not coorrect. That should be \footnotetext[number]{\label{t} xxx} (where number is the number displayed) and \ref{t} where there is a [^t] (actually, \textsuperscript{\ref{t}}). Also, you can prefix the labels (i.e. \ref{footnote:t}) to avoid confusion if you want 😃
  • You are not using the custom title commands.

and, due to this experiment,

  • \addSpoiler{}\begin{Spoiler} (spoilers are now defined in an environement, which can support many things: images, quotation and … Code, of course)
  • \begin{codeBlock}\begin{CodeBlock} (because if we have defined rules, is to follow them ^^)

There is also one error that we need to work on (code in spoilers, https://github.com/zestedesavoir/latex-template/issues/64) (fixed) and one that is due to LaTeX: when using

\includegraphics{images/25d8a05f-eefa-41d8-879f-be632c59bf31.png.960x960_q85.jpg}

… LaTeX thinks that the extension of the image is .png.960x960_q85.jpg, which it does not recognize, of course. I don’t know yet what to do against this stupid issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
pierre-24commented, Aug 3, 2017

Sadly, inputenc is already included, and it only treat partially the unicode. And when we say that XeTeX is able to handle unicode, it only means that we can include chinese characters if we want.

LaTeX was (and is still) designed to take care of typographic stuffs on its own, and was not designed to handle proper typography made with unicode characters (and is still not, from my tests). For example, LaTeX will replace the “normal” apostrophe with the typographic one by default, and an already included typographic apostrophe will look bad because it is not taken care of properly. LaTeX also add insecable spaces on its own (and based on the language), and once again, already included ones are weirdly rendered. So, if it is possible to deactive this package for rebber, I think it would be better, because I’m pretty sure that most of the things that packages does, LaTeX does it as well (and if not, of course, we can still keep some stuffs from it).

But no, it is not a bug ^^

1reaction
pierre-24commented, Aug 11, 2017

Just to mention two important changes induced by https://github.com/zestedesavoir/latex-template/pull/65:

  • \addSpoiler{}\begin{Spoiler} (spoilers are now defined in an environement, which can support many things: images, quotation and … Code, of course)
  • \begin{codeBlock}\begin{CodeBlock} (because if we have defined rules, is to follow them ^^)
Read more comments on GitHub >

github_iconTop Results From Across the Web

parsing – Rubberduck News - WordPress.com
After all modules have finished parsing, the overall parser state is evaluated. If there has been any parser error, the parsing process ends...
Read more >
rails error, couldn't parse YAML - Stack Overflow
I had trouble with the rubber-postgresql.yml, went through with the editor fixing the references like this, it worked. The rest of the rubber...
Read more >
JSON parser exception after refreshing token · Issue #13 · vitalif ...
Try out the latest master, I've just added some diagnostic information that will help resolve various bugs related to error response handling... And...
Read more >
1219363 - JSON parse syntax errors not caught by onerror and ...
4664.55. I just ran the jsfiddle from the above post, and confirmed that the JSON.parse error is not caught by the `unhandledrejection` listener....
Read more >
SyntaxError Unexpected EOF While Parsing Python Error ...
In this article, we'll see why this error occurs and how to fix it with some examples. How to Fix the “SyntaxError: Unexpected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found