Open jeroen opened 7 months ago
Seems like a reasonable syntax. Might there be issues in some cases with the space before the comment?
Seems like a reasonable syntax. Might there be issues in some cases with the space before the comment?
I can't think of any. But we could remove the space if that is safer.
I guess it should be okay to leave the space. Have you tested a range of documents with this, to make sure there are no adverse effects?
There has been a request from the R community to support some sort of
sourcepos
feature for latex output, such that we can map problems/typos in latex back to the input md (similar to HTML).Is this something that we may want to support support? If so, what would be a good format? Given that sourcepos is not part of the spec and opt-in, hopefully we have some room to experiment.
This PR shows the most simple example that I could come up with. It is similar to the html version of render_sourcepos but instead adds a latex comment
%
before every CR (except for within verbatim) with the sourcepos numbers.Below example output of Test.md.