Open stroobandt opened 4 years ago
Hi Serge,
I agree that the inconsistent spacing is an irritant. There are some historical and technical issues in play.
First, a plea: It would be really helpful if someone could identify how the handling of figures/equations/tables is going to change in upcoming pandoc releases. The specific concerns are outlined below.
Originally figures, equations, and tables in pandoc were unattributed. The pandoc-xnos filters enabled attributes for all three, and always used a leading space. This choice was consistent with the syntax for attributed headers.
Pandoc 1.16 introduced image attributes with no leading space. I let pandoc do the processing wherever possible, and so pandoc-fignos stopped supporting figure attributes with a space. For pandoc-eqnos, supporting either (leading space or no leading space) was easy to do, and so I did that. For pandoc-tablenos, I continued to require table attributes to have a leading space because it makes processing easier.
Pandoc 2.10 introduced attributes in the Table AST element. A mechanism for attributing tables in markdown was not included. I do not know what the plans are for this.
Pandoc 2.10.1 introduced a generic attributes extension which is not yet supported by the markdown reader. This is going to allow for attributes placed BEFORE block elements and after inline elements. Notice that this is inconsistent with what what is currently done for figures and headers. I do not know if there are plans to resolve this discrepancy.
Pandoc's 2.10.1 Release Notes also say "Since the Pandoc AST doesn’t include attributes on each element type, the attributes will sometimes be added by creating a surrounding Div or Span container." Equations currently fall into this category, but maybe there are plans to attribute equations. I do not know.
The upshot is that pandoc's authors are deciding a way forward on attributes for figures/equations/tables, and isn't clear to me what they will do. This is not to say that it isn't documented, but rather that I have not yet looked. There are a number of outstanding Issues with the pandoc-xnos filters that I need to address. I would therefore be grateful if someone could investigate -- hence my plea at the top. All of the possibilities outlined above are going to be a challenge to support. The sooner we can get in front of this, the better.
As it pertains to the present Issue: My instincts are to wait and see what pandoc's authors choose to do, and make the best decisions possible in response.
Cheers, Tom
Dear Tom,
If I were you, I would drop Prof. John MacFarlane, Pandoc's benevolent dictator for life, a line. As a professor in philosophy he is as kind spirited as you are. There is also the Pandoc discussion group or the Github issue tracker. Prof. MacFarlane, with Github handle jgm
, has a habit of getting involved directly and in a very fair manner. I experienced this first hand. I would not hesitate to air your concerns in exactly the same way as you did here.
While you are at it, please also ask him to list pandoc-xnos
under the "Citations and cross-references" section on the Pandoc Extras page. The fork pandoc-crossref
is already listed. If you are not listed here, it will be hard for folks to find your project and collaborator numbers will remain low.
I think it is really time to reach out to Prof. MacFarlane. He will certainly appreciate your accomplishments. I hope this helps.
Serge
Thanks, Serge. My concerns aren't with pandoc's development. It is more that I need some help in identifying and preparing for what changes are coming. But I will reach out to jgm about the Pandoc Extras page as you suggest. Cheers, Tom.
As for the Extras page, please, remember that one of your "unique selling propositions" so to speak. is "easy to install using Python's pip3
package manager."
Jgm agreed and has posted pandoc-xnos on the Pandoc Extras page! :o)
That is great news and long overdue! Undoubtedly, things will now get busier over here.
I have no clue whether fulfilling this request is even at all possible. Nevertheless, I would like to have this mentioned over here. Consider this:
![Caption.](image.png){#fig:id}
is allowed.![Caption.](image.png) {#fig:id}
is not allowed.Table: Caption. {#tbl:id}
is allowed.Table: Caption.{#tbl:id}
is not allowed.$$ y = mx + b $$ {#eq:id}
is allowed.$$ y = mx + b $${#eq:id}
is equally allowed.I take issue with the fact that the space preceding the curly braces (accolades) is required for tables, forbidden for images and optional for display equations. This kind of can get into one's clothes and break the flow when creating content.