tlienart / PkgPage.jl

Create a beautiful landing page for your package in less than 10 minutes.
https://tlienart.github.io/PkgPage.jl/
MIT License
116 stars 6 forks source link

Insertion of image in table #25

Open tlienart opened 4 years ago

tlienart commented 4 years ago

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 commented 4 years ago

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

tlienart commented 4 years ago

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 commented 4 years ago

Did they try using HTML for the image instead?

tlienart commented 4 years ago

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 commented 4 years ago

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

tlienart commented 4 years ago

Yeah :-) I'll add it here

lucaferranti commented 3 years ago

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 commented 3 years ago

@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 😄