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

Build issues: File `latex-preamble-styles.tex' not found #125

Closed
JL102 opened this issue Sep 29, 2022 · 6 comments
Closed

Build issues: File `latex-preamble-styles.tex' not found #125

JL102 opened this issue Sep 29, 2022 · 6 comments

Comments

@JL102
Copy link

JL102 commented Sep 29, 2022

Hello,

I'm trying to run the build steps so I can fix some typos I've found and submit a PR with the fixes. Unfortunately, I'm getting the following errors:

! LaTeX Error: File `latex-preamble-styles.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

If I press enter without typing anything, I get the same message once more. I pressed enter without typing anything again, and then:

Package hyperref Warning: Rerun to get /PageLabels entry.


Package pgfplots Warning: running in backwards compatibility mode (unsuitable t
ick labels; missing features). Consider writing \pgfplotsset{compat=1.18} into 
your preamble.
 on input line 2195.


! Package pdfpages Error: Cannot find file `images/front.pdf'.

See the pdfpages package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.2201 ...pdf[noautoscale=false]{images/front.pdf}
                                                  %
No pages of output.
Transcript written on dmoi.log.
critical: [Errno 2] No such file or directory: 'dmoi.pdf'
##################
Failed to build pdf.  Exiting...

----------------------------------------------------
While running pretext, the following errors occured:

critical: [Errno 2] No such file or directory: 'dmoi.pdf'
----------------------------------------------------
Exception ignored in atexit callback: <function exit_command at 0x7f37f3b00b80>
Traceback (most recent call last):
  File "/home/drak/.local/lib/python3.10/site-packages/pretext/utils.py", line 377, in exit_command
    sys.exit(1)
SystemExit: 1

It's also worth noting that when I try to run the command pretext build pdf -w as per the build instructions, I get the following error:

PreTeXt project found in `/home/drak/OneDrive/Projects/Programming/syncignore_discrete-book`.
Usage: pretext build [OPTIONS] [TARGET]
Try 'pretext build -h' for help.

Error: No such option: -w

so I'm just executing pretext build pdf to attempt the build.

I am using:

  • Debian 12 (bookworm),
  • pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
  • Python 3.10.7
  • PreTeXt 1.0.3

How do I fix these issues?

@oscarlevin
Copy link
Owner

Thanks for alerting me to this. There were a few changes I had to make to work with the updated version of PreTeXt, thanks to my previous hacking to customize things. I think I have it set up to work now. Please try to pull the latest commit and rebuild. Let me know how it goes.

@JL102
Copy link
Author

JL102 commented Sep 30, 2022

@oscarlevin The latex-preamble-styles.tex problem seems to be gone! But unfortunately the dmoi.pdf error is still there. This is the last bit of the build output:


! Package pdfpages Error: Cannot find file `external/images/front.pdf'.

See the pdfpages package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.2201 ...oscale=false]{external/images/front.pdf}
                                                  %
No pages of output.
Transcript written on dmoi.log.
critical: [Errno 2] No such file or directory: 'dmoi.pdf'
##################
Failed to build pdf.  Exiting...

----------------------------------------------------
While running pretext, the following errors occured:

critical: [Errno 2] No such file or directory: 'dmoi.pdf'
----------------------------------------------------
Exception ignored in atexit callback: <function exit_command at 0x7fd2d2ffcb80>
Traceback (most recent call last):
  File "/home/drak/.local/lib/python3.10/site-packages/pretext/utils.py", line 377, in exit_command
    sys.exit(1)
SystemExit: 1

Here's .error_schema.log:

/home/drak/OneDrive/Projects/Programming/syncignore_discrete-book/source/dmoi.ptx:4:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element include there
/home/drak/OneDrive/Projects/Programming/syncignore_discrete-book/source/dmoi.ptx:4:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element pretext has extra content: include

@JL102
Copy link
Author

JL102 commented Sep 30, 2022

If I comment out line 4 of dmoi.pdf (<!-- <xi:include href="./bookinfo.ptx"/> -->), it seems to build... but only the first 18 pages?

image

@oscarlevin
Copy link
Owner

Aha. Yes, I was .gitignor-ing pdfs, and forgot to include those manually. I've updated it so now everything in the external directory (starting out in the assets directory) should be available to latex when you build. 🤞

@JL102
Copy link
Author

JL102 commented Sep 30, 2022

Eyyyy, it worked! The whole pdf built, thanks!

@JL102 JL102 closed this as completed Sep 30, 2022
@oscarlevin
Copy link
Owner

Wonderful. Thanks for reporting this and making the project better.

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

2 participants