Best way to include/embed PDF images in slidify presentation (R Markdown) - html

I'm preparing a presentation in .Rmd (R markdown) file using slidify.
I have some vector graphics saved as PDF files that I would like to render on particular slides.
I've tried methods that I used in raw .Rmd (markdown syntax) as well as those from bookdown. However, none of them works.
As I can see in generated HTML, PDF file location is directly provided in img src and as I understand HTML files do not directly support PDF files.
However, I'm not sure what to do (what is the best approach):
convert PDF (to .svg) and use it in .Rmd?
try to write some raw HTML in my .Rmd fo;e using suggestion from Recommended way to embed PDF in HTML? that will allow me to render PDF,
use different command to embed PDF in presentation (something specific to slidify)?

Related

Display PDF in GitHub Markdown

This is quite similar to what is being asked in this post, but the post does not seem to work for GitHub's parsed Markdown.
Simply put, let us say I have a PDF in a GitHub repository. Is there any way to render/embed that in a markdown file that is in the repository (e.g. the README.md file)?
I would also be open to having the PDF in a location other than GitHub and linking to it from the markdown file if that is what is required to make this work.
Currently there is no way to preview a pdf in github markdown, however you can embed an image of the pdf.
Edit
From here:
The best you can do is a greasemonkey extension which would allow you to call a pdf viewer, like the recent pdf.js (a Portable Document Format (PDF) viewer that is built with HTML5.), allowing you to view a pdf entirely online, without any pdf plugin installed.
As far as I know, this is not possible on GitHub.
However, you can upload it as a file in the same repository and then add a link to it with a relative path.
[Some title here](FILE_NAME.pdf)

Saving rmarkdown html files to local drive from shinyapps.io

I have a shiny app which I have published on shinyapps.io.
I am trying to save(download) html files that I create using rmarkdown to a local drive. I can download pdf, jpeg or png formats. but the reason to save html version is to keep the interactive plots that I have created using plotly and ggplot where I can hover my mouse over data and see values.
After a lot of research, I found out a way to save (upload) the html files to my own dropbox using drop_upload function. But it's very inconvenient and not accessible to anyone except me.
So I was wondering if someone could help me with a way to save/download rmarkdown html files to a local drive from shinyapps.io?

RMarkdown - HTML generated files without markdown styling

I have installed RMarkdown package in my R-Studio and I want to knit into HTML format. After knitting any .rmd file (including the default code created after starting a new Rmd file), the output html file does not include any markdown styling. See the picture of the generated html file on my computer here:
As you can see for example, the font is set as plain Times New Roman and also the way the dataframes are displayed does not look like the usual markdown-style.
Please, how can I get the HTML file styled as an usual markdown file?
Note: I did not modify the markdown.css file in the library's folder.
Thanks in advance!

Convert gnome-help (yelp) xml to static html with xslt

Some of the gnome applications on linux use a help browser called yelp. For example, the gnome-calculator, gcalctool, has its help files located in /usr/share/gnome/help/gcalctool
The folders there are then sorted by language. These help files essentially consist of an xml file and some accompanying png figures.
What I'm trying to do is convert this xml and its accompanying png figures into static HTML because I want to be able to properly view and navigate the document from a different browser (firefox). If you want to see what I'm talking about and you are on Linux, just run gcalctool and open the help menu.
Unfortunately, opening the xml directly with firefox is not successful because there are no stylesheets and thus firefox doesn't know how to format it. I have read that gnome applications make use of a library called libxslt (http://xmlsoft.org/libxslt/) for applying stylesheets. I am not familiar with xslt at all. Are the stylesheets saved elsewhere, or embedded in the source when it is compiled?
I guess what I'm wondering is if it's possible to somehow use libxslt by itself or another tool to convert the xml and figures into static HTML, preferably in the same manner yelp does this when it executes, or in a manner that results in an exact/very similar output to what yelp displays.
Thanks
gcalctool uses docbook. Yelp brings everything to display this xml format. You will find some projects to convert this docbook document to html on http://wiki.docbook.org/DocBookToXhtml.
best regards
Majo
Depending on how old your gcalctool is, its help files might be in DocBook or Mallard. If it's Mallard, you'll see a bunch of .page files. Otherwise, it's DocBook. Either way, you can use yelp-build to create HTML files. It's part of the yelp-tools package, and uses the same transformations as Yelp. For DocBook, pass the top-level XML file:
yelp-build html -o /path/for/output/ /path/to/gcalctool.xml
For Mallard, pass the directory containing the .page files:
yelp-build html -o /path/for/output/ /path/to/gcalctool/
yelp-build will build the HTML, copy the images and other media files, and take care of the CSS and JavaScript.

Quickly converting Word Doc into HTML

I am trying to convert a word document into html. I used an online converter http://word2cleanhtml.com/ but it does not keep the pictures I have in my file. From the html I will be making a nook and kindle ebook. Does anyone have a tool or suggestion for this project?
Using save as html in word doesn't keep images either.
Download the KindlePreviewer: http://www.amazon.com/gp/feature.html/?docId=1000765261
Then, save your file as HTML. Images will not be part of the html file, instead they are stored in a separate folder.
Open the resulting html file into the KindlePreviewer, it will find the images in the images folder and add them to your book.