New to Xaringan and StackOverflow. Had a hard time figuring out how to create tabs (panels) on slides given the info available in the instructions. But, I have it working. However, there is a ] below the title on every Panel slide. Why? This seems to be causing my text to go off the bottom of the slide. I think if I could remove it, then the slides would shift upwards and there would be enough space for my content to fit on the slide.
I have tried removing various ] brackets, but depending on which one I remove, it either removes panels and overlaps all of the content on one slide with the tables and graphs or it deletes the panel and all the content from the panel.
At first, I was unable to make more than one slides with panels. The first slide worked perfectly fine and did not have the random ] at the top of it. But the second slide would not create panels. It just threw all of the content overlapping on one slide. I was able to create two slides with panels when I found
div solution
here
, but that is when the issue with the ] started appearing. The ] is not part of the content.
In reality, there are 4 tabs per slide in roughly the following format:
Tab 1: content and image
Tab 2: R code reactable table
Tab 3: conent and imate
Tab 4: R code ggplot2 plotly interactive graph
I expect one slide with 4 tabs that can be clicked on, but without the extra space or extra characters between the title and the tabs.
EDIT
I put my code here, but someone changed it and it no longer reflected what I had written. I deleted it because it was no longer my code. I also found something in the source code. There is clearly a ] in the source code. How do I find that file and remove it from the source code?
I am trying to use mermaid library in Quarto however the text in the boxes do not fit - they cut off the last letter or two.
Can anyone provide a solution?
I have already checked out two open questions below but they are different than my question
Mermaid diagram in Quarto/Rmarkdown: narrow and blurry
How to prevent mermaid flow charts overflowing in quarto
Code below:
---
format: revealjs
---
## Example
Blah Blah
```{mermaid}
flowchart LR
A[real time insights] --> B{Classification}
B --> C[Threat]
B --> D[Opportunity]
C --> E[Defend Value]
D --> F[Capture Value]
```
this doesn't solve the issue but just simply adding some spaces (1-3) after your text will move the border of the box so that your text isn't cut off.
I'm having trouble thinking through a proper grid layout for part of a landing page. My issue is with the arrows as shown. The blue/green boxes show the row/column layout I have currently. I have thought about putting the arrows in their own columns but then the "Step X" and summary text won't flow into the arrow columns. The important part is that the images and the text in each column properly line up, especially when switching to single-columns on mobile.
Any advice is appreciated.
I am putting together an Rmarkdown PDF document with the following YAML settings:
---
output:
pdf_document:
fig_caption: true
fig_crop: true
toc_depth: 3
header-includes:
- \usepackage{hyperref}
---
Within the body of the document I've inserted a few PNG images, using the following syntax
Paragraph 1..........
![Caption](path/image.png)
Paragraph 2....
And when the document is rendered, the image appears as expected within the text, between Paragraph 1 and Paragraph 2. However, I am getting some unpredictable results where the rendered image appears after Paragraph 2 in some cases and I can't manage to solve it.
I have run into the same problem. It appears if you wrap the image in "paragraph" tags, the image will be in-line with the text.
Paragraph 1...
<p>
![](image.png)
</p>
Paragraph 2...
When tackling similar issues, I've used \FloatBarrier (from the placeins package) to control positioning. I'm not the most experienced knitr rmarkdown LaTeX user, but I've had success with that before.
Basically, the images "float"; you can control what the can't float past by inserting a barrier. That description is crude, but you might find the technique effective.
\newline seems to work.
History and Overview of R
![R programming](Images/R.PNG)\newline
will insert vertical space
to keep your figure captions make sure the ![] is still in a separate paragraph (separated by blank lines above and below) in the Rmarkdown document
### Heading 1 ![This is my figure caption](`r fig_var`){width=400px}
### Heading 2
where fig_var is an r variable that contains the full path to the figure image
One option is to add
\newpage
to act in a similar way as the Floatbarrier. It is not to elegant but seems to work.
For greater clarity consider the example from above:
Paragraph 1..........
![Caption](path/image.png)
Paragraph 2....
To avoid the image to move in front of the second paragraph, you could do the following:
Paragraph 1..........
![Caption](path/image.png)
\newpage
Paragraph 2....
There is no correct answer to this.
Try adding fig.show='hold' to keep your images where they should be
The paragraphs might be skipped because Latex will try and fit the text/images with least space.
I sorted my issue out using (1) and to "work with" (2), you can use
\pagebreak in an appropriate position depending on what is before and after paragraphs 1 and 2.
This can be done only after seeing the pdf result, by better fitting of the image in question into potentially a next page (more space). Of course, it would also mean adding the page break elsewhere (e.g before or after any of the p1, p2 or the image).
Is it possible to use multiple layouts on a single slide. I want to use the radio layout and I have a custom made footer layout that I'd like use as well, which puts a logo in the bottom left part of the slide. To activate the footer I put a footer.html file in the slide deck's assets/layouts folder. To reference it I have to write &footer after the --- that creates a new slide. However to activate the quiz layout I also have to add &radio next to the --- slide. It won't do both however, for example this doesn't work:
---&radio &footer
## Question 1
What is 1 + 1?
1. 1
2. _2_
3. 3
4. 4
*** .hint
This is a hint
*** .explanation
This is an explanation