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

place pandoc crossref attributes in new line #396

Open
fcskit opened this issue Aug 3, 2023 · 1 comment
Open

place pandoc crossref attributes in new line #396

fcskit opened this issue Aug 3, 2023 · 1 comment

Comments

@fcskit
Copy link

fcskit commented Aug 3, 2023

This is not a major issue but it would be nice if a single line break would be supported between a markdown heading or figure and a pandoc crossref attribute in curly brackets.
Currently I'm receiving an error if I place a section {#sec:seclabel} or figure attribute {#fig:label} in a new line directly after a heading or figure.

So this works:

# Heading {#sec:seclabel}
![image caption](link_to_image.png){#fig:figlabel}

but this won't

# Heading
{#sec:seclabel}

![image caption](link_to_image.png)
{#fig:figlabel}

Personally the latter is more readable to me. In particular since some markdown editors support some kind of live preview and having a heading rendered in bold letters and large font size including a {#sec:seclabel} attribute just doesn't look very nice.

@lierdakil
Copy link
Owner

lierdakil commented Aug 4, 2023

Pandoc can't parse this, so nothing I could do on pandoc-crossref side. Feel free to take this upstream

But there are issues with the proposed syntax, e.g.

# ![image caption](link_to_image.png)
{#somelabel}

what's this? There's ambiguity.

With the current setup, image attributes require no whitespace between the image and {, so this is not ambiguous:

# ![image caption](link_to_image.png) {#somelabel} 

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

2 participants