yihui / printr

Some (magical) printing methods for knitr
https://yihui.org/printr/
118 stars 24 forks source link

Markdown violation #5

Closed oscardelama closed 9 years ago

oscardelama commented 9 years ago

As I mentioned in another Issue, I don't like the TOC at the very vignette beginning.

To circumvent that, I am customizing the style sheet and using the following markup pattern where I want the TOC:

<div id="TOC">
<div class="toctitle">Table of Contents </div>
- [Digesting the Image Samples](#digest)
- [Getting the Computed Values](#result)
  * [Variance Result](#var)
  * [Covariance Result](#cov)
- [Introduction to Model Fitting](#intro-fit)  
</div>

However , the inner list (with the "Variance.." and "Covariance..." items), is ignored in the final html. They appear at the same level as the other LI items and not inside their own UL tag list.

I have to add "manual" UL tags to circumvent his:

<div id="TOC">
<div class="toctitle">Table of Contents </div>
- [Digesting the Image Samples](#digest)
- [Getting the Computed Values](#result)
<ul>
  * [Variance Result](#var)
  * [Covariance Result](#cov)
</ul>
- [Introduction to Model Fitting](#intro-fit)  
</div>

Thanks in advance.

yihui commented 9 years ago

Again, an rmarkdown issue, instead of printr. That said, make sure you indent by 4 spaces instead of 2.

<div id="TOC">
<div class="toctitle">Table of Contents </div>

- [Digesting the Image Samples](#digest)
- [Getting the Computed Values](#result)
    * [Variance Result](#var)
    * [Covariance Result](#cov)
- [Introduction to Model Fitting](#intro-fit)  

</div>
yihui commented 9 years ago

You may want to go through the Pandoc documentation at least once: http://johnmacfarlane.net/pandoc/README.html You do not need to remember everything, but it will certainly help you solve such problems by yourself in the future.

oscardelama commented 9 years ago

Oopss! The markdown in github and in other tools (e.g Ikiwiki) does not have such requirement.

I will certainly read the pandoc documentation for their markdown dialect when building vignettes.

Thank you.