svmiller / svm-r-markdown-templates

This is my (deprecated) suite of R Markdown templates for academic manuscripts, beamer presentations, and syllabi. DOWNLOAD {stevetemplates} INSTEAD.
http://svmiller.com/stevetemplates/
Other
896 stars 737 forks source link

No bookmarks generated when building with pdflatex #21

Closed chang-che closed 5 years ago

chang-che commented 5 years ago

Hi, Thank you very much for sharing these great r markdown templates with us! I find the svm-rmarkdown-article-example.Rmd is very useful.

When I compiled it in my rstudio, I found the pdf file generated had no bookmarks showing. I tried with pdf expert and adobe pdf reader and the problem still existed.

Then I tried to compile the latex file (.tex) directly, then I found when I compiled it with pdflatex engine, no bookmarks showing with following warning message:

/Users/changche/Downloads/svm-rmarkdown-article-example.tex:150: Package hyperref Warning: Option bookmarks' has already been used,(hyperref) setting the option has no effect on input line 150. /Users/changche/Downloads/svm-rmarkdown-article-example.tex: Package hyperref Warning: Draft mode on. /Users/changche/Downloads/svm-rmarkdown-article-example.tex:179: LaTeX Font Warning: Font shapeOMS/cmsy/m/n' in size <13.6799> not available(Font) size <14.4> substituted on input line 179. /Users/changche/Downloads/svm-rmarkdown-article-example.tex: LaTeX Font Warning: Size substitutions with differences(Font) up to 0.7201pt have occurred.

When compiled with xelatex engine, bookmarks are back with the following warning message:

/usr/local/texlive/2017/texmf-dist/tex/latex/base/inputenc.sty: Package inputenc Warning: inputenc package ignored with utf8 based engines. /Users/changche/Downloads/svm-rmarkdown-article-example.tex:150: Package hyperref Warning: Option bookmarks' has already been used,(hyperref) setting the option has no effect on input line 150. /Users/changche/Downloads/svm-rmarkdown-article-example.tex: Package hyperref Warning: Rerun to get /PageLabels entry. /Users/changche/Downloads/svm-rmarkdown-article-example.tex:179: LaTeX Font Warning: Font shapeOMS/cmsy/m/n' in size <13.6799> not available(Font) size <14.4> substituted on input line 179. /Users/changche/Downloads/svm-rmarkdown-article-example.tex: LaTeX Font Warning: Size substitutions with differences(Font) up to 0.7201pt have occurred.

Do you know what could cause this error messages and the problem of no bookmarks?

Thanks!!

svmiller commented 5 years ago

Looking at this now. For some reason, an index/outline/bookmark (I think the nomenclature varies from PDF reader to PDF reader) appears when I compile with xelatex vs. pdflatex. However, I'm not getting the warning message. I wonder if my latest monkeying moved something around somehow.

svmiller commented 5 years ago

Again, just throwing rocks at stuff to see what happens, but they appear when latex_engine: pdflatex provided there's a header-includes in the YAML as follows:

header-includes:
  -  \usepackage{hyperref}

This wouldn't be the first time R Markdown/Pandoc used to do something by default several years ago that no longer became default in subsequent updates, but I don't know if that's the case here. Can you check on your end?

chang-che commented 5 years ago

Again, just throwing rocks at stuff to see what happens, but they appear when latex_engine: pdflatex provided there's a header-includes in the YAML as follows:

header-includes:
  -  \usepackage{hyperref}

This wouldn't be the first time R Markdown/Pandoc used to do something by default several years ago that no longer became default in subsequent updates, but I don't know if that's the case here. Can you check on your end?

It worked! Thank you very much!