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

Insertion of image in table #25

Open
tlienart opened this issue Jul 22, 2020 · 8 comments
Open

Insertion of image in table #25

tlienart opened this issue Jul 22, 2020 · 8 comments

Comments

@tlienart
Copy link
Owner

It was reported that inserting an image in a table might not work; this would need to be checked whether it's the figure environment which fails (it should though possibly more transparently than it currently does) or whether it's just that if commands are used in a table they're not going to be processed properly (likely) or whether standard markdown for an image also doesn't work (problematic)

@zlatanvasovic
Copy link
Contributor

zlatanvasovic commented Jul 22, 2020

It'd help if we could see the Markdown code which has this issue.

@tlienart
Copy link
Owner Author

from the slack message:

Is there a way to get an image inside of a markdown table (using PkgPage, maybe different than base Franklin)?
Markdown ![Developing]("/assets/Developing.svg") just shows the alt text Developing and
\figure{path="/assets/Developing.svg", style="border-radius:3px;"}  renders as igure{path="/assets/Developing.svg", style="border-radius:3px;"}

@zlatanvasovic
Copy link
Contributor

zlatanvasovic commented Jul 23, 2020

Did they try using HTML for the image instead?

@tlienart
Copy link
Owner Author

tlienart commented Jul 23, 2020

well that's what I suggested and that's what they ended up using http://juliaactuary.org/ // but I think here the issue is that they weren't sure how to do it so maybe we could test this ourselves first and then add an image in the table example.

@zlatanvasovic
Copy link
Contributor

That's one beautiful page! Sure, let's find out what's the problem.

@tlienart
Copy link
Owner Author

Yeah :-) I'll add it here

@lucaferranti
Copy link

lucaferranti commented Nov 3, 2021

I encountered a similar issue today. I had defined a function

\newcommand{\details}[1]{~~~<details><summary>Abstract</summary> #1 </details>~~~}

tried to call it from inside the \table environment with \details{blah blah}, but it didn't work, it just displayed the plain \details{blah blah}.

Then I tried to manually inject the html inside the table, i.e. manually added ~~~<details><summary>Abstract</summary> blah blah </details>~~~, it just displayed the plain <details><summary>Abstract</summary> blah blah </details>.

Finally, I just put the plain html <details><summary>Abstract</summary> blah blah </details> inside the table and that worked

Hopefully this can help the bug hunt

@tlienart
Copy link
Owner Author

tlienart commented Nov 4, 2021

@lucaferranti the thing that's happening is that the table processing is deferred to CommonMark which does it better than Base.Markdown. And so there's some complexity in trying to capture things then sending some content to CommonMark then back to Franklin. Capturing individual cells and seeing if they contain specific commands is a bit annoying (though will be done in Franklin soon).

Thanks for the feedback though, it's definitely something that should work eventually 😄

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

3 participants