Search
Question: floating toc with BiocStyle
1
gravatar for Guangchuang Yu
2.6 years ago by
Hong Kong
Guangchuang Yu800 wrote:

I add an additional css as shown in http://rpubs.com/stevepowell99/floating-css

 

via :

---
output:
  BiocStyle::html_document:
    css: my.css
---

and 

```{r style, echo = FALSE, results = 'asis'}
BiocStyle::markdown(css.files = c('my.css'))
```

 

But it fail to generate a html as expected. The table of content is still in the beginning of the main text.

 

Is it possible to generate toc floating in left hand side with BiocStyle?

 

 

 

ADD COMMENTlink modified 2.6 years ago by Andrzej Oleś670 • written 2.6 years ago by Guangchuang Yu800
1
gravatar for Andrzej Oleś
2.6 years ago by
Andrzej Oleś670
EMBL Heidelberg, Germany
Andrzej Oleś670 wrote:

Dear Guangchuang,

this should in principle be possible. Please note that if you are specifying the CSS file in the header you shouldn't repeat it in the argument to BiocStyle::markdown, and you probably need to explicitly set toc: yes

Please try the following code which works for me:

---
output:
  BiocStyle::html_document:
    toc: yes
    css: custom.css
---

```{r style, echo = FALSE, results = 'asis'}
BiocStyle::markdown()
```

custom.css

#TOC {
position: fixed;
left: 0;
top: 0;
width: 200px;
height: 100%;
overflow:auto;
}

Best,

Andrzej

ADD COMMENTlink written 2.6 years ago by Andrzej Oleś670

yes, it works.

Thanks a lot.

ADD REPLYlink written 2.6 years ago by Guangchuang Yu800
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 392 users visited in the last hour