I was trying to make some slides through reveal.js and Rmarkdown in RStudio. I run into a problem with vertical slides. Whenever I set the next slide with "###", the next slide would be embedded into the last slide. What's the right syntax to set the next slide as a vertical slide (downward)?
---
title: "Slide"
output:
revealjs::revealjs_presentation:
center: true
---
## R Markdown
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
### Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
Just use one hash less. Documented here.
---
title: "Slide"
output:
revealjs::revealjs_presentation:
center: true
---
# R Markdown
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
Related
I would like to make the image smaller using width and heigth. But when I change this, the images place is complete different while specifying top right with top and right. Here is a reproducible example without change size:
---
title: "test"
format: revealjs
editor: visual
---
## Slide
When you click the **Render** button a document will be generated that includes:
- Content authored with markdown
- Output from executable code
- Another point
![](R_logo.svg.png){.absolute top=0 right=0}
Output:
And with changing size:
---
title: "test"
format: revealjs
editor: visual
---
## Slide
When you click the **Render** button a document will be generated that includes:
- Content authored with markdown
- Output from executable code
- Another point
![](R_logo.svg.png){.absolute top=0 right=0 width = "100" height = "100"}
Output:
As you can see the image is now at the bottom which is not what I want. So I was wondering if anyone knows how to fix this?
When specifying style using key=val inline, do not put space before and after the equal sign (=),
![](Rlogo_svg.png){.absolute top=0 right=0 width=100 height=100}
I have two files named a.rst and b.rst, both of which contain a good deal of text. In a.rst, I define a figure:
.. figure:: ../images/some-image.png
:scale: 70%
:align: center
:alt: Some Text
Some Caption
I would like to have the same image and caption in b.rst with the same figure number, But repeating the above code gives me a new figure.
As a compromise, I can refer to this image in b.rst using the :numref: directive, but that does not resolve to the figure. It only displays the name as a piece of code.
I understand that these are two question, but I think they are sufficiently related. How can I repeat or reference a figure defined in a rst file in another file.
Edit to elaborate on the expected output:
I want the resulting files to have the following content:
a.html:
Fig. 1 + caption
Fig. 2 + caption
Fig. 3 + caption
b.html:
Fig. 4 + caption
Fig. 2 + caption
Fig. 5 + caption
Effectively, this would add the figure to b.rst not as a separate entity, but merely as a mirror of what was in a.rst. This is similar to what was discussed here.
Assuming you want to repeat the exact same content in two different files, put that content into a separate file, then include that file wherever you want it to appear.
includeme.rst
Note document root relative path.
.. figure:: /images/some-image.png
:scale: 70%
:align: center
:alt: Some Text
Some Caption
a.rst and b.rst
Below this paragraph should appear an image.
..include:: /includeme.rst
EDIT
To remove the figure number, set numfig to False. This will avoid the incongruent figure numbering, but won't solve it. I think that's the best you can achieve, as Sphinx automatically numbers figures (and other objects) otherwise.
Can you use Figure captions for graphs created by Graphviz (digraph) with Sphinx? I would like to use the same numbering and style of captions for my Graphviz graphs as a I do for all Figures.
For example, if I try putting this into the restructured text document used by Sphinx:
.. digraph:: foo
"bar" -> "baz";
.. _figure_digraph:
**Fig. X label at start of Figure label is missing**
Then I get a Figure where the Fig. X at the beginning of the Figure caption is missing.
On occasion, starting paragraphs with excess spaces in R Markdown/RStudio changes the text color from the color I expect to grey. This behavior isn't consistent, and it doesn't affect the output in any appreciable way. Does anyone know what's happening?
On my machine the second **Response** is grey, and all others are blue.
---
title: "Untitled"
author: "Unnamed"
date: "6/1/2018"
output: pdf_document
---
**Response**
**Response**
**Response**
**Response**
As far as I can tell, everything about the conditions in the two examples is the same.
If you process your document you will see something like this:
The empty line plus before the second "Response" together with the indentation makes markdown interpret this as code. In RStudio code sections are shown with a grey font. In the PDF output, a fixed width font is used and the ** are treated literally instead of interpreted as commands for bold.
Since there is no empty line between the third and the forth "Response", these are treated as one paragraph, making the indentation irrelevant.
Solution: Do not indent text but only code.
I'm using iTextSharp to fill in some stamper AcroFields.
stamper.AcroFields.SetField("Title", "Lipsum");
I created the pdf in illustrator and the form fields with Adobe Acrobat X Pro. The problem is that although the text fields are the width of the page, in the saved pdf the text wraps at about 1 third of the width.
Another question would be if it's possible the have the textfield autoSize in height, or a way to handle the overflow of the text.
1) I'd like to see that PDF. I suspect the fields aren't as wide as you think they are.
2) You can set a field's font size to zero to enable "auto sizing", which works both within Reader and iText. However, it sizes to the actual field size, not what you think it might be.
I'm guessing you drew a spiffy form field background in Illustrator, then put a field over it in Acrobat Pro, but didn't size the field width to match the spiffy illustrator background. Could be wrong, but that's my hunch.
That's the flattened PDF. Can I see the original with the form field still intact? Sorry I wasn't more specific. None the less, I can learn a little from reading this PDF:
Looking at the bounding boxes for the flattened field XObject and it's internal clipping rectangle, it looks like it should be using most of the page:
The page is ~600 points wide by ~850 tall.
The flattened field XObject is ~560 points wide by ~100 tall.
I wonder if there's some non-standard carriage return characters in your text that iText picks up on by Acrobat does not...
Anyway, I'd like to see the unflattened PDF. Filled in is good, but not flattened.
Okay, looked at the template. I don't see anything that would cause the line breaking you're seeing... which makes me think my second guess was right: new line characters.
Looking at the text layout code might give me a hint. Each of your lines of text goes like this (for example):
1 0 0 1 2 88.24 Tm 0 g (Die Semmerrolle der l{e4}nge nach zu einer grossen Roulade)Tj
n n n n n n Tm: text matrix
g: gray (0 g: black)
(...)Tj: show text
That's consistent with the code path when you set a text field value in the trunk of iText (and the most recent release[s]). That code (ColumnText) is quite good at breaking text properly, and used all over the place. The bounding box is correct (as shown in a couple places of the flattened PDF).
Check your input.