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

Implement footnotes for LaTeX output #314

Open
yihui opened this issue Mar 17, 2023 · 0 comments
Open

Implement footnotes for LaTeX output #314

yihui opened this issue Mar 17, 2023 · 0 comments

Comments

@yihui
Copy link

yihui commented Mar 17, 2023

Currently LaTeX output for footnotes is not implemented:

cmark-gfm/src/latex.c

Lines 447 to 449 in c32ef78

case CMARK_NODE_FOOTNOTE_DEFINITION:
case CMARK_NODE_FOOTNOTE_REFERENCE:
// TODO

I don't have much expertise on C but I wonder if the team is interested in getting it implemented. Basically what we need to do is to add the footnote content to \footnote{} in the case of CMARK_NODE_FOOTNOTE_REFERENCE, and output nil in the case of CMARK_NODE_FOOTNOTE_DEFINITION .

  case CMARK_NODE_FOOTNOTE_DEFINITION:
    break;
  case CMARK_NODE_FOOTNOTE_REFERENCE:
    if (entering) {
      LIT("\\footnote{");
      // How can I get the footnote content here?
    } else {
      LIT("}");
    }
    break;

Thanks!

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