GRAV Forum,
Is there a supported way to add captions to tables in PHP Markdown Extra? I read through the documentation and didn't see a way.
Are there other available work arounds?
Regards,
Sean
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
GRAV Forum,
Is there a supported way to add captions to tables in PHP Markdown Extra? I read through the documentation and didn't see a way.
Are there other available work arounds?
Regards,
Sean
@jerobapatrol, I'm not sure if there is a "supported" way.
Wrapping the table in a <figure> tag might do the trick:
In Markdown use:
[figure caption="**Fig. 1** A beautiful figure."]
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
[/figure]
figure {
display: inline-block;
}
figcaption {
text-align: center;
}

Thank you @pamtbaau. This is exactly what I'm looking for. I already use 'Shortcode Core' for icons and notices.
I typically start with CommonMark markdown files and convert them to PHP Extra using Pandoc. Hopefully I can figure out a programmatic way to covert table captions to this figure environment.
I know its been a while, but how did you get the CSS in? I tried using this, and nothing showed up. I tried putting the css in the custom.css with the theme, and direclty inline. No luck.
@symgryph, Not sure if your issue is related to the original questions "Adding table captions...", or just a question solely about adding css to a theme...
If it is the latter, then please create a new post with a proper title describing your issue.
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 6 | 94 | 8 months ago | ||
| 10 | 184 | 1 year ago | ||
| 4 | 146 | 1 year ago | ||
| 3 | 60 | 1 year ago | ||
| 4 | 254 | 1 year ago |