GithubHelp home page GithubHelp logo

rstudio / pagedown Goto Github PK

View Code? Open in Web Editor NEW
870.0 34.0 129.0 3.44 MB

Paginate the HTML Output of R Markdown with CSS for Print

Home Page: https://pagedown.rbind.io

License: Other

R 27.99% CSS 24.81% HTML 21.45% JavaScript 18.82% Lua 6.93%
r r-package css typesetting paged-media html printing pdf

pagedown's Introduction

pagedown

R-CMD-check Downloads from the RStudio CRAN mirror

Paginate the HTML Output of R Markdown with CSS for Print. You only need a modern web browser (e.g., Google Chrome or Microsoft Edge) to generate PDF. No need to install LaTeX to get beautiful PDFs.

This R package stands on the shoulders of two giants to support typesetting with CSS for R Markdown documents: Paged.js and ReLaXed (we only borrowed some CSS from the ReLaXed repo and didn't really use the Node package).

You may install this package from Github:

# install.packages("pak")
pak::pak('rstudio/pagedown')

This package requires a recent version of Pandoc (>= 2.2.3). If you use RStudio, you are recommended to install the latest version (>= 1.2.1335), which has bundled Pandoc 2.x, otherwise you need to install Pandoc separately.

Below are some existing R Markdown output formats and examples.

Paged HTML documents (pagedown::html_paged)

A paged HTML document

Thesis (pagedown::thesis_paged)

A paged HTML thesis

Journal of Statistical Software article (pagedown::jss_paged)

A JSS article

Resume (pagedown::html_resume)

An HTML resume

You may want to check out the datadrivencv package, which allows you to build a CV using data from a spreadsheet and pagedown::html_resume.

Posters

pagedown::poster_relaxed

A poster of the ReLaXed style

pagedown::poster_jacobs

A poster of the Jacobs University style

Want more poster styles? You may take a look at Brent Thorne's posterdown package.

Business cards (pagedown::business_card)

A business card

Letters (pagedown::html_letter)

A letter in HTML

Other examples

Authors and contributors

The main authors of this package are Yihui Xie (RStudio) and Romain Lesur. Romain has received a grant from the Shuttleworth Foundation for his work on both Paged.js and pagedown.

Shuttleworth Funded

You can find the full list of contributors of pagedown here. We always welcome new contributions. In particular, if you are familiar with CSS, we'd love to include your contributions of more creative and beautiful CSS stylesheets in this package. It is also very helpful if you don't know CSS but just tell us the creative and beautiful web pages you have seen, since other CSS experts may be able to port them into pagedown.

pagedown's People

Contributors

atusy avatar beatrizmilz avatar brentthorne avatar cderv avatar chendaniely avatar darxor avatar felipecrp avatar hashlash avatar jcheng5 avatar jodavid avatar remlapmot avatar rlesur avatar shrektan avatar tvroylandt avatar yihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pagedown's Issues

Pages in toc are all 1

I have a simple markdown file like .Rmd-file like this:

---
output:
  pagedown::html_paged: 
    toc: true
    number_sections: false
  html_document: default
---

[...]

The Problem

... all toc items get the same page ("1").

I get this error with Rstudio-Viewer and with Chrome. I do not get it with Firefox and rendering comletely fails with Edge.

Session Info

devtools::session_info()
- Session info -------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  German_Germany.1252         
 ctype    German_Germany.1252         
 tz       Europe/Berlin               
 date     2019-01-04                  

- Packages -----------------------------------------------------------------------------------------------------------------------------------------
 package     * version    date       lib source        
 assertthat    0.2.0      2017-04-11 [1] CRAN (R 3.5.1)
 backports     1.1.2      2017-12-13 [1] CRAN (R 3.5.0)
 callr         3.1.0      2018-12-10 [1] CRAN (R 3.5.1)
 cli           1.0.1      2018-09-25 [1] CRAN (R 3.5.1)
 crayon        1.3.4      2017-09-16 [1] CRAN (R 3.5.1)
 desc          1.2.0      2018-05-01 [1] CRAN (R 3.5.1)
 devtools      2.0.1      2018-10-26 [1] CRAN (R 3.5.1)
 digest        0.6.18     2018-10-10 [1] CRAN (R 3.5.1)
 fs            1.2.6      2018-08-23 [1] CRAN (R 3.5.1)
 glue          1.3.0      2018-07-17 [1] CRAN (R 3.5.1)
 magrittr      1.5        2014-11-22 [1] CRAN (R 3.5.1)
 memoise       1.1.0      2017-04-21 [1] CRAN (R 3.5.1)
 pagedown    * 0.1        2019-01-02 [1] CRAN (R 3.5.1)
 pkgbuild      1.0.2      2018-10-16 [1] CRAN (R 3.5.1)
 pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.5.1)
 prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.5.1)
 processx      3.2.1      2018-12-05 [1] CRAN (R 3.5.1)
 ps            1.2.1      2018-11-06 [1] CRAN (R 3.5.1)
 R6            2.3.0      2018-10-04 [1] CRAN (R 3.5.1)
 Rcpp          1.0.0      2018-11-07 [1] CRAN (R 3.5.1)
 remotes       2.0.2      2018-10-30 [1] CRAN (R 3.5.1)
 rlang         0.3.0.1    2018-10-25 [1] CRAN (R 3.5.1)
 rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.5.1)
 rstudioapi    0.8        2018-10-02 [1] CRAN (R 3.5.1)
 sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.5.1)
 testthat      2.0.1      2018-10-13 [1] CRAN (R 3.5.1)
 usethis       1.4.0.9000 2018-12-20 [1] local         
 withr         2.1.2      2018-03-15 [1] CRAN (R 3.5.1)

[1] C:/Users/peter/R/win-library/3.5
[2] C:/Program Files/R/R-3.5.1/library

How to print a local HTML file?

chrome_print('foo.html') doesn't work, which is understandable, but file://full/path/to/foo.html doesn't work, either. So how can we print local HTML files?

Of course, we can launch a local server (e.g. servr::httd()), but I wonder if there are other ways.

html_resume rendering problems

When I create a new html_resume template and knit it, section headers and the entire "title" section are cut off mid-letter on the left side. Additionally, when I try to open it in Chrome, the profile picture flashes briefly, then it leads me to a blank page. I have the most recent version of Pandoc (2.5), R version 3.5.1, and RStudio version 1.1.463.
screen shot 2019-01-10 at 10 59 31 am

Using a non standard character in chrome_print() input returns an unclear error message

Hey,

First of all, thanks for the amazing chrome_print(). I just LOVE this functionality!

I'm using chrome_print() to print shiny app elements which are bookmarked.

I noticed this strange error when using " in the url inputs (taking the rstudio gallery example below), which is probably to be found with other parameters.

pagedown::chrome_print(
  'https://gallery.shinyapps.io/113-bookmarking-url/?_inputs_&n="France"'
)
#> Error in pagedown::chrome_print("https://gallery.shinyapps.io/113-bookmarking-url/?_inputs_&n=\"France\""): Failed to generate output. Reason: Message must be a valid JSON

But it's solved if I use utils::URLencode on the URL

pagedown::chrome_print(
  utils::URLencode('https://gallery.shinyapps.io/113-bookmarking-url/?_inputs_&n="France"')
)

Created on 2019-03-18 by the reprex package (v0.2.1)

IMHO, the Reason: Message must be a valid JSON is a little bit esoteric.

It could be avoided with adding a simple input <- utils::URLencode(input) here: https://github.com/rstudio/pagedown/blob/master/R/chrome.R#L52

Will be happy to make a PR if you feel like it.

hex sticker

Have you got a hex sticker yet?
Can I have a try at designing one?

Arguments of the chrome headless helper

The chrome_print function is great! Thanks!

When I use chrome headless on html pages with paged.js, I always need the --virtual-time-budget CLI argument. It seems to be logical because paged.js is launched when the page is loaded. If I understand well chrome headless, the pdf is built at the same time. So, the DOM is not processed by paged.js before the pdf generation.
On average documents (paged.js+mathjax stuff, 30 pages), I often need to allow a budget of 5 to 10e+06 virtual milliseconds (5-6 effective seconds).
BTW, with puppeteer, it is easier to control that paged.js has finished its job.

What do you think of adding an argument to chrome_print() for the virtual time budget?

code_folding?

Is there any plan to add a code_folding option to pagedown::html_paged: ? I tried the following but it did not work as expected:

output:
  pagedown::html_paged:
    theme: default
    code_folding: hide
    toc: false
    # change to true for a self-contained document, but it'll be a litte slower for Pandoc to render
    self_contained: true

Issues with html_letter

1. The bullet list may not be broken properly

See the last bullet on the previous page:

image

2. Footnotes may be pushed into the bottom margin

If you use the image commented out:

<!--
![The kunoichi theme for xaringan, made by Emi](https://github.com/emitanaka/ninja-theme/raw/master/docs/images/kunoichi-showcase.gif)
-->
![The hacker's way of parking](https://slides.yihui.name/gif/impossible-parking.gif)

image

After refreshing the page, the image may be pushed to the next page, e.g.

image

Icons for LinkedIn, ResearchGate, Stack Overflow, Google Scholar, Kaggle, etc.

Nice package and very easy to use! Thank you all for your amazing work!

How do we add icons for LinkedIn, ResearchGate, Stack Overflow, Google Scholar, Kaggle, etc. in the Contact Info section? I tried a few key words but it did not work

## Contact Info {#contact}

- <i class="fa fa-stackoverflow"></i> https://stackoverflow.com/users/786542
- <i class="fa fa-so"></i> https://stackoverflow.com/users/786542

CSS leaders

Currently we are using the trick mentioned at https://www.w3.org/Style/Examples/007/leaders.en.html, but there is a challenge in our case: for long section headers, the TOC items will be wrapped. We cannot use the trick in "CSS RULES FOR WRAPPING TEXT", because we don't have the second <span> for the page numbers. The page numbers are generated in a::after:

.toc a::after {
content: target-counter(attr(href), page);
float: right;

We cannot put both the dots and the page numbers in the pseudo element ::after.

Overruling at-page statement using default-page.css

Paged.js takes into account only the first @page {...} statement it finds.

So, if the user wants to overrule the @page statement using a custom.css file, it is:

  • possible with html_paged(css = c('custom.css', 'default-page')
  • impossible with html_paged(css = c('default-page', 'custom.css')

This is a low priority bug but I'm unsatisfied by this behavior that violates the CSS precedence property.

I see two ways to modify this behavior:

  • isolate the @page statement in a specific CSS file that could be removed by the user.
  • include the @page statement in the pandoc template and create variables for paper size and margins (maybe the same as in the pandoc's default LaTeX template).

We also can wait for the bugfix in Paged.js.

::: aside ::: don't work

Example for reproducibility:

---
title: "Someone's resume"
author: Your Name
output: pagedown::html_resume
---


Aside
====================================

Picture, etc.

Contact info
------------------------------------

Email, phone number, ...

Skills
------------------------------------

- One
- Two
- Three

Disclaimer
------------------------------------

A footer in the sidebar.



Main
====================================

Your Name {#title}
------------------------------------

Arbitrary content.

Education {data-icon=graduation-cap}
------------------------------------

### University One

Title

Location

Year

Arbitrary content


Section
---------------

### Subsection

Title

Location

Year

More info

::: aside
Some notes in the sidebar.
:::

chrome_print missing text in PDF, not with Google Chrome

When using the pagedown::chrome_print() function with a large html created with xaringan, some content is missing in the pdf file created with this function whereas I do not face this problem if I print the pdf with Google Chrome.

bug1_pagedown

I spent time on trying to reproduce the error with a light example.
I found an easy case to produce the same problem, but I do not know if this will solve my initial problem.

Here it is :

---
title: "Reprex"
author: "BVA"
date: "2019-03-07"
output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
    seal: true
---

```{css, echo = FALSE}
@import url(https://fonts.googleapis.com/css?family=Baloo+Bhai);
.header {
  position: absolute;
  left: 0;
  top: 0;
  height: 4.3%;
  width: 60%;
  margin: 0;
  padding: 0;
  background-color: rgba(255, 192, 0, 1);
  border-bottom-right-radius: 20px;
  font-family: 'Baloo Bhai', sans-serif;
} 
```

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```

```{r header-functions, include = FALSE}
# header
header <- function(text) {
  
  code <- paste('<div class="header">', 
                text,
                '</div> </div>')
  return(code)
}
```

`r header("Section 1")`

# Title 1

With seal: false : the "Section 1" text if in top left corner is present after pagedown::chromeprint(), meanwhile it is not when seal: true (see page 2).

seal_true_false

Removing the font line in the css font-family: 'Baloo Bhai', sans-serif; is also a way to display the text in the top left corner.

Multiple business cards in pagedown

Hello, I am trying to create a number of cards on the same page, so that they can be used as name badges. I know I can create a single business card in pagedown but I am not sure how to create multiple in a single file. Can you advise? Thank you!

html_resume issues with months

Thank you very much for this fantastic package!

Using Chrome and your skeleton, there is a bug with the line when adding months.
html_resume_issue1

I tried with Month abbreviations. But sadly the date doesn't render on a single line and it doesn't look good on my own resume.
html_resume_issue2

Would it be possible to fix these issues? Or how can I add months on my resume?

Native chrome automation for PDF creation

I want to share an experiment I made with @MilesMcBain's chradle test package.
The goal of chradle is to communicate with Chrome through the Devtools Protocol (like puppeteer) using a websocket connection (with rstudio/websocket): we have a direct connection between R and Chrome.
I only succeeded with a screenshot.

# remotes::install_github('milesmcbain/chradle')
library(chradle)

session <- chr_init(url = "https://pagedown.rbind.io/", incomming_debug = TRUE)
resp <- chr_call(session, '{"id":3,"method":"Page.captureScreenshot"}')
img <- jsonlite::base64_dec(resp$result$data)
writeBin(img, 'screenshot.png')
# I didn't succeed with a PDF 
# https://chromedevtools.github.io/devtools-protocol/1-3/Page#method-printToPDF
# state <- chr_call(session, '{"id":4,"method":"Page.printToPDF"}')
chr_kill(session)
chr_clean()

I found this test extremely interesting: it shows that a Chrome automation for PDF generation (or other tasks) should be feasible from R but it seems to be a huge task (or a side project).
I think we are in a too early stage to work on this... but maybe in the future.

Figure/Table Caption Number Error when `$body$` is placed within a `<div>`

Hello,

I am working on some new templates to possibly add to pagedown and noticed that figure and table caption numbering does not work when $body$ is placed inside of a <div> html tag. I have tested this with the pagedown::poster_jacobs. The change to the html file is minimal:

<div class='poster-body'>
$body$
</div>

This results in only the fig/tab label plus it's number missing, the caption itself is still working as intended. I would like to use this to format CSS options dynamically and while being able to differentiate the poster body from the poster title.

Looking forward to feedback thanks!

[html_paged] htmlwidgets

For now, htmlwidgets are not rendered by pagedown::html_paged().

I think there are many technical challenges with this issue.

The only success I've obtained is about the rendering synchronization, see RLesur@7608c1b
But I didn't succeed to keep interactivity (I'm not familiar with htmlwidgets internals).

If there is a ninja.js who could help on this issue, this would be great!

[html_paged] Using period (.) in a section title crashes Paged.js

Thanks for the pagedown package which is simply amazing. I am using the package for writing a little doc using html_paged, and I really appreciate it. I don't know if it is worth to mention, but I noticed a section should not have a dot "." at its end, otherwise it can lead to losing the "page format". Here is a minimal example:

---
title: "A Multi-page HTML Document"
author: "Yves"
date: "`r Sys.Date()`"
output:
  pagedown::html_paged:
    toc: true
    self_contained: false
---

# Introduction

This is an example of a multi-page HTML document. 
See https://pagedown.rbind.io for the full documentation. 

# Good Morning. The Great world.

Error to install pagedown on Rstudio Cloud with websocket

I am trying to install pagedown on Rstudio Cloud and I get the following error:

Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
ERROR: dependency ‘websocket’ is not available for package ‘pagedown’

  • removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/pagedown’
    installation of package ‘/tmp/RtmpsjhrAU/filec31a8a761f/pagedown_0.1.4.tar.gz’ had non-zero exit status

so I tried to install
remotes::install_github('rstudio/websocket')
and I got the following error:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-5/README.Bugs for instructions.
make: *** [websocket.o] Error 4
ERROR: compilation failed for package ‘websocket’

  • removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/websocket’

What I should do to fix it, considering that I am working on Rstudio Cloud?

chrome_print() only prints the first page of a resume

pagedown::chrome_print('https://rstudio.github.io/pagedown/html-resume.html') only prints the first page of the example resume.

The reason I try to use chrome_print() instead of simply printing from chrome is that I cannot submit the pdf printed from chrome on some job application portal. I get this error message for doing that:

This PDF file contains content that cannot be read. Please upload a PDF that was created from word processing or PDF writer software.

The pdf generated by chrome_print() is accepted but it only include the first page.

I am doing real job application. Help appreciated. Thanks

How to keep the scroll position after refreshing the page?

When a page is refreshed, the scroll position is lost (it always shows the first page, no matter which page the reader was previously on). This also makes it difficult for a reader to catch up where she left last time.

Perhaps we can add a scroll event, in which we add a hash to the URL, which is the identifier of the current page, like remark.js slides (like page.html#23). Then if the page is reloaded, we go to a particular page if the hash exists.

html_resume right column width has changed

If you scroll to the resume example in the pagedown documentation on GitHub and click on the resume, you can see there are a few differences between the linked resume and the previewed one. Most significantly, in my opinion, is that the width of the side column in the linked resume is wider. It seems too wide to me, but that's a matter of taste. If I knew how to adjust it for myself, I would do it! But I don't and since there's a discrepancy in the documentation, I figured I'd submit this as an issue.

To be clear, the linked version is the version that is identical to the .Rmd template in the preview version of RStudio. (I originally created my resume when the example resume was all in the yaml header. That file will no longer knit, so I'm moving it over to the new template style.)

cannot excute

processing file: test.Rmd
|................ | 25%
inline R code fragments

|................................ | 50%
label: setup (with options)
List of 1
$ include: logi FALSE

|................................................. | 75%
ordinary text without R code

|.................................................................| 100%
label: unnamed-chunk-1 (with options)
List of 2
$ results: chr "asis"
$ echo : logi FALSE

output file: test.knit.md

"D:/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.html --smart --email-obfuscation none --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/uri-to-fn.lua" --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/loft.lua" --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/footnotes.lua" --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\zhang\Documents\R\win-library\3.4\pagedown\resources\html\paged.html" --highlight-style pygments --number-sections --include-in-header "C:\Users\zhang\AppData\Local\Temp\RtmpSa6zVS\rmarkdown-str2a3c6a7c545d.html" --mathjax
pandoc.exe: unrecognized option --lua-filter' unrecognized option --lua-filter'
unrecognized option `--lua-filter'
Try pandoc.exe --help for more information.
Error: pandoc document conversion failed with error 2
In addition: Warning message:
running command '"D:/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.html --smart --email-obfuscation none --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/uri-to-fn.lua" --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/loft.lua" --lua-filter "C:/Users/zhang/Documents/R/win-library/3.4/pagedown/resources/lua/footnotes.lua" --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\zhang\Documents\R\win-library\3.4\pagedown\resources\html\paged.html" --highlight-style pygments --number-sections --include-in-header "C:\Users\zhang\AppData\Local\Temp\RtmpSa6zVS\rmarkdown-str2a3c6a7c545d.html" --mathjax' had status 2
Execution halted

Main content pushed to the 2nd page if the sidebar is longer than one page

Hello,

I tested this commit and when I opened the html file on

  • Windows 10 Chrome 70.0.3538.110 (Official Build) (64-bit)
    Nothing showed up, just a blank page. Inspect > Errors
paged.js:23454 Fetch API cannot load file:///D:/pagedown/pagedown_example_files/paged-0.0.20/css/resume.css. URL scheme must be "http" or "https" for CORS request.
add @ paged.js:23454
paged.js:23454 Uncaught (in promise) TypeError: Failed to fetch
    at Polisher.add (paged.js:23454)
    at Previewer.preview (paged.js:26428)
    at paged.js:26494
  • Firefox Quantum 63.0.3 (64-bit)


Rmd code
---
title: "Lijia Yu's resume"
author: Lijia Yu
date: "`r Sys.Date()`"
output:
  pagedown::html_resume:
    self_contained: false
---

Aside
================================================================================

![Lijia Yu](https://avatars1.githubusercontent.com/u/895125?s=400&v=4){width=80%}

## Contact Info {#contact}

- <i class="fa fa-envelope"></i> [[email protected]](mailto:[email protected])
- [<i class="fa fa-github"></i>](https://github.com/yulijia) | [<i class="fa fa-linkedin"></i>](https://github.com/) | [<i class="fa fa-stack-overflow"></i>](https://github.com/)  | [<i class="fa fa-researchgate"></i>](https://github.com/)
- <i class="fa fa-phone"></i> (+1) 123-456-7890
- For more information, please contact me via email.

## Skills {#skills}

- Experienced in statistical analysis, statistical learning models, and optimization methods.

- Full experience with next generation sequencing data analysis.

- Highly skilled in R, Bash, Perl, Python, LaTeX

- Experienced in statistical analysis, statistical learning models, and optimization methods.

- Full experience with next generation sequencing data analysis.

- Highly skilled in R, Bash, Perl, Python, LaTeX

- Experienced in statistical analysis, statistical learning models, and optimization methods.

- Full experience with next generation sequencing data analysis.

- Highly skilled in R, Bash, Perl, Python, LaTeX


## Disclaimer {#disclaimer}

This resume was made with the R package [**pagedown**](https://github.com/rstudio/pagedown).

Last updated on `r Sys.Date()`.



Main
================================================================================

## Lijia Yu {#title}

### Currently searching for a PhD student position

Please note that this is a *real* resume, and I'm really looking for a PhD
student position at the moment. I made this resume because Yihui asked me
if I'd like to test the **pagedown** package with my resume. If you are
interested in my background and skills, please feel free to contact me.

## Education {data-icon=graduation-cap data-concise=true}
    
### Beijing University of Chemical Technology

B.S. in Information and Computing Sciences

Beijing, China

2010

Thesis: Dyadic wavelet and its application in edge detection

### University of Chinese Academy of Sciences

M.S. in Bioinformatics

Beijing, China

2014

Thesis: A multi-omics study for intra-individual divergence of the distributions between mRNA isoforms in mammals

Footnote in the TOC (html_paged)

It is exciting to start a new book with pagedown! Many thanks! I found a small issue: when footnotes are inserted in the chapter or section titles, they are supposed to appear only in the body. How could they avoid appearing at the bottom margins of the TOC pages?

Furthermore, it seems that the texts in the footnotes occupy some space in the TOC before rendered into the foot, resulting in large spaces in TOC pages.

An example could be found in my book; https://www.pzhao.org/book/r100q/

How to remove urls inserted after links?

Based on other R Markdown outputs, I would expect that [tag](html address) would read as 'tag' in the new document. The full url is still shown in the rendered document (see html_paged example in Readme).

Pandoc highlighting can crash Paged.js

In some situations, I get overflows that crash Paged.js.
It seems to be related to Pandoc highlighting: when I comment on the highlighting stylesheet in the html file (or use highlight = NULL), it solves the problem.
It is hard to reproduce and I still don't have a full understanding of the problem.

Here is one screenshot with a bug:

overflow

The same screenshot without Pandoc highlighting:

without Pandoc highlighting

I'll have a deeper look. Meanwhile, it is safer to use highlight = NULL.

Issues with adding altmetric scores

Adding altmetric scores:

<script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script>

<div class='altmetric-embed' data-badge-popover='bottom' data-doi='10.1016/S0140-6736(11)61619-x'></div>

It wors with .Rmd --> .html_document, but not for pagedown::html_resume

A convention for specifying short titles

When a section header is too long, its original text may not be suitable for a running header. In this case, we need a shorter version. One possible way is to use bracketed spans, e.g.

# Hello World

[hello]{.shorttitle}

Then we define something like

.shorttitle {
  display: none;
}
.shorttitle, h1 {
  string-set: h1-text content(text);
}
@page {
  @top-right {
    content: string(h1-text);
  }
}

I haven't tested it. We need to make sure string(h1-text) gets the text from .shorttitle instead of h1 when both are present on a page.

html_resume : page break and section alignment

When a section spreads over two pages the alignment gets wrong on the second one.
I took a screenshot of a slightly modified version of the template resume to illustrate my point.

  • Is there a way to fix this ?
  • Otherwise is it possible to force a page break just before the section that will span over two pages ?

html_resume page break and section alignment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.