yixuan / prettydoc Goto Github PK
View Code? Open in Web Editor NEWCreating Pretty HTML From R Markdown
Home Page: https://prettydoc.statr.me/
Creating Pretty HTML From R Markdown
Home Page: https://prettydoc.statr.me/
I am wanting to use the kable_classic()
style for a table in a HTML document that is using a prettydoc
theme. The prettydoc
table style overwrites any kable styles I use.
Is there a way around this?
Thanks very much for your great work. It's really cool!
Is there a way to add a title for the table of contents using prettydoc ?
Something like the following below where the toctitle
(assuming this is the YAML variable for this example) is set to Contents:
Contents
I was trying to add 'code_folding: hide' to my YAML header for prettydoc html output. The error I got was:
Error in overlay(...) :
You must use a theme when specifying the 'code_folding' option
I'm not sure what it means by specifying a theme, since I already had a theme (I used the architect theme). When I leave everything else the same, except instead I render it as a regular old html_document, the code_folding works.
Thank you! I love the prettydoc look!
Solved
Could pretttydoc support Github emoji like :blush:
?
Hi,
as of now, Open Sans
is included just with the
All italic or bold-italic will not get the Open Sans
in these cases.
I would propose including these and referencing these in our (s)css ... for a typographically more adequate appearance.
(I would also include woff
and woff2
... discussion on so)
I would be glad to help,
thanks
christoph
Hi
I am using the "cayman" theme with the following YAML:
output:
prettydoc::html_pretty:
toc: true
theme: cayman
I find that the left margin (the white space before the content) is quite large, is there a way to shrink (resize) this ?
I have googled this but didn't find anything that helped.
Thanks!
Hi there,
cayman
scss does not scope the :first-child selector enough, so html-widget in rmarkdown, i.e. leaflet, getting their margin-top: 0
too.
.main-content {
// ...
:first-child {
margin-top: 0;
}
// ...
}
prettydoc/not_in_package/cayman/cayman.scss
Line 259 in 4810d4f
architect
scss, on the other hand, uses this:
#main-content {
> :first-child {
margin-top: 0;
}
// ...
}
which converts to: #main-content > :first-child {margin-top: 0;}
and therefore does not descend further down the dom.
I would appreciate the >
in cayman too.
Is prettydoc
compatible with shiny app elements?
output:
prettydoc::html_pretty
theme: leonids
runtime: shiny
I am having this error
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Scanner error: mapping values are not allowed in this context at line 6, column 10
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Execution halted
The tabset tag beside a section is supposed to make content in the subheadings appear as tabs. I know prettydoc doesn't support certain features such as floating table of contents, but the documentation makes no statements about not supporting tabset sections, so I assume it's supposed to. I can't get it to work. Instead it appears as a normal section. Below is some code that reproduces it.
I'm using the theme architect, if it helps. Rmarkdown is updated to the latest version. Apologies for the formatting. I can't seem to get it to look like a script because the site automatically formats the markdown unless I bold the hashtags and such, which makes it appear all in-line.
title: "example"
author: "me"
output:
prettydoc::html_pretty:
theme: architecttabset.section {.tabset}
One
plot(Sepal.Width ~ . , data=iris)
Two
plot(Sepal.Length ~ . , data=iris)
I love these themes! and would like to use them for blog posts with blogdown.
Do you know if this is possible??
Thanks!
The html templates in this project suffer the same problem mentioned in these rmarkdown issues:
rstudio/rmarkdown#1640 rstudio/rmarkdown#995
Namely, the output is not valid XHTML, and using a strict XML parser will result in an error. They are valid HTML5.
The <html>
tags include a xmlns
attribute, which wrongly declares the file to be XML. In certain real-world cases (see rstudio/rmarkdown#1640) this can cause a parser error to be displayed in a browser instead of the document.
The xmlns
attribute should be deleted from the html templates to remove this issue, as was done here:
rstudio/rmarkdown@41d8ae4
Hi,
When I render
the following document test.md
a directory test_files
is generated along the html file test.html
.
build.R
rmarkdown::render("test.md")
test.md
---
title: "Test"
output:
prettydoc::html_pretty
---
test_files
contains fonts, images and styles not even referenced in the html.
Is it possible to generate a single html file without the XXX_files folder ?
Regards,
Bernard
Hello, I found prettydoc a useful tool for beautiful html production.
Here's some usage problems I meet.
---
title: "XXX"
author: "XXX"
date: "`r Sys.Date()`"
output:
prettydoc::html_pretty:
theme: architect
highlight: github
math: katex
keep_md: true
---
Thank you very much!
Hi there,
I am trying to use your hpstr template from an rmarkdown doc, but I am unable to write a text in the header (top of the page where a picture is shown). How can I do this?
Thanks!
I've made a detailed post (with screenshots and sample code) on stackoverflow, and someone commented that he could confirm the problem, thought it was a bug, and that I should post it here. But basically I'm not able to select part of text from code chunks using common browsers such as Chrome, Edge, or Explorer, though I don't have this issue when not using prettydoc.
https://prettydoc.statr.me/ I'm trying to work on something similar but I can't get the tabs to work?
I think it would be handy to jump in between headers by clicking an item on the table of content. The item on the table of content represents a section.
It would make sense to me to place the table of content on the left side and set it to be available all the time.
Loving this project -- immediately installed when I saw the CRANberries notice earlier.
One format I have played with is the BioCStyle style which is also more lightweight. Maybe include (with attribution) or borrow from it? Or maybe just refer to it from the documentation as "yet another light(er)weight alternative" ?
Hi,
The html_pretty is extremely PRETTY! I just have a quick question about the code wrap.
It seems if some line of the code is long, then html_pretty just keep part of them rather than wrap the code as html_document does. Is there anyway available that I could wrap the code?
Thanks,
Jiaqiang
I really love the new themes, but I mostly use R Notebooks (html_notebook) these days rather than the default html_document.
Is there a way to use pretty doc with the html_notebook format?
I created some sample renders of your themes, and I wanted to move the assets to a dedicated directory to remove redundancy, hence the self_contained: false
.
However, when pushing to my server, the files don't render correctly.
assets
folder also holding assets for other documentsI checked the source HTML and in the header it specifies a CSS file located in what I assume to be my local machine's temp dir:
Is this a solvable issue or are these templates not meant to be used with self_contained: false
?
Hi,
My goal is to have vignettes in my package built with the prettydoc engine so the generated html's included in the package and hosted on CRAN are pretty, similar to what you have here.
My Rmd vignette file does have the following:
output:
prettydoc::html_pretty:
theme: architect
highlight: github
toc: true
vignette: >
%\VignetteIndexEntry{Example: Multi-Ethnicity Categorization}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
My DESCRIPTION
files does have the following:
Suggests: knitr,
rmarkdown,
markdown,
prettydoc
VignetteBuilder: knitr, rmarkdown
I am building my package directory using the devtools::build()
function.
The resulting tar.gz file has the vignettes built in inst/doc
, but the generated html files do not display the theme.
Am I missing a step? Or does your package not work with devtools::build
?
Thank you for your assistance.
hello, I like your theme leonids on the prettydoc ! can the side bar be set the navigation bar ? thank you for your attention !
Is there a way to preserve the multi-column layout format in css when a pretty_doc is rendered?
Some options relies on Bootstrap, so they are not applicable in html_pretty
. Also a certain number of features are based on the Bootstrap template, and their CSS need to be added to the built-in themes of prettydoc
.
code_folding
: Relies on Bootstrapcode_download
: Relies on Bootstraptoc_float
: Relies on Bootstraptoc
: Need CSSWe need to at least document these problems in prettydoc
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.