Skip to content
Permalink
Browse files
add something about inserting latex
  • Loading branch information
James Brusey committed Jan 31, 2023
1 parent 6025771 commit bd4750326808b673b5c4133ae762f305d8bd18d9
Showing 1 changed file with 29 additions and 2 deletions.
@@ -16,15 +16,42 @@ output:
This should automatically number your sections.

* Selecting the LaTeX class
I personally prefer the KOMA report class over the LaTeX default.
I personally prefer the KOMA report class over the LaTeX default.
I usually turn off the geometry and subtitle packages as well.
#+BEGIN_SRC
---
...
documentclass: scrreprt
...
geometry: false
subtitle: false
---
#+END_SRC

** Inserting LaTeX commands into your text
You can insert a block of LaTeX commands directly into your text by wrapping them like so:
#+begin_src
```{=latex}
\frontmatter
\tableofcontents
\mainmatter
```
#+end_src

The above example is also great when using =scrreprt= or =scrbook= to insert the table of contents and to number the first few pages with roman numerals instead of arabic numbers. If you have an appendix, you'll also want to use =\backmatter=.

* Including images
The documentation for referencing images is here: https://pandoc.org/MANUAL.html#images.
Images need to sit in a file and they then get included into the document when it is compiled.
The syntax is something like:
#+begin_src
![This is a caption](image.png)
#+end_src
Note the hint about `implicit_figures', which means that if you include alternative text (that's the text in square brackets) and put the image in its own paragraph, then it will be turned into a figure float.

Don't be afraid to put lots of description in your caption as this will be helpful to the reader.
Captions that just say "Results" or "Graph of performance" are not so useful.
More useful captions should contain 2 or more sentences and should make the figure understandable without reference to the main text.

* Citations
The first thing to know is that to cite a paper with RMarkdown, you need to use the =@= [[https://pandoc.org/MANUAL.html#citation-syntax][citation syntax]].
The thing after =@= is the citation key.

0 comments on commit bd47503

Please sign in to comment.