sjtug / sjtulib-latex-talk

上海交通大学图书馆专题培训讲座 《如何使用 LaTeX 排版论文/幻灯片》
Creative Commons Attribution Share Alike 4.0 International
62 stars 9 forks source link

missing figures #1

Closed hongy19 closed 2 years ago

hongy19 commented 2 years ago

hi, when I compile it, I get following mistake ./insertimage.tex:7: LaTeX Error: File `sjtug' not found.

in support/example/insertimage.tex \documentclass{ctexart} \usepackage{graphicx} \graphicspath{{figs/}{pics/}} \begin{document} \begin{figure}[ht] \centering \includegraphics[width=0.4\textwidth]{sjtug} \caption{SJTUG 徽标} \end{figure} \end{document}

but there is no figs and pics foldrs (base) [hongy19@CN-00000988 examples]$ ls biblatex.tex cnminimal.tex doubleimages.tex fontsize.tex insertimage.tex ordered.tex subfigures.tex unordered.tex bibtex.tex description.tex enminimal.tex fontstyle.tex latex.out ref.bib table.tex

hongy19 commented 2 years ago

there are more issues after I trying to

`[2.2] [3.3]) (./support/contents/learnlatex.tex [4.4] [5.5] [6.6] [7.7] [8.8] [9.9] [10.10] [11.11] Underfull \vbox (badness 10000) detected at line 218

Overfull \hbox (27.2084pt too wide) in paragraph at lines 218--218 \TU/lmtt/m/n/9 https://mirrors.sjtug.sjtu.edu.cn/CTAN/systems/texlive/tlnet [12.12] [13.13] [14.14] (./latex-talk.vrb (./latex-talk.listing)) [15.15] (./latex-talk.vrb (./latex-talk.listing)) [16.16] (./latex-talk.vrb

! LaTeX Error: File `enminimal' not found.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.21 }

(./latex-talk.listing)) [17.17] (./latex-talk.vrb Overfull \hbox (3.62303pt too wide) in paragraph at lines 18--18 [] (./latex-talk.listing)) [18.18] (./latex-talk.vrb (./latex-talk.listing)) [19.19] (./latex-talk.vrb

! LaTeX Error: File `cnminimal' not found.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help.`

LogCreative commented 2 years ago

try to use

l3build doc

first to compile the dependencies, you could refer to README.md.

LogCreative commented 2 years ago

If you encounter any problem in this command, then you could use precompiled source from overleaf: https://www.overleaf.com/read/fvwxzvcxhcwd

This repo is still under active development for the next part.

LogCreative commented 2 years ago

I realized that the picture is ignored, I will patch it ASAP.

LogCreative commented 2 years ago

there are more issues after I trying to

  • copy some sjtug.pdf to support/example
  • copy sjtugtext.pdf to support/example and rename to sjtugt.pdf

It is patched in ccc501faad1da74c907522768e0af139638046f1

hongy19 commented 2 years ago

there are more issues after I trying to

  • copy some sjtug.pdf to support/example
  • copy sjtugtext.pdf to support/example and rename to sjtugt.pdf

It is patched in ccc501f

thanks. sjtug.pdf issue has been fixed! but I still meet many errors (see one example below) after using "l3build doc". I think it still missing some files?

in support/contents/learnlatex.tex \only<3>{ \includepdflarge{enminimal} }

[2.2] [3.3]) (./support/contents/learnlatex.tex [4.4] [5.5] [6.6] [7.7] [8.8] [9.9] [10.10] [11.11] Underfull \vbox (badness 10000) detected at line 218

Overfull \hbox (27.2084pt too wide) in paragraph at lines 218--218 \TU/lmtt/m/n/9 https://mirrors.sjtug.sjtu.edu.cn/CTAN/systems/texlive/tlnet [12.12] [13.13] [14.14] (./latex-talk.vrb (./latex-talk.listing)) [15.15] (./latex-talk.vrb (./latex-talk.listing)) [16.16] (./latex-talk.vrb

! LaTeX Error: File `enminimal' not found.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.21 }

LogCreative commented 2 years ago

It should be compiled by using l3build doc, may be error occurred when using this.

hongy19 commented 2 years ago

It should be compiled by using l3build doc, may be error occurred when using this.

yes. I build it with l3build doc, but still meet these errors

LogCreative commented 2 years ago

https://github.com/sjtug/sjtulib-latex-talk/blob/ccc501faad1da74c907522768e0af139638046f1/latex-talk.tex#L10

This line indicates that it will use the graphics relative to these paths.

https://github.com/sjtug/sjtulib-latex-talk/blob/ccc501faad1da74c907522768e0af139638046f1/build.lua#L139-L149

I have set to compile the files in the support/examples/ folder by this, may be some previous procedures failed which ends up no more compilation. It is highly likely that l3build doc stopped at the previous dev-v2 stage. You need to check if there are pdfs in support/examples after l3build doc.

hongy19 commented 2 years ago

it seems no pdf in support/example

(base) [hongy19@CN-00000988 sjtulib-latex-talk]$ pwd
/home/hongy19/dev/latex/sjtulib-latex-talk
(base) [hongy19@CN-00000988 sjtulib-latex-talk]$ ls support/examples/
biblatex.tex  cnminimal.tex    doubleimages.tex  fontsize.tex   insertimage.tex  ordered.tex  ref.bib         table.tex
bibtex.tex    description.tex  enminimal.tex     fontstyle.tex  latex.out        pics         subfigures.tex  unordered.tex
(base) [hongy19@CN-00000988 sjtulib-latex-talk]$ ls
hongy19 commented 2 years ago

i did more test: i try to comment some block in build.lua (all line after following code is commented)

local suppbeamerdir = supportdir .. "/beamer"
    cp("*", suppbeamerdir, beamerdepdir)
    for _, file in ipairs({"hello.tex"}) do

then i get following output and I guess dev-v2 stage is OK?

* To finish the installation you have to move the following *
* files into a directory searched by TeX:                   *
*                                                           *
* The recommended directory is TDS:tex/latex/sjtuthesis     *
*                                                           *
*     sjtuthesis.cls                                        *
*                                                           *
* To produce the documentation, run the file sjtuthesis.dtx *
* through XeLaTeX.                                          *
*                                                           *
* Happy TeXing!                                             *
*                                                           *
*************************************************************
Overall statistics:
Files  processed: 2
Lines  processed: 4492
Comments removed: 1164
Comments  passed: 0
Codelines passed: 2894
 )
No pages of output.
Transcript written on sjtuthesis.log.
Rc files read:
  /home/hongy19/.latexmkrc
  .latexmkrc
Latexmk: This is Latexmk, John Collins, 17 Mar. 2022. Version 4.77, version: 4.77.
Latexmk: Changing directory to './'
Latexmk: Nothing to do for 'dev-v2.tex'.
Latexmk: All targets (latex.out/dev-v2.xdv latex.out/dev-v2.pdf) are up-to-date
------------
Running 'start ~/bin/pdf.sh  "latex.out/dev-v2.pdf"'
------------
Latexmk: Undoing directory change
LogCreative commented 2 years ago

Could you provide more information about your Operating System and l3build version by

l3build --version
hongy19 commented 2 years ago
l3build --version
(base) [hongy19@CN-00000988 latex]$ l3build --version

l3build: A testing and building system for LaTeX

Release 2022-03-15
Copyright (C) 2014-2021 The LaTeX Project
LogCreative commented 2 years ago

That's weird, just save the compiling history by

l3build doc > l3build.log

and upload the l3build.log to your comment (restore the code in your build.lua). May be this will help.

hongy19 commented 2 years ago
l3build doc > l3build.log

see the l3build log l3build.log

LogCreative commented 2 years ago

It seems that you are running on Arch Linux (with your personal .latexmkrc configuration) and the compiled document is in latex.out folder instead of the same folder with the source file, and my script cannot identify your output file since it assumes that the generated file should be in the same location with the .tex file.

Could you compile a simple <file>.tex and compile it with

latexmk <file>.tex -xelatex -interaction=nonstopmode -shell-escape -outdir=.

and see if the generated PDF is in the same folder with .tex

LogCreative commented 2 years ago

Or you could just add the -outdir=. parameter at the end of this string to see if this works for you.

https://github.com/sjtug/sjtulib-latex-talk/blob/ccc501faad1da74c907522768e0af139638046f1/build.lua#L29

hongy19 commented 2 years ago
latexmk <file>.tex -xelatex -interaction=nonstopmode -shell-escape -outdir=.

yes. pdf and tex are in same folder

(base) [hongy19@CN-00000988 1test]$ ls
1.aux  1.fdb_latexmk  1.fls  1.log  1.pdf  1.synctex.gz  1.tex  1.xdv
(base) [hongy19@CN-00000988 1test]$ latexmk 1.tex -xelatex -interaction=nonstopmode -shell-escape -outdir=.

i try to update latexmk configuration to let out_dir=. but still some error

Overfull \hbox (6.79999pt too wide) in paragraph at lines 1026--1026
[][]
[58.58]) (./support/contents/sjtuthesis.tex [59.59]
Overfull \hbox (26.00787pt too wide) in paragraph at lines 43--43
[][]\TU/lmss/m/n/10.95 sjtug[]/[]SJTUThesis[]
[60.60]
! Undefined control sequence.
\insertblocktitle ->\faAdobe
                             {} InDesign
l.116 \end{frame}

[61.61]
! Undefined control sequence.
\insertblocktitle ->\faAdobe
                             {} InDesign
l.116 \end{frame}

[62.62] [63.63] [64.64] [65.65] (./latex-talk.42.vrb
Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]
) [66.66] (./latex-talk.42.vrb
Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]
) [67.67]

LaTeX Warning: Reference `covers' on page 68 undefined on input line 281.

LaTeX Warning: Reference `compile' on page 68 undefined on input line 281.

Overfull \vbox (4.55467pt too high) detected at line 281
[68.68]
Overfull \vbox (4.55467pt too high) detected at line 281
[69.69] (./latex-talk.vrb

LaTeX Warning: Reference `setup' on page 70 undefined on input line 7.

LaTeX Warning: Reference `covers' on page 70 undefined on input line 8.

(./latex-talk.listing)) [70.70] (./latex-talk.vrb (./latex-talk.listing))
Overfull \vbox (10.21797pt too high) detected at line 332
[71.71] [72.72] (./latex-talk.vrb (./latex-talk.listing)) [73.73] [74.74]
(./latex-talk.vrb (./latex-talk.listing)) [75.75] [76.76]
Overfull \hbox (7.83128pt too wide) in paragraph at lines 474--474
[][]
[77.77]) (./support/contents/intermission.tex [78.78] [79.79] [80.80] [81.81]
[82.82]) [83.83] (/usr/share/texmf-dist/tex/generic/stringenc/se-pdfdoc.def)
(/usr/share/texmf-dist/tex/generic/stringenc/se-utf32be.def) (./latex-talk.aux
(./support/contents/preface.aux
<Reading QR code for "https://www.overleaf.com/read/fvwxzvcxhcwd" at level 3-M
from aux file.>
) (./support/contents/learnlatex.aux) (./support/contents/sjtuthesis.aux)
(./support/contents/intermission.aux))

LaTeX Warning: There were undefined references.

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

Package rerunfilecheck Warning: File `latex-talk.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )
(see the transcript file for additional information)
Output written on latex-talk.pdf (83 pages).
Transcript written on latex-talk.log.
 ! Compilation failed
LogCreative commented 2 years ago

When I uploaded to Overleaf, the same problem occurred, it seems that some TeX distributions omitted the Adobe logo due to copyright issues, uncomment the line after the new patch https://github.com/sjtug/sjtulib-latex-talk/commit/29d5303b12f5175f4cef8f061cde23e0f11d286c

https://github.com/sjtug/sjtulib-latex-talk/blob/29d5303b12f5175f4cef8f061cde23e0f11d286c/latex-talk.tex#L59

hongy19 commented 2 years ago

When I uploaded to Overleaf, the same problem occurred, it seems that some TeX distributions omitted the Adobe logo due to copyright issues, uncomment the line after the new patch 29d5303

https://github.com/sjtug/sjtulib-latex-talk/blob/29d5303b12f5175f4cef8f061cde23e0f11d286c/latex-talk.tex#L59

i git clone latest version, but seem still some error?

Overfull \hbox (6.79999pt too wide) in paragraph at lines 1026--1026
[][]
[58.58]) (./support/contents/sjtuthesis.tex [59.59]
Overfull \hbox (26.00787pt too wide) in paragraph at lines 43--43
[][]\TU/lmss/m/n/10.95 sjtug[]/[]SJTUThesis[]
[60.60]
! Undefined control sequence.
\insertblocktitle ->\faAdobe
                             {} InDesign
l.116 \end{frame}

[61.61]
! Undefined control sequence.
\insertblocktitle ->\faAdobe
                             {} InDesign
l.116 \end{frame}

[62.62] [63.63] [64.64] [65.65] (./latex-talk.42.vrb
Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]
) [66.66] (./latex-talk.42.vrb
Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]

Overfull \hbox (6.79999pt too wide) in paragraph at lines 22--22
[][]
) [67.67]

LaTeX Warning: Reference `covers' on page 68 undefined on input line 281.

LaTeX Warning: Reference `compile' on page 68 undefined on input line 281.

Overfull \vbox (4.55467pt too high) detected at line 281
[68.68]
Overfull \vbox (4.55467pt too high) detected at line 281
[69.69] (./latex-talk.vrb

LaTeX Warning: Reference `setup' on page 70 undefined on input line 7.

LaTeX Warning: Reference `covers' on page 70 undefined on input line 8.

(./latex-talk.listing)) [70.70] (./latex-talk.vrb (./latex-talk.listing))
Overfull \vbox (10.21797pt too high) detected at line 332
[71.71] [72.72] (./latex-talk.vrb (./latex-talk.listing)) [73.73] [74.74]
(./latex-talk.vrb (./latex-talk.listing)) [75.75] [76.76]
Overfull \hbox (7.83128pt too wide) in paragraph at lines 474--474
[][]
[77.77]) (./support/contents/intermission.tex [78.78] [79.79] [80.80] [81.81]
[82.82]) [83.83] (/usr/share/texmf-dist/tex/generic/stringenc/se-pdfdoc.def)
(/usr/share/texmf-dist/tex/generic/stringenc/se-utf32be.def) (./latex-talk.aux
(./support/contents/preface.aux
<Reading QR code for "https://www.overleaf.com/read/fvwxzvcxhcwd" at level 3-M
from aux file.>
) (./support/contents/learnlatex.aux) (./support/contents/sjtuthesis.aux)
(./support/contents/intermission.aux))

LaTeX Warning: There were undefined references.

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

Package rerunfilecheck Warning: File `latex-talk.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )
(see the transcript file for additional information)
Output written on latex-talk.pdf (83 pages).
Transcript written on latex-talk.log.
 ! Compilation failed
LogCreative commented 2 years ago

I didn't uncomment that in the version, manually uncomment that will work for you.

LogCreative commented 2 years ago

I will patch that in the next version and call it a fix, shall we?

LogCreative commented 2 years ago

Thanks for your feedback, I believe the new version will work.

hongy19 commented 2 years ago

Thanks for your feedback, I believe the new version will work.

thanks. I works now!