Skip to content
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

clean_refs plugin cleans refs overly eagerly #13

Open
kfogel opened this issue Jan 6, 2020 · 0 comments
Open

clean_refs plugin cleans refs overly eagerly #13

kfogel opened this issue Jan 6, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@kfogel
Copy link
Member

kfogel commented Jan 6, 2020

On the jinjification branch, as of commit 801b4c3, the pipeline/plugins/60_clean_refs.py plugin is perhaps too eager about cleaning out refs. We have a document containing this line in the LaTeX source:

TODO: address ref:bf388517

which right now of course gets rendered as:

TODO: address

We will sometimes want to be able to name refs in documents so that they're visible. One solution would be to tighten the regexp, so that it only cleans refs that are surrounded by parentheses or by square braces. Another solution would be to take ref-cleaning out of that stage of the pipeline entirely and instead just create a standard \ign{ref:blahblah} LaTeX command that expands its argument to the empty string. Actually we already have this, with \otsref as the command instead of \ign, but maybe the latter would be better because it's shorter.

Filing this issue so we don't forget about the problem, though it's certainly not an urgent thing. I've marked the issue with the "help wanted" label because I'm not positive we should declare this a bug, though I do lean that way. Anyway, one can always work around it right now by doing something like this:

TODO: address ref:\otsref{fish}bf388517
@kfogel kfogel added the help wanted Extra attention is needed label Jan 6, 2020
@kfogel kfogel changed the title On 'jinjification' branch: clean_refs plugin cleans refs overly eagerly clean_refs plugin cleans refs overly eagerly Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant