0

I am stuck on something that may be very simple. I have a rmarkdown document which uses bookdown to produce an HTML document. What I am trying to achieve is to have a floating table of contents and under it to place a copyright notice that floats together with the TOC.

The floating TOC is easy to achieve, but I can't figure out how to put a copyright notice (e.g. "My copyright") underneath and make it flow together with the TOC.

Here is my YAML preamble. Under it, just at the beginning of the document I have a CSS styling that adds an image over the table of content.

---
title: "My document"
author: "`John Doe`"
date: "`r paste('Date:', format(Sys.time(), '%d %B, %Y'))`"
urlcolor: red
fontsize: 13pt
output:
  bookdown::html_document2:
    number_sections: no
    toc: true
    toc_float:
      collapsed: false
    fig_width: 8
    fig_height: 4
---

<style>
#TOC {
  background: url('C:/temp/logo.png');
  background-size: contain;
  padding-top: 65px !important;
  background-repeat: no-repeat;

}
</style>

Can someone help?

panman
  • 1,179
  • 1
  • 13
  • 33
  • 1
    Might this be enough: `#TOC::after { content: "My copyright"; }` – Martin Schmelzer Mar 10 '19 at 18:29
  • Thank you very much! I tried something similar, did not know how to add the `after`, your suggestion works. However, "My copyright" appears at the end of the TOC as its item (well, not clickable), not under it. – panman Mar 11 '19 at 10:45

0 Answers0