# Issue with Documenter's pdf output - pictures not found

**URL:** <https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023>\
**Category:** General Usage\
**Tags:** documenter\
**Created:** [April 11, 2019, 8:10am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023 "2019-04-11T08:10:30Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 11, 2019, 8:10am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/1 "2019-04-11T08:10:30Z")

</div>

I’m using `Documenter.jl` to create documentation for a non-julia project. Creating the website works fine, but I can’t make a pdf with the docker image. If I understand correctly, `LaTeXWriter` misses the pictures.  
Julia error message:

```julia
julia> include("makepdf.jl")
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: LaTeXWriter: rendering PDF.
[ Info: LaTeXWriter: using docker to compile tex.
┌ Error: LaTeXWriter: failed to compile tex with docker. Logs and partial output can be found in C:\Users\cstamas\AppData\Local\Temp\jl_321C.tmp.
│ exception =
│ failed process: Process(`docker exec -u zeptodoctor latex-container bash -c 'mkdir /home/zeptodoctor/build
│ cd /home/zeptodoctor/build
│ cp -r /mnt/. .
│ latexmk -f -interaction=nonstopmode -view=none -lualatex -shell-escape URSZTAKI.tex
│ '`, ProcessExited(12)) [12]
└ @ Documenter.Writers.LaTeXWriter C:\Users\cstamas\.julia\packages\Documenter\8vUAI\src\Writers\LaTeXWriter.jl:166

```

One error from the `LaTeXWriter.stderr` file:

```julia
Latexmk: Missing input file: 'ursztaki_segedprogramok.png' from line
  'LaTeX Warning: File `ursztaki_segedprogramok.png' not found on input line 533.'

```

`Documenter.jl` versions: `Documenter v0.22.2`, `DocumenterLaTeX v0.2.0`, `DocumenterMarkdown v0.2.0`

I don’t know where to start debugging. Could you please point me where the error is? I happily provide more informations/log files/etc.

Edit1: `makepdf.jl`

```julia
using Documenter
using DocumenterLaTeX

makedocs(sitename = "URSZTAKI",
        format = LaTeX(platform = "docker"),
        pages = ["Home" => "index.md",
                "Guidelines" => "guidelines.md",
                "Információk" => ["Hírek, információk" => "hírek.md",
                                "Hasznos linkek - UR" => "hasznos_linkek.md"],
                "Releasek" => "releases.md",
                "Külső programok" => ["URSZTAKI Mathematica" => "kulso_programok/mathematica.md" ,
                                        "URSZTAKI segédprogramok" => "ursztaki_segedprogramok/URSZTAKI_helpers.md",
                                        "RoboProg" => "kulso_programok/RoboProg.md"],
                "Telepítési instrukciók" => ["Támogatott robotok" => "instrukciok/tamogatott_robotok.md",
                                                "URSZTAKI telepítés" => "instrukciok/telepites/URSZTAKI_telepites.md",
                                                "URSZTAKI telepítés URCappel" => "instrukciok/URSZTAKI_telepites_urcap.md",
                                                "Node-Red telepítés" => "instrukciok/node-red_telepites/Node-Red_telepites.md",
                                                "URSZTAKI Node-Red Dashboard" => "instrukciok/URSZTAKI-NR-dashboard.md"],
                "URSZTAKI dokumentáció" => ["URSZTAKI leírás" => "dokumentaciok/URSZTAKI_leírás.md",
                                                "URCap leírás" => "dokumentaciok/URCap.md",
                                                #"Taskok jegyzéke" => "dokumentaciok/taskjegyzek.md",
                                                "Node-Red flow leírás" => "dokumentaciok/Node-Red_flow_leiras.md",
                                                "Regiszterek" => "dokumentaciok/regiszterek.md",
                                                "Task fejlesztés guide" => "dokumentaciok/task_fejlesztes.md",
                                                "URSZTAKI-Erőszenzorok" => "dokumentaciok/URSZTAKI-eroszenzorok.md",
                                                "Hibakódok" => "dokumentaciok/hibakodok.md",
                                                "RTDE" => "dokumentaciok/RTDE.md"]
                ]
        )

```

(Edit2: to clarify, the website build is perfectly fine, every image is in it’s place.)

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 11, 2019, 8:39am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/2 "2019-04-11T08:39:31Z")

</div>

Is this a public repository? Where in the source did you put the picture?

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 11, 2019, 9:09am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/3 "2019-04-11T09:09:40Z")

</div>

It’s a private (svn) repository. I’ll try and create an MWE and report back.

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 11, 2019, 11:36am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/4 "2019-04-11T11:36:45Z")

</div>

Created a repo for the MWE:  
[https://github.com/cserteGT3/Documentertest](https://github.com/cserteGT3/Documentertest)

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 11, 2019, 11:46am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/5 "2019-04-11T11:46:00Z")

</div>

Thank you! However, I don’t seem to get any errors, this is what I did:

```julia
git clone https://github.com/cserteGT3/Documentertest
cd Documentertest
julia --project docs/makepdf.jl

```

and the output PDF has images.

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 12, 2019, 7:37am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/6 "2019-04-12T07:37:15Z")

</div>

Do you have any idea why is the difference?  
I’m on windows 10 with a fresh install of docker (first time using it).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 12, 2019, 8:15am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/7 "2019-04-12T08:15:05Z")

</div>

From the logs, LaTeX seems to be unhappy with paths like

```nohighlight
\includegraphics{guides\Lena.png}

```

since it considers `\Lena` a LaTeX command.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 12, 2019, 8:22am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/8 "2019-04-12T08:22:05Z")

</div>

Ah, good catch. So looks like Documenter should output `/` on Windows too, assuming tex can handle that.

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 12, 2019, 8:28am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/9 "2019-04-12T08:28:51Z")

</div>

Ahh, I missed that. Than you for pointing out! I’ll open an issue on GitHub.

`\` is one of the reasons why I hate windows.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 12, 2019, 8:33am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/10 "2019-04-12T08:33:00Z")

</div>

Can you try

```julia
pkg> add Documenter#fe/filepath-windows-tex

```

and see if that branch fixes it, see [https://github.com/JuliaDocs/Documenter.jl/pull/999](https://github.com/JuliaDocs/Documenter.jl/pull/999).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 12, 2019, 8:35am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/11 "2019-04-12T08:35:24Z")

</div>

AFAICT using the `/` for all OSs is the way to go, eg

[https://tex.stackexchange.com/questions/18913/paths-and-linux-windows-slash-conventions](https://tex.stackexchange.com/questions/18913/paths-and-linux-windows-slash-conventions)

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 12, 2019, 9:04am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/12 "2019-04-12T09:04:36Z")

</div>

The issue is still there. What I’ve done (from Git Bash):

```bash
$ git clone https://github.com/cserteGT3/Documentertest.git
Cloning into 'Documentertest'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 23 (delta 4), reused 19 (delta 2), pack-reused 0
Unpacking objects: 100% (23/23), done.

$ cd Documenter
bash: cd: Documenter: No such file or directory

$ cd Documentertest/

$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.1.0 (2019-01-21)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.1) pkg> activate .

(Documentertest) pkg> add Documenter#fe/filepath-windows-tex
  Updating registry at `C:\Users\cstamas\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaDocs/Documenter.jl.git`
 Resolving package versions...
  Updating `C:\Users\cstamas\Documents\GIT\Documentertest\Project.toml`
  [e30172f5] ~ Documenter v0.22.2 ⇒ v0.22.2 #fe/filepath-windows-tex (https://github.com/JuliaDocs/Documenter.jl.git)
  Updating `C:\Users\cstamas\Documents\GIT\Documentertest\Manifest.toml`
  [e30172f5] ~ Documenter v0.22.2 ⇒ v0.22.2 #fe/filepath-windows-tex (https://github.com/JuliaDocs/Documenter.jl.git)

(Documentertest) pkg> st
    Status `C:\Users\cstamas\Documents\GIT\Documentertest\Project.toml`
  [e30172f5] ~ Documenter v0.22.2 ⇒ v0.22.2 #fe/filepath-windows-tex (https://github.com/JuliaDocs/Documenter.jl.git)
  [cd674d7a] DocumenterLaTeX v0.2.0
    Status `C:\Users\cstamas\Documents\GIT\Documentertest\Manifest.toml`
  [e30172f5] ~ Documenter v0.22.2 ⇒ v0.22.2 #fe/filepath-windows-tex (https://github.com/JuliaDocs/Documenter.jl.git)

julia> include("docs\\makepdf.jl")
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: LaTeXWriter: rendering PDF.
[ Info: LaTeXWriter: using docker to compile tex.
┌ Error: LaTeXWriter: failed to compile tex with docker. Logs and partial output can be found in C:\Users\cstamas\AppData\Local\Temp\jl_37D8.tmp.
│ exception =
│ failed process: Process(`docker exec -u zeptodoctor latex-container bash -c 'mkdir /home/zeptodoctor/build
│ cd /home/zeptodoctor/build
│ cp -r /mnt/. .
│ latexmk -f -interaction=nonstopmode -view=none -lualatex -shell-escape Issuetest.tex
│ '`, ProcessExited(12)) [12]
└ @ Documenter.Writers.LaTeXWriter C:\Users\cstamas\.julia\packages\Documenter\o7pky\src\Writers\LaTeXWriter.jl:166

julia>

```

One line from the `.tex` file:

```nohighlight
\includegraphics{infos\old\Lena.png}

```

Edit: should I comment on the issue from now, or we stay here?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 12, 2019, 9:08am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/13 "2019-04-12T09:08:54Z")

</div>

Hmm okay. Lets take the discussion to [https://github.com/JuliaDocs/Documenter.jl/pull/999](https://github.com/JuliaDocs/Documenter.jl/pull/999).

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 12, 2019, 11:05am UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/14 "2019-04-12T11:05:53Z")

</div>

Again thank you for the quick fix!

But I still have an error message. After updating to the fixed release I get:

```julia
C:\Users\cstamas\Documents\GIT\Documentertest>julia --project --color=yes docs\makepdf.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: LaTeXWriter: rendering PDF.
[ Info: LaTeXWriter: using docker to compile tex.
┌ Error: LaTeXWriter: failed to compile tex with docker. Logs and partial output can be found in C:\Users\cstamas\AppData\Local\Temp\jl_46CD.tmp.
│ exception = failed process: Process(`docker cp latex-container:/home/zeptodoctor/build/. .`, ProcessExited(1)) [1]
└ @ Documenter.Writers.LaTeXWriter C:\Users\cstamas\.julia\packages\Documenter\G5Sup\src\Writers\LaTeXWriter.jl:166

```

The log folder:

```julia
C:\Users\cstamas\AppData\Local\Temp\jl_46CD.tmp>dir
 Volume in drive C has no label.
 Volume Serial Number is 3841-5075

 Directory of C:\Users\cstamas\AppData\Local\Temp\jl_46CD.tmp

2019-04-12 12:58 <DIR> .
2019-04-12 12:58 <DIR> ..
2019-04-12 12:58 0 custom.sty
2019-04-12 12:58 1,449 documenter.sty
2019-04-12 12:58 <DIR> guides
2019-04-12 12:58 <DIR> infos
2019-04-12 12:58 2,593 Issuetest.aux
2019-04-12 12:58 21,393 Issuetest.fdb_latexmk
2019-04-12 12:58 20,416 Issuetest.fls
2019-04-12 12:58 69,411 Issuetest.log
2019-04-12 12:58 1,317 Issuetest.out
2019-04-12 12:58 2,994,661 Issuetest.pdf
2019-04-12 12:58 4,048 Issuetest.tex
2019-04-12 12:58 907 Issuetest.toc
2019-04-12 12:58 0 LaTeXWriter.stdout
2019-04-12 12:58 473,831 Lena.png
              12 File(s) 3,590,026 bytes
               4 Dir(s) 164,416,876,544 bytes free

```

`LaTeXWriter.stdout` is empty, and neither or the other files contain an error message or something.  
I’m not even sure, that there was any error, as the pdf looks good to me (but I don’t know how it should look).  
Any idea for this issue?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 12, 2019, 1:22pm UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/15 "2019-04-12T13:22:50Z")

</div>

Not sure, but based on the exception that is thrown it looks like the [compilation step](https://github.com/JuliaDocs/Documenter.jl/blob/50dbc785514ce3c3de3ca1ab6e7ee0d8994a1ca7/src/Writers/LaTeXWriter.jl#L161) worked fine, but the [“copying back to host” step](https://github.com/JuliaDocs/Documenter.jl/blob/50dbc785514ce3c3de3ca1ab6e7ee0d8994a1ca7/src/Writers/LaTeXWriter.jl#L162) failed. Not sure why that would happen though. I can try on a Windows machine later and see if I can reproduce.

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [April 14, 2019, 3:07pm UTC](https://discourse.julialang.org/t/issue-with-documenters-pdf-output-pictures-not-found/23023/16 "2019-04-14T15:07:33Z")

</div>

I tested on another windows PC and the result was the same (error at the copying back step).  
Then I thought that maybe using `--verbose` for `piperun()` would tell the issue, so what I did:

```julia
git clone https://github.com/cserteGT3/Documentertest
cd Documentertest
julia --project --color=yes docs/makepdf.jl --verbose

```

And it works, the `issuetest.pdf` is in the build directory and I didn’t get any error.  
The last few lines from the console:

```julia
/Lato-Bold.ttf></usr/share/fonts/truetype/lato/Lato-Regular.ttf>
Output written on Issuetest.pdf (26 pages, 2994660 bytes).
Transcript written on Issuetest.log.
Latexmk: Log file says output to 'Issuetest.pdf'
Latexmk: All targets (Issuetest.pdf) are up-to-date
latex-container

```
