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

Bug with referencing inside a definition list #13

Closed
adityam opened this issue Feb 23, 2020 · 4 comments
Closed

Bug with referencing inside a definition list #13

adityam opened this issue Feb 23, 2020 · 4 comments

Comments

@adityam
Copy link

adityam commented Feb 23, 2020

Consider the following markdown file

Assumption #big

:   Big assumption

Lemma #

:   A random lemma

Lemma #

:   A random lemma

Now we derive a result which uses [Assumption #](#assumption:big).

Lemma #

:   Under [Assumption #](#assumption:big), we have ... 

Processing it using pandoc --filter pandoc-numbering --to=markdown gives

[**Assumption 1**]{#assumption:big .pandoc-numbering-text .assumption}

:   Big assumption

[**Lemma 1**]{#lemma:1 .pandoc-numbering-text .lemma}

:   A random lemma

[**Lemma 2**]{#lemma:2 .pandoc-numbering-text .lemma}

:   A random lemma

Now we derive a result which uses [Assumption 1](#assumption:big).

[**Lemma 3**]{#lemma:3 .pandoc-numbering-text .lemma}

:   Under [Assumption 3](#assumption:big), we have ...

Note that in Lemma 3, the "Assumption #" got translated to "Assumption 3" rather than "Assumption 1".

@aubertc
Copy link

aubertc commented Mar 1, 2020

I can reproduce your bug.
You can side-step it using the short-cut notation.
I'm assuming it really is a bug, and not a feature, since the "usual" way of referencing your assumption (cf. this page) still creates a bug.

Assumption #big

:   Big assumption

Lemma #

:   A random lemma

Lemma #

:   A random lemma

Now we derive a result which uses [%D %n](#assumption:big).

Lemma #

:   Under 

    - [Assumption #](#assumption:big), your example, does not work
    - [%D %n](#assumption:big), this solution should work, but does not either.
    - @assumption:big, this works.

produces:

Assumption 1

Big assumption

Lemma 1

A random lemma

Lemma 2

A random lemma

Now we derive a result which uses Assumption 1.

Lemma 3

Under

  • Assumption 3: your example, does not work
  • Lemma 3, this solution should work, but does not either.
  • Assumption 1, this works.

Note that if you are using pandoc-citeproc at the same time, the order of the filters is important.

@adityam
Copy link
Author

adityam commented Mar 2, 2020

Thanks! This workaround is sufficient for me.

@chdemko
Copy link
Owner

chdemko commented Mar 29, 2020

This is a bug. I have to look at it

@adityam
Copy link
Author

adityam commented Mar 30, 2020

Thanks a lot!

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

3 participants