I have an R Markdown Document i want to embed in a shiny app based on the prettydoc engine. I have seen a tutorial about using the cayman theme for my document. The problem is i want to change the gradient in the header to be sunkist based on the gradient sheet here. Does anyone know how to achieve this. Is it a setting in the YAML
In the example supplied you type something like
---
title: Nineteen Years Later
author: Harry Potter
date: July 31, 2016
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
---
An Additional information on the cayman theme can be found here
Changing the theme in YAML will not achieve what you intend to do. These themes are prebuilt and unless one of them already have the Sunskit gradient set, the outcome won't be what you desire.
An alternate approach would be to make the change in the stylesheet of the theme. For example:- In the cayman theme, you could open the cayman.css and this to the bottom.
.page-header {
background-color: #F2994A; /* fallback for old browsers */
background-image: -webkit-linear-gradient(to right, #F2C94C, #F2994A);
background-image: linear-gradient(to right, #F2C94C, #F2994A);
}
This would change the gradient in the header.
Related
I'm exporting a textbook as a Fixed-Format ePub via InDesign 2020 but noticed vertical text get exported horizontally instead! Here is an example of what I mean:
Here's how it should look like:
Does anyone know how I can preserve the text rotation? There are hundreds of examples of this issue in the book. Would there be a 'global' setting/CSS to resolve this?
Do you have control over the Indesign table styles?
See: https://helpx.adobe.com/in/indesign/using/table-cell-styles.html
If the table regions are styled correctly, you should be able to get the styles exported in the CSS. I haven't worked in the latest Indesign, and EPUB table exports have been patchy in the past. However, if you have custom table styles applied, you can edit the CSS to make it match the source as close as possible.
I am considering making my presentations using markdown in RStudio rather than beamer. In beamer I often use incremental appearance of the content, with the option "highly dynamic", which makes the next item to appear show in light gray before appearing fully. Apart from looking nice, this helps me present as it prevents me from being surprised if I forget the next point on the slide.
My question is: Is there any way to achieve a similar effect if I make my slides in RStudio, for instance as an R presentation, or rmarkdown presentation using ioslides, or Slidy?
I am aware that I can set incremental: true in R presentations, but this only gives incremental appearance, not the "highly dynamic" effect.
There are several different ways to produce slides in RMarkdown: ioslides, slidy, revealjs, xaringan, etc. I tend to use ioslides, and this method works there. I have added a couple of other
variations below.
What you need to do is to change the CSS for the selector .build .to-build so that instead of making items transparent, it only makes them partially transparent. You can do this by creating a file containing this:
.build .to-build {
opacity: 0.1
}
If you call that file incremental.css, then in your YAML for the presentation, you have this:
output:
ioslides_presentation:
incremental: true
css: incremental.css
Then you will see something like this when you display the sample presentation after showing the first bullet:
Edited to add:
Here's the CSS to use if you're using slidy_presentation instead of ioslides_presentation:
body.single_slide .invisible {
opacity: 0.1;
visibility: visible;
}
And here's what to use for revealjs::revealjs_presentation:
.reveal .slides section .fragment {
opacity: 0.1;
visibility: visible;
}
You can probably put all three recipes into the incremental.css file, and then switch between the formats until you find which one you like best.
If you are making beamer presentations from Rmarkdown, this works:
---
output:
beamer_presentation:
incremental: true
header-includes:
- \setbeamercovered{highly dynamic}
---
- one
- two
- three
I have uploaded the font onto my computer and I will upload it to the server but I don't know how to write it in my code. I want to use "Interstate" but only "Interstate Black Condensed."
I tried changing the weights or adding that in the name but it just goes to a default font. The only way Interstate works is if I just write "Interstate," but the bold works but it does not give me the black category.
.numbers {
font-family:Interstate;
font-weight: 300;
font-size:30pt;
text-align:center;
color:#3baa4d;
}
If you want to use the Interstate Black Condensed version of the font I would recommend using a tool to generate a font face declaration for it, while converting the file for web use. This generator should do the trick:
http://www.fontsquirrel.com/tools/webfont-generator
All you have to do is upload the Interstate Black Condensed file to that site, then include the font files it gives you in your project, then paste the font-face code at the top of your css file.
I've got wkhtmltopdf working with a header and footer image, and everything spaced well. But the task is to use a full page background image which looks like a sort of frame, with the page text in the center. I thought I could place this in the header, but it doesn't work - maybe the use of a full page header doesn't make sense here.
(These are multi-page documents, which could be of any length).
Any ideas of how to do this?
Thanks in advance.
John
I have a similar problem, this is what I understood so far:
It's not possible to center the text vertically on the page simply via CSS+wkhtmltopdf on a multi-page document (might find some complex javascript stuff, but it wasn't worth in my case);
since wkhtmltopdf uses webkit, and webkit doesn't support #page rules, it's not possible to define a "paged" background via CSS
Hence what? You will need a little hack and use pdftk
1. In your CSS define:
body {
background: white;
}
(if you have a body tag in your header.html and footer.html make sure that rule applies to them as well)
2. Create a one-page pdf with your background image (using the same page size as your final pdf)
3. Install pdftk and from command line:
$ pdftk yourfile.pdf background background.pdf output yourfile_b.pdf
4. Enjoy :)
You can use a solution BASED on webkit, like HTM2PDF - you'll be able to add a feature called 'stationary' where you can integrate any image as a full page background.
more info at the documentation from the API page
I have my site created with Dashcode and I am using the List object but I don't like the default blue background when a cell is selected.
How can I customize this? For example change it to grey or white, etc.
(As far as i know, everything is customizable in Dashcode, is just sometimes you have to do it using code and not Dashcode UI.)
Thanks in advance.
Answer to my self:
looking at main.css I found something like:
.listRowTemplate_template.selected {
background-color: rgb(56, 0, 217);
}
Which is the color I want to change ;)
Which would have been my answer, shall i vote you up? ;-)
It is easy to forget that when in Dashcode it is "just" JavaScript, CSS and HTML and so many problems will often succumb to those type of solutions such as you have done.