-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature request] compatibility with pandoc-crossref
filter
#6
Comments
So you're applying
|
Yes. Taking latex output as an example: no
results in this: \begin{longtable}[c]{@{}lrr@{}}
\caption{A Placetable Table}\tabularnewline
% rest of table instead of this: \begin{longtable}[c]{@{}ll@{}}
\caption{\label{tbl:table3}A Placetable Table}\tabularnewline
% rest of table All that needs to happen is that a fenced code block identifier starting with |
Right, the Pandoc AST currently doesn't have attributes on tables. That's why the pandoc-crossref filter exists and isn't part of pandoc, see pandoc issue #813. So there might be a way to get Or modify |
I'd also prefer to have What |
Thanks @mb21 and @lierdakil. I am just starting out with pandoc so am not familiar with the internals and didn't appreciate the complexity. |
@lierdakil great, if you were planning to do wrapper divs anyhow, I think that's the best solution. |
Sorry about the hold-up, but I finally got around to this. |
I will publish package candidate when I make sure it works across all relevant configurations (i.e. when tests pass) |
sound good, I'll close this issue here then... |
I've tried to use pandoc-placetable with pandoc-crossref as outlined above, but it doesn't seem to work. The reference to the table using [@TBL:table4], shows up as tbl?? Below is what I've used:
|
Huh. I assumed pandoc-placetable generates a div to keep some attributes like id, but apparently not. You can try wrapping your code block into a div with id. That said, there is a problem with caption, which I will try to fix now. |
Something like this should work with pandoc-crossref 0.1.5.3, providing it's run after pandoc-placetable.
|
Ok, this works for me. I suppose this is worth noting in the readme, at least over at pandoc-crossref. I guess a more elegant solution would have to come from pandoc-placetable unless pandoc-crossref were run first. Though for now this is fine. |
@mb21, do you think you could wrap pandoc-placetable-generated tables in a div if those have id (or for that matter classes) set? Shouldn't be too hard, I think? |
@lierdakil done: 21f16b5 |
👍 |
I noticed today that if I refer to a table using pandoc-crossref syntax inside of a caption from pandoc-placetable, it isn't referenced. For example:
That's not parsed by pandoc-crossref at all, and just stays in the caption as is. I'm not sure which of you has a better chance at this or even if it's fixable, but it would be nice to refer to other tables/figures in captions. |
I should clarify by saying that the order in which the two filters run doesn't affect this either. |
Maybe specifying pandoc-citeproc explicitly ( |
@mickley, you probably need to build pandoc-placetable with |
@lierdakil Thanks, that was it. While already compiled with inlineMarkdown, I wasn't explicitly setting it as an option for that individual table. This makes good sense though. @mb21 pandoc-citeproc doesn't factor into this at all, though it's already explicit and last in my filters. For anyone else, the correct order of filters should be:
|
It would be very helpful to get this to work with the pandoc-crossref filter. Currently the 2 don't work together.
The text was updated successfully, but these errors were encountered: