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

Adding support for rich display of Markdown cells in HTML and LaTeX output (redux) #2390

Merged
merged 7 commits into from
Aug 31, 2020

Conversation

NicholasWMRitchie
Copy link
Contributor

With a fairly small change to the HTML, LaTeX and text display code, it is possible to add rich text output support to cells within a DataFrame. Markdown strings are readily constructed using the default Markdown package and the @md_str macro. It already represents a generalized format definition language that most Julia users are familiar with.

It is already possible to place Markdown.MD cells in DataFrames. However, the display of these cells doesn't represent the richness of which Markdown is capable. With markdown, it is possible to output bold, italicized, headers, links and even images into DataFrame cell outputs.

For me personally, the biggest win is the ability to display functional URLs in a table. This is particularly useful when DataFrames are used in report-type documents like generated by Weave or other literate programming packages. I don't think there is another way to produce functional URL links in DataFrame outputs and this is often useful to detail the provenance of the data in a particular row.

However, other people may find being able to place LaTeX formulae or images in cells even more useful.

bkamins and others added 6 commits August 27, 2020 16:32
Fixing Markdown as "text/csv" and "text/plain"

Fix test error in Markdown to HTML in 32-bit systems

Fixing show and adding multi-codepoint tests

32 it is...

Use chomp to remove trailing '\n

Co-authored-by: Bogumił Kamiński <bkamins@sgh.waw.pl>
Fixing conflicts

Pulling df[i,j] out and optimizing ourshow.

Formatting improvements

Additional formatting improvements

Fixing triple-quoted strings in 1.0.X

Strip space in test case

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Using @nalimilan suggestion

Improving LaTeX output appearance, NEWS.md entry

Moved NEWS.md item to "Other relevant changes" section.

Correct NEWS.md item on rich display support
Fixing Markdown as "text/csv" and "text/plain"

Fix test error in Markdown to HTML in 32-bit systems

Fixing show and adding multi-codepoint tests

32 it is...

Use chomp to remove trailing '\n

Co-authored-by: Bogumił Kamiński <bkamins@sgh.waw.pl>
Fixing conflicts

Pulling df[i,j] out and optimizing ourshow.

Formatting improvements

Additional formatting improvements

Fixing triple-quoted strings in 1.0.X

Strip space in test case

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Using @nalimilan suggestion

Improving LaTeX output appearance, NEWS.md entry

Moved NEWS.md item to "Other relevant changes" section.

Correct NEWS.md item on rich display support

Removing duplicate import
@NicholasWMRitchie
Copy link
Contributor Author

@bkamins I hope this works for you. I've closed the previous PR. This whole process has been a learning experience for me. Hopefully, in the future, I'll be able to handle future PRs more gracefully. But I am grateful for you patience and I hope these small changes will be of use to DataFrame users.

@bkamins
Copy link
Member

bkamins commented Aug 28, 2020

Thank you!

I have left one small comment. Looks good other than that.

test/io.jl Outdated Show resolved Hide resolved
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @NicholasWMRitchie! I'm not sure why the Pkg.add change is visible here since it's also on master, but it should disappear when merging.

@bkamins
Copy link
Member

bkamins commented Aug 31, 2020

I will check if all is OK after the merge

@bkamins bkamins merged commit 8f7bee2 into JuliaData:master Aug 31, 2020
@bkamins
Copy link
Member

bkamins commented Aug 31, 2020

Thank you!

@bkamins
Copy link
Member

bkamins commented Aug 31, 2020

All looks good after merge

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

Successfully merging this pull request may close these issues.

3 participants