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

Including chapters doesn't seem to work #1236

Open
eduardz1 opened this issue Nov 20, 2024 · 0 comments
Open

Including chapters doesn't seem to work #1236

eduardz1 opened this issue Nov 20, 2024 · 0 comments

Comments

@eduardz1
Copy link

eduardz1 commented Nov 20, 2024

In LaTeX, it's common to subdivide your work in chapters in a "chapters" folder, however using the standard "\include" syntax doesn't seem to work, it's like it's including an empty chapter. My project is structured in this way:

.
├── latex
│   ├── guide
│   │   ├── chapters
│   │   │   └── a.tex
│   │   └── guide.tex
│   └── lib
│        ├── _postamble.tex
│        └── _preamble.tex
└── Tectonic.toml

It looks a bit complicated but it makes sense in the entire repository context. In the Tectonic.toml file I wrote:

[doc]
name = "eta-kappa-notes"
bundle = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar"
extra_paths = ["latex"]

[[output]]
name = "guide"
type = "pdf"
shell_escape = true
inputs = ["lib/_preamble.tex", "guide/guide.tex", "lib/_postamble.tex"]

A minimal reproducible example would be guide.tex containing:

\title{Guide}

\maketitle
\tableofcontents

\include{chapters/a}

a.tex containing

\chapter{A}

a

_preamble.tex with

\documentclass[a4paper,12pt]{book}
\begin{document}

and _postamble.tex with

\end{document}

The resulting PDF does not contain the "A" chapter

screenshot-2024-11-20-13-10-57

I am using the latest version, compiled with cargo with

cargo install --git https://github.com/tectonic-typesetting/tectonic tectonic

Edit

Even after a warning

note: "version 2" Tectonic command-line interface activated
Running TeX ...
warning: accessing absolute path `/home/eduard/Git/eta-kappa-notes/latex/guide/chapters/a.tex`; build may not be reproducible in other environments
warning: open of input /home/eduard/Git/eta-kappa-notes/latex/guide/chapters/a failed
caused by: access to the path `/home/eduard/Git/eta-kappa-notes/latex/guide/chapters/a` is forbidden
Rerunning TeX because "guide.toc" changed ...
warning: open of input /home/eduard/Git/eta-kappa-notes/latex/guide/chapters/a failed
caused by: access to the path `/home/eduard/Git/eta-kappa-notes/latex/guide/chapters/a` is forbidden
Running xdvipdfmx ...
Writing `/home/eduard/Git/eta-kappa-notes/build/guide/guide.pdf` (10.599609375 KiB)
Writing `/home/eduard/Git/eta-kappa-notes/build/guide/guide.log` (2.7001953125 KiB)
Skipped writing 3 intermediate files (use --keep-intermediates to keep them)

It read the file and wrote its content seemingly correctly, obviously using absolute paths is not the solution though

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

1 participant