Giter Site home page Giter Site logo

Comments (23)

FelixErnst avatar FelixErnst commented on August 24, 2024 1

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.

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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)

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024
  |...................................................................| 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

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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.

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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.

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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?

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

yihui avatar yihui commented on August 24, 2024

@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).

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

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.

from biocstyle.

yihui avatar yihui commented on August 24, 2024

@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.

from biocstyle.

FelixErnst avatar FelixErnst commented on August 24, 2024

@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.

from biocstyle.

aoles avatar aoles commented on August 24, 2024

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.

from biocstyle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.