-
Notifications
You must be signed in to change notification settings - Fork 31
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
Minus Operator not working #59
Comments
The minus operator currently has no effect on the LaTeX renderers. It is accepted by the parser to remain compatible with Pandoc, but Pandoc's behavior does not map well to the functionality provided by BibLaTeX, Natbib, and LaTeX, so it is ignored. What behavior would you expect? |
Actually I would expect something like this:
The last one is offtopic but I would like this kind of a behavior. |
Currently, the Markdown package has limited control over the formatting of citations. This is by design, so that the users can control the formatting of citations by changing the configuration of the citation backends. For BibLaTeX and Natbib, a distinction is made between text citations ( If you desire this functionality, I encourage you to redefine the corresponding citation renderers (cite and textCite) to use the BibLaTeX |
But wouldn't that mean I lose the normal functionality if I understand you correctly? I thought it is a feature. Because in your manual there is this example given:
|
You would need to hardcode the appearance of the citations in your renderer. For example, the
This is only an example of the syntax, which is taken from Pandoc. The default LaTeX renderers ignore the minus sign, as explained above. As a general rule, the default plain TeX / LaTeX / ConTeXt renderers are not required to be complete, and are expected to be redefined by the users if they require a specific rendering. We try to provide sane defaults where possible. |
Sure I understand. I already redefined the image renderer but I don't get my head around the logic to reimplement the cite and textcite renderer.
How to know if a minus or plus is used? Because at other places the documentation says that the supress_author is a boolean value.
How do I get the values from this array? This what I have now. I removed the checks from the default implementation. But I don't know how to check the value of suppress_author?
I also created modified version of the citations macros ...
How do I check in the renderer if a token (- or +) was used? Unluckily my knowledge of latex is limited. Is this the right direction that I'm going? I'm guessing it's the |
Sorry, a crucial information was missing from the user manual: This is because the conversion of the manual from
It is a boolean value inside the Lua Markdown reader. After export to plain TeX, the boolean value is represented as either
That is correct. |
Ok that is great info 🙂. But what happens if there is no |
The You can play around with this using the Lua CLI interface: $ kpsewhich -a markdown-cli.lua
/usr/local/texlive/2018/texmf-dist/scripts/markdown/markdown-cli.lua
/home/witiko/texmf/tex/latex/markdown/markdown-cli.lua
$ texlua ~/texmf/tex/latex/markdown/markdown-cli.lua citations=true <<< '-@doe92'
\input ./ff47cb1c5d2c5d9113914a50761a1eb3.md.tex\relax{}
$ cat ff47cb1c5d2c5d9113914a50761a1eb3.md.tex
\markdownRendererTextCite{1}-{}{}{doe92}\relax
$ texlua ~/texmf/tex/latex/markdown/markdown-cli.lua citations=true <<< '@doe92'
\input ./a728f93f02f0e2812786d05d511e036f.md.tex\relax{}
$ cat a728f93f02f0e2812786d05d511e036f.md.tex
\markdownRendererTextCite{1}+{}{}{doe92}\relax
$ texlua ~/texmf/tex/latex/markdown/markdown-cli.lua citations=true <<< '+@doe92'
\input ./3f73b9201b0b24e9b897dfd478f96790.md.tex\relax{}
$ cat 3f73b9201b0b24e9b897dfd478f96790.md.tex
+@doe92\relax |
My problems with postnotes and prenotes was solved in issue #58.
I only got one problem left. The minus operator (-) is not working.
Input:
Output:
I created a MWE in overleaf https://www.overleaf.com/read/rhrgjhqyvhfp to demonstrate it.
The text was updated successfully, but these errors were encountered: