Now I am using subfile to compile document independent, I want to insert a picture in the sub document like this:
\documentclass[../../../dolphin-book-2020.tex]{subfiles}
\begin{document}
\subsection{GitHub Slow}
balabalabala.......
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.2]{githubspeedup}
\caption{GitHub Speed Up}
\label{fig:githubspeedup}
\end{figure}
\end{document}
when I compile using this command in macOS Catalina 10.15 :
/Library/TeX/texbin/latexmk -pdfxe -pvc -xelatex -interaction=nonstopmode ./github-slow.tex
show this error:
(/usr/local/texlive/2020/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/listings/lstlang1.sty)
Package fontspec Warning: Font "FandolFang-Regular" does not contain requested
(fontspec) Script "CJK".
! LaTeX Error: File `githubspeedup' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.31 ^^I\includegraphics[scale=0.2]{githubspeedup}
[1] (./github-slow.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
)
(see the transcript file for additional information)
Output written on github-slow.xdv (1 page, 28900 bytes).
Transcript written on github-slow.log.
=== TeX engine is 'XeTeX'
Latexmk: Index file 'github-slow.idx' was written
Latexmk: Missing input file: 'githubspeedup' from line
'! LaTeX Error: File `githubspeedup' not found.'
Latexmk: References changed.
Latexmk: Log file says output to 'github-slow.xdv'
Latexmk: Errors, so I did not complete making targets
Latexmk: Failure to make the files correctly
==> You will need to change a source file before I do another run <==
Collected error summary (may duplicate other messages):
xelatex: Command for 'xelatex' gave return code 1
Refer to 'github-slow.log' for details
=== Watching for updated files. Use ctrl/C to stop ...
^CLatexmk: User typed ctrl/C or ctrl/break. I'll finish.
Collected error summary (may duplicate other messages):
xelatex: Command for 'xelatex' gave return code 1
Refer to 'github-slow.log' for details
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
what should I do to make it work? I have already added picture path in the main file dolphin-book-2020.tex
like this(all the picture store in the folder and no picture store in sub folder):
\graphicspath{{./Pictures/}}
and this is the file structure:
I have tried define picture path in dolphin-book-2020.tex
like this:
\graphicspath{{../../../Pictures/}{../../Pictures/}{../Pictures/}{./Pictures/}}
this is the folder nested structure:
I also tried to write all possible path of picture:
\graphicspath{
{Pictures/}
{../../../Pictures/}
{../../Pictures/}
{image/}
{/Users/dolphin/Documents/GitHub/dolphin-book-2020/Pictures}
}
still could not found file.