Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BiocStyle and png image not usable in the same document #42

Closed
FelixErnst opened this issue Feb 13, 2018 · 23 comments
Closed

BiocStyle and png image not usable in the same document #42

FelixErnst opened this issue Feb 13, 2018 · 23 comments

Comments

@FelixErnst
Copy link
Contributor

FelixErnst commented Feb 13, 2018

---
title: "test"
author: "xyz"
date: "9 Februar 2018"
output: BiocStyle::pdf_document
vignette: >
  %\VignetteIndexEntry{test}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---
![](image.png)

does not work. On Windows 10 64 bit 16299.214 / RStudio 1.1.423 / R 3.4.3 knitting the document reports ! Package pdftex.def Error: File image.png not found: using draft setting. Changing output: pdf_document solves the issue and a pdf is successfully created.

The original file with BiocStyle:: works under Ubuntu 17.10 / RStudio 1.1.423 / R-devel. Was this solved with the #32 issue or is it caused by something else?

I am sorry, but I don't have the expertise to install R-devel under Windows, so I cannot test that. Can you give me hint, whether this problem is fixed in R-devel?

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Thanks for reporting. I'm not sure what could be the cause of the error an whether it is related to #32.

It would be great if you could paste the contents of testfile.tex resulting from knitting the following testfile.Rmd.

---
title: "test"
author: "xyz"
output: 
  BiocStyle::pdf_document:
    keep_tex: true
---
![](image.png)

@FelixErnst
Copy link
Contributor Author

This is located in the %appdata%/../Local/Temp folder instead of the working directory next to the .Rmd file.
test.zip

In comparison, the default file (from pdf_document) appears shortly in a subfolder next to the .Rmd, but disappears even if keep_tex is set
test-default.zip

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Thanks, could you maybe paste the output of running rmarkdown::render on that test file as well?

@FelixErnst
Copy link
Contributor Author

  |...................................................................| 100%
  ordinary text without R code




processing file: test.Rmd
output file: test.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc5e3c6d806883.tex --table-of-contents --toc-depth 2 --template "C:\Users\FELIXE~1\AppData\Local\Temp\RtmpSmm3bn/BiocStyle/template.tex" --number-sections --highlight-style tango --latex-engine pdflatex --include-in-header "C:\Users\FELIXE~1\AppData\Local\Temp\RtmpSmm3bn\5e3c1ae531c6.tex" --variable graphics=yes --variable tables=yes --standalone 
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6600 64-bit)
entering extended mode
! Package pdftex.def Error: File `image.png' not found: using draft setting.

Fehler: Failed to compile test.tex. See test.log for more info.
Zusätzlich: Warnmeldungen:
1: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
2: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
Ausführung angehalten

versus

 |.................................................................| 100%
  ordinary text without R code


"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc65c066894018.tex --template "C:\R\R-3.4.3\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" 


processing file: test.Rmd
output file: test.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc65c05044393a.pdf --template "C:\R\R-3.4.3\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" 

Output created: C:/Users/Felix Ernst/AppData/Local/Temp/RtmpMD2Y0u/preview-37743de078c4.dir/test.pdf

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Great, thanks a lot! One last thing: does setting output: bookdown::pdf_document2 work, or fails too?

@FelixErnst
Copy link
Contributor Author

It fails. So it is a bookdown problem... I didn't know about that debugging option.

  |.................................................................| 100%
  ordinary text without R code


"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc4a944561370.tex --table-of-contents --toc-depth 2 --template "C:\R\R-3.4.3\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --number-sections --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable tables=yes --standalone 


processing file: test.Rmd
output file: test.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6600 64-bit)
entering extended mode
! Package pdftex.def Error: File `image.png' not found: using draft setting.

Fehler: Failed to compile test.tex. See test.log for more info.
Zusätzlich: Warnmeldungen:
1: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
2: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
Ausführung angehalten

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Thanks for your help on this. Indeed, it seems to be bookdown-specific problem, please consider reporting it at https://github.com/rstudio/bookdown/issues.

@FelixErnst
Copy link
Contributor Author

FelixErnst commented Feb 13, 2018

Hi @aoles

you might want to have a look at the bookdown issue. It is becoming a bit weird, since with TinyTeX the image works, but the BiocStyle format does not. I am now really out of my depth here.

PS: Ubuntu + R 3.4.3 works as well. so it is not a R-devel solution/problem.

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Thanks for trying TinyTeX. Are you absolutely sure the observed PDF is the result of compiling a document with output: BiocStyle::pdf_document and not an artifact from a previous run with output: bookdown::pdf_document2 but e.g. retrieved from some temp cache? Just wondering, as I've never seen such behavior before. If the issue persists, please paste again the output of running rmarkdown::render with TinyTeX on test.zip along with the resulting tex source.

@FelixErnst
Copy link
Contributor Author

FelixErnst commented Feb 13, 2018

Oh, caching... What was quoted to me again not long ago:

"There are only two hard things in Computer Science: cache invalidation and naming things."
http://www.meerkat.com/2017/12/naming-things-hard/

You were right: caching issue. The test.pdf was created by a previous run and therefore no error was thrown.

I redid it know several time, with removing all(?) caches I could find. Here is the output using BiocStyle::pdf_document:
BiocStyle.zip

  |...................................................................| 100%
  ordinary text without R code




processing file: test.Rmd
output file: test.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.tex --table-of-contents --toc-depth 2 --template "C:\Users\flixr\AppData\Local\Temp\RtmpA9nNu0/BiocStyle/template.tex" --number-sections --highlight-style tango --latex-engine pdflatex --include-in-header "C:\Users\flixr\AppData\Local\Temp\RtmpA9nNu0\195c126e7c55.tex" --variable graphics=yes --variable tables=yes --standalone 
tlmgr search --file --global "/ecrm0800[.](tfm|afm|mf|otf)"
Trying to automatically install missing LaTeX packages...
tlmgr install ec
tlmgr.pl: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr.pl install: package already present: ec
tlmgr search --file --global "/ecrm0800[.](tfm|afm|mf|otf)"

Output created: test.pdf
Error in tools::file_path_as_absolute(output_file) : 
  file 'test.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning messages:

1: running command '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' had status 1 
2: running command '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' had status 1 
Execution halted

edit: Now this fails even without the image. Tomorrow I can test again with MiKTeX.

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

Thanks! Did you try compiling the resulting test.tex? Even if it fails, it still might give you some more verbose error message helpful for debugging

@FelixErnst
Copy link
Contributor Author

That returns
test.log

Running pdflatex.exe on test.tex...failed

Issues: 7 warnings

Package fixltx2e Warning: fixltx2e is not required with releases after 2015
(fixltx2e)                All fixes are now in the LaTeX kernel.
(fixltx2e)                See the latexrelease package for details.

LaTeX Warning: You have requested package `C:/R/R-3.4.3/library/BiocStyle/resou
rces/tex/Bioconductor2',
               but the package provides `Bioconductor'.

Package geometry Warning: Over-specification in `h'-direction.
    `width' (384.1122pt) is ignored.

Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use
less on input line 173.

LaTeX Font Warning: Font shape `T1/phv/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 140.

LaTeX Font Warning: Font shape `T1/phv/bx/n' undefined
(Font)              using `T1/phv/m/n' instead on input line 140.

LaTeX Font Info:    Font shape `T1/lmss/bx/it' in size <14.4> not available
(Font)              Font shape `T1/lmss/bx/sl' tried instead on input line 140.

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

@aoles
Copy link
Collaborator

aoles commented Feb 13, 2018

It seems to fail on the following error reported in test.log:

!pdfTeX error: pdflatex.exe (file ecrm1000): Font ecrm1000 at 600 not found
 ==> Fatal error occurred, no output PDF file produced!

Did you try to resolve it?

@FelixErnst
Copy link
Contributor Author

FelixErnst commented Feb 13, 2018

Not really. To get from the image specific behaviour using MiKTeX (bookdown + BiocStyle) to the BiocStyle only but image independent issue with TinyTeX took me some time.

From the rmarkdown::render output it seams that some file are not correctly found #42 (comment)

tlmgr search --file --global "/ecrm1000[.](tfm|afm|mf|otf)"
Trying to automatically install missing LaTeX packages...
tlmgr install ec
tlmgr.pl: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr.pl install: package already present: ec

But the search is triggered within every run and it states that the package is already present. With bookdown the error does not appear, so I am back at the beginning, suggesting that it is indeed a BiocStyle issue. Two files are present in %appdata%\Roaming\TinyTeX\texmf-dist\fonts\tfm\jknappen\ec (ecrm1000.tfm) and Roaming\TinyTeX\texmf-dist\fonts\source\jknappen\ec (ecrm1000.mf)

I am sorry that this is so laborious, but I am out of my depth a bit. Tomorrow I can try again using MiKTeX again (have to delete TinyTeX first) and with TinyTeX on a different machine.

@yihui
Copy link

yihui commented Feb 13, 2018

@FelixErnst I don't know why it keeps installing the ec package; ec is included in TinyTeX by default. Can you delete test.log and retry?

FWIW, I just tried it on Windows and could not reproduce the LaTeX issue here (about the missing ec package).

@FelixErnst
Copy link
Contributor Author

FelixErnst commented Feb 13, 2018

I triggered a reinstall of ec using tlmgr install -reinstall ec and deleted everything except for the Rmd file with the following content

---
title: "test"
author: "xyz"
output: 
  BiocStyle::pdf_document:
    keep_tex: true
---
blablabla

The problem persists. I am now at home and will try at work tomorrow on a different machine (the error appeared there first) by removing MiKTeX and using TinyTeX

@FelixErnst
Copy link
Contributor Author

So first things first:

I uninstalled MiKTeX an tried with TinyTeX first. bookdown works out of the box without the image. With image it fails with the error ! Package pdftex.def Error: File image.png' not found: using draft setting.`. The temp folder is not created next to the Rmd file, but in %appdata%/Local/Temp

With the image BiocStyle failed the same way as bookdown. Without the image this error message appeared in the rmarkdown log:

  |...................................................................| 100%
  ordinary text without R code


"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc1e54746b302a.tex --table-of-contents --toc-depth 2 --template "C:\Users\FELIXE~1\AppData\Local\Temp\Rtmp8AvTSn/BiocStyle/template.tex" --number-sections --highlight-style tango --latex-engine pdflatex --include-in-header "C:\Users\FELIXE~1\AppData\Local\Temp\Rtmp8AvTSn\1e547ee72a4.tex" --variable graphics=yes --variable tables=yes --standalone 


processing file: test.Rmd
output file: test.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
This is METAFONT, Version 2.7182818 (TeX Live 2017/W32TeX) (preloaded base=mf)


(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm1000.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbase.mf)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exroman.mf
 Ok
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccess.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expseudo.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exruwest.mf
 Ok [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203]
[204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215]
[216] [217] [218] [219] [220] [221] [222] [223])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlwest.mf
 Ok [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235]
[236] [237] [238] [239] [240] [241] [242] [243] [244] [245] [246] [247]
[248] [249] [250] [251] [252] [253] [254] [255])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrueast.mf
 Ok [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139]
[140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151]
[152] [153] [154] [155] [156] [157])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrleast.mf
 Ok [158] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170]
[171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182]
[183] [184] [185] [186] [187] [188])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbraces.mf
 Ok [94] [126] [23] [40] [41] [60] [124] [62] [91] [93] [92] [123] [125]
[95] [127] [32])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expunct.mf
 Ok [14] [15] [19] [20] [13] [18] [33] [39] [42] [43] [44] [46] [47] [58]
[59] [61] [96] [189] [17] [45] [16] [21] [22])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccent.mf
 Ok [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exsign.mf
 Ok [24] [34] [35] [36] [37] [64] [191] [159])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlig.mf
 Ok [25] [26] [28] [27] [29] [30] [31])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exromp.mf
 Ok [38] [63] [190])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrulett.mf
 Ok [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78]
[79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrllett.mf
 Ok [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108]
[109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120]
[121] [122])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrdigit.mf
 Ok [48] [49] [50] [51] [52] [53] [54] [55] [56] [57])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrligtb.mf
 Ok) ) ) )
(some charht values had to be adjusted by as much as 0.06586pt)
Font metrics written on ecrm1000.tfm.
Output written on ecrm1000.600gf (256 characters, 51184 bytes).
Transcript written on ecrm1000.log.
mf-nowin.exe --progname=mf --base=mf \mode:=ljfour; \mag:=1+0/600; nonstopmode; input ecrm1000;
gftopk.exe ecrm1000.600gf ecrm1000.600pk
Cannot open $HOM./TinyTex/.TinyTe./TinyTex/texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk to write.

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ecrm1000

The command name is C:\Users\Felix Ernst\AppData\Roaming\TinyTeX\bin\win32\mktexpk
kpathsea: Appending font creation commands to missfont.log.
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
This is METAFONT, Version 2.7182818 (TeX Live 2017/W32TeX) (preloaded base=mf)


(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm1000.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbase.mf)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exroman.mf
 Ok
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccess.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expseudo.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exruwest.mf
 Ok [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203]
[204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215]
[216] [217] [218] [219] [220] [221] [222] [223])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlwest.mf
 Ok [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235]
[236] [237] [238] [239] [240] [241] [242] [243] [244] [245] [246] [247]
[248] [249] [250] [251] [252] [253] [254] [255])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrueast.mf
 Ok [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139]
[140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151]
[152] [153] [154] [155] [156] [157])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrleast.mf
 Ok [158] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170]
[171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182]
[183] [184] [185] [186] [187] [188])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbraces.mf
 Ok [94] [126] [23] [40] [41] [60] [124] [62] [91] [93] [92] [123] [125]
[95] [127] [32])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expunct.mf
 Ok [14] [15] [19] [20] [13] [18] [33] [39] [42] [43] [44] [46] [47] [58]
[59] [61] [96] [189] [17] [45] [16] [21] [22])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccent.mf
 Ok [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exsign.mf
 Ok [24] [34] [35] [36] [37] [64] [191] [159])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlig.mf
 Ok [25] [26] [28] [27] [29] [30] [31])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exromp.mf
 Ok [38] [63] [190])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrulett.mf
 Ok [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78]
[79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrllett.mf
 Ok [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108]
[109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120]
[121] [122])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrdigit.mf
 Ok [48] [49] [50] [51] [52] [53] [54] [55] [56] [57])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrligtb.mf
 Ok) ) ) )
(some charht values had to be adjusted by as much as 0.06586pt)
Font metrics written on ecrm1000.tfm.
Output written on ecrm1000.600gf (256 characters, 51184 bytes).
Transcript written on ecrm1000.log.
mf-nowin.exe --progname=mf --base=mf \mode:=ljfour; \mag:=1+0/600; nonstopmode; input ecrm1000;
gftopk.exe ecrm1000.600gf ecrm1000.600pk
Cannot open $HOM./TinyTex/.TinyTe./TinyTex/texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk to write.

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ecrm1000

The command name is C:\Users\Felix Ernst\AppData\Roaming\TinyTeX\bin\win32\mktexpk
kpathsea: Appending font creation commands to missfont.log.
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
This is METAFONT, Version 2.7182818 (TeX Live 2017/W32TeX) (preloaded base=mf)


(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm1000.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbase.mf)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/ecrm.mf
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exroman.mf
 Ok
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccess.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expseudo.mf
 Ok)
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exruwest.mf
 Ok [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203]
[204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215]
[216] [217] [218] [219] [220] [221] [222] [223])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlwest.mf
 Ok [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235]
[236] [237] [238] [239] [240] [241] [242] [243] [244] [245] [246] [247]
[248] [249] [250] [251] [252] [253] [254] [255])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrueast.mf
 Ok [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139]
[140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150] [151]
[152] [153] [154] [155] [156] [157])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrleast.mf
 Ok [158] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170]
[171] [172] [173] [174] [175] [176] [177] [178] [179] [180] [181] [182]
[183] [184] [185] [186] [187] [188])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exbraces.mf
 Ok [94] [126] [23] [40] [41] [60] [124] [62] [91] [93] [92] [123] [125]
[95] [127] [32])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/expunct.mf
 Ok [14] [15] [19] [20] [13] [18] [33] [39] [42] [43] [44] [46] [47] [58]
[59] [61] [96] [189] [17] [45] [16] [21] [22])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exaccent.mf
 Ok [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exsign.mf
 Ok [24] [34] [35] [36] [37] [64] [191] [159])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrlig.mf
 Ok [25] [26] [28] [27] [29] [30] [31])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exromp.mf
 Ok [38] [63] [190])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrulett.mf
 Ok [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78]
[79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrllett.mf
 Ok [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108]
[109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120]
[121] [122])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrdigit.mf
 Ok [48] [49] [50] [51] [52] [53] [54] [55] [56] [57])
(c:/Users/Felix Ernst/AppData/Roaming/TinyTeX/texmf-dist/fonts/source/jknappen/
ec/exrligtb.mf
 Ok) ) ) )
(some charht values had to be adjusted by as much as 0.06586pt)
Font metrics written on ecrm1000.tfm.
Output written on ecrm1000.600gf (256 characters, 51184 bytes).
Transcript written on ecrm1000.log.
mf-nowin.exe --progname=mf --base=mf \mode:=ljfour; \mag:=1+0/600; nonstopmode; input ecrm1000;
gftopk.exe ecrm1000.600gf ecrm1000.600pk
Cannot open $HOM./TinyTex/.TinyTe./TinyTex/texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk to write.

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ecrm1000

The command name is C:\Users\Felix Ernst\AppData\Roaming\TinyTeX\bin\win32\mktexpk
kpathsea: Appending font creation commands to missfont.log.

Output created: C:/Users/Felix Ernst/AppData/Local/Temp/Rtmpykdwzz/preview-2f505a9f3442.dir/test.pdf
Fehler in tools::file_path_as_absolute(output_file) : 
  file 'C:/Users/Felix Ernst/AppData/Local/Temp/Rtmpykdwzz/preview-2f505a9f3442.dir/test.pdf' does not exist
Ruft auf: <Anonymous> -> <Anonymous>
Zusätzlich: Warnmeldungen:
1: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
2: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
3: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
4: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
5: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
6: Ausführung von Kommando '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' ergab Status 1 
Ausführung angehalten

It is more verbose than at home, but the error is the same $HOM./TinyTex/.TinyTe./TinyTex/texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk

So i think will just leave it at that. @aoles @yihui Thanks for the help and patience, but this is becoming to time consuming for me. It appears to be machine specific or not and the inconsistency with the LaTeX just makes it more than painful.

@FelixErnst
Copy link
Contributor Author

so after I took a breath>

On my machine at work the problem with image is that the temp folder is created inside %appdata%/Local/Temp folder instead next to the Rmd document. If I put the image.png next to the generate tex file in %appdata%/Local/Temp and try to compile the pdf with rstudio, the error about the image is gone and the creation fails again with the same error about the ecrm1000 font as described above.

  1. How do I change the temp file generation problem? Do you have an idea what can influence this setting? Is it in RStudio? Is it some registry problem? Any suggestions welcome.
  2. The problem with the ecrm1000 still persists. Any idea what this is about?

Thanks again.

@FelixErnst
Copy link
Contributor Author

So it gets even better:

The image issue is due to the fact that the .Rmd file with the image was located on drive D:. Moving it and the image to C:\ solved the problem of the image not being found. The reason behind this is, that the temporary tex file is created next to the .Rmd file, if on drive C:\ and in %appdata%\Local\Temp if on drive D:. At home I head the file on drive C:\ so the image issue never occurred. Before I checked at home, I switched from MiKTex to TinyTeX confusing me regarding cause and effect.

So this leaves just the ecrm1000 font file not being found, when using TinyTeX. tlmgr search --file --global "/ecrm1000[.](tfm|afm|mf|otf)" run from command line finds the file, while running markdown::render apparently does not. I revert back to MiKTeX and see if it works.

@FelixErnst
Copy link
Contributor Author

So now I come full circle:

Using BiocStyle and MiKTeX complete works, if the .Rmd file is on drive C:. On drive D:\ it fails, since the temp files end up in another folder.

MiKTeX basic and TinyTeX fail with the font error.

@yihui
Copy link

yihui commented Feb 14, 2018

@FelixErnst Sorry for adding another issue (TinyTeX) that seems to be irrelevant to your original issue, but how did you install TinyTeX? You are expected to install it with:

devtools::install_github(c('yihui/tinytex', 'rstudio/rmarkdown'))
tinytex::install_tinytex()

Another thing we still haven't figured out is whether this is a bookdown or BiocStyle issue. Since MiKTeX does not have the ec problem, you can stay with MiKTeX for now (we can figure out the TinyTeX issue later). You just need to check if changing BiocStyle::pdf_document to bookdown::pdf_document2 still causes the same problem (image not found). Remember to clean up cache and auxiliary files before you recompile.

@FelixErnst
Copy link
Contributor Author

@yihui Well it is more complicated than that apparently.

I tried to minimize the scenario further and figured out, that somehow the RStudio project files were responsible for the different behavior regarding .Rmd files. It is not apparently not a C/D drive problem, but an inside/outside problem regarding the project folder. Deleting the .Rproj file did not solve the problem, but deleting the hidden .Rproj.user folder did.

I tried to figure what files in this folder, where causing the image problem (aka. what triggered the generated tex files to be created in the %appdata%/Local/Temp folder), but there were so many that I just removed the .Rproj file and folder. That solved the issues regarding the image (Who what have thought about that...). Before you ask: I never touched the RStudio settings via the gui, so I don't know how that behavior got triggered.

Regarding TinyTeX: I used the bat file and after restarting RStudio tinytex:::is_tinytex() reports TRUE

It is as BiocStyle/TinyTeX issue. bookdown::pdf_document2 works, BiocStyle::pdf_document does not.

@aoles
Copy link
Collaborator

aoles commented Feb 15, 2018

Thanks a lot @FelixErnst for investing so much time and effort into debugging this - I really appreciate your determination.

Regarding the image file issue when compiling documents managed as R Studio projects: I've already noticed this before that apparently .Rmd files under vignettes directory are handled in a special way such that the output is not written to the source folder but rather to a temp preview directory. This is similar to calling rmarkdown::render with a non-default output_dir. The fact that the image is not carried over to this location might indicate some sort of problem with managing the dependencies by bookdown::pdf_document2. I'm able to reproduce the bug under Linux with the following MWE when using the Knit button in R Studio: test.zip This reminds me of rstudio/bookdown#519, and might be actually related to it.

The problem with ecrm1000 seems to be specific to your LaTeX configuration. It is not a direct problem with BiocStyle in the sense that it fails only during the final step of compiling the output .tex source, and the same source would build just fine on other machines (as long the path to Biocstyle.sty is adjusted accordingly). So I guess there is not much I can do on my side to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants