0

I am using the following pandoc header:

output:
  rmarkdown::html_document:
    theme: lumen
    fig_caption: yes        

All images are being marked as figures and moved to the end of the document (which btw is not exactly what I had in mind ..). But the point of this question is: they are being vertically centered on their respective pages. I would like them to be top-aligned vertically.

The preferred approach would be a single directive - either in tex or pandoc - that would be applied to all images (/figures). Approaches like using minitab would be less desirable - since they would likely require code for each image.

This answer claims to do exactly that - but had no effect (maybe it were only applicable to beamer .. ?) https://stackoverflow.com/a/42471345/1056563

classoption: t

So here was the attempt I made :

output:
  rmarkdown::html_document:
    theme: lumen
    fig_caption: yes        
classoption: t

.. with the last line having no effect.

Any tips?

Update At this point I need to just find any solution to removing the large whitespace gap between the tops of the pages and the images/figures on each page. I would think that should be straightforward by adding tex directives just before each image; however I am not discovering how to do that.

  • 1
    It is very unclear what you are doing exactly. The command rmarkdown::html_document for example is used to convert to HTML not to PDF. It would help, if you could post a) a minimal working example (MWE) that shows the issue and b) a picture of the output. – DG' Nov 5 '18 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.