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

Citations inside Listings Captions do not work #4

Open
cagix opened this issue Jan 15, 2020 · 1 comment
Open

Citations inside Listings Captions do not work #4

cagix opened this issue Jan 15, 2020 · 1 comment

Comments

@cagix
Copy link
Owner

cagix commented Jan 15, 2020

something like

```{.python caption="The preprocessing step, cf. [@Nystrom2018]" #lst:huh}
def foo():
""" Wuppie! """
pass
```

will be translated using pandoc --filter=pandoc-citeproc --listings xxx.txt -o xxx.pdf into something like

Listing 1: ]The preprocessing step, cf. [@Nystrom2018]

However, I'd expect something like

Listing 1: The preprocessing step, cf. (Nystrom 2018)

upstream issue: jgm/pandoc#6068

@cagix cagix self-assigned this Jan 19, 2020
@cagix
Copy link
Owner Author

cagix commented Jan 19, 2020

from a pandoc point of view (cf. jgm/pandoc#6068 (comment)) this is not a caption but merely an attribut to a fenced div. pandoc won't handle citations inside attributes.

a filter like pandoc-crossref could be helpful, but would need also some haskell tools installed.

as there are plans to include pandoc-crossref into pandoc/dockerfiles (cf. pandoc/dockerfiles#30), we could base our docker file onto pandoc/dockerfiles and take advantage of the (then included) pandoc-crossref to resolve this issue.

this would also allow markdownish cross-references inside the document, which work currently only by using latex mechanisms (\label{} and \ref{}) ...

@cagix cagix removed the enhancement label Jun 27, 2023
@cagix cagix removed their assignment Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant