Giter VIP home page Giter VIP logo

Comments (5)

Blaisorblade avatar Blaisorblade commented on May 13, 2024

FWIW, just keeping chapters in separate files doesn't require subfile.

Apparently, that package lets you compile chapters independently* — which is pretty cool (normally one has to resort to \include and \includeonly, which works but is pretty annoying). So if you don't use that feature, maybe dropping subfile is an (inconvenient) solution. (I suspect conditional compilation with the comment package might help disabling subfile when annoying, but this can be tricky—and pandoc wouldn't get it either).

From subfile docs (which I find on TeXLive through texdoc subfiles, recommended or on CTAN at http://ctan.mirror.garr.it/mirrors/CTAN/macros/latex/contrib/subfiles/subfiles.pdf):

With the subfiles set, the typesetting of a multi-file project consisting of one main file and one or more subsidiary files (subfiles) is more comfortable, since the user can LATEX either the main file, which will \input the subfiles normally, or the subfiles by themselves, which take the preamble of the main file and become self-sufficient LATEX documents.

from milewski-ctfp-pdf.

Blaisorblade avatar Blaisorblade commented on May 13, 2024

(BTW checking it out, didn't know about it and would have been useful!)

from milewski-ctfp-pdf.

hmemcpy avatar hmemcpy commented on May 13, 2024

I initially went with subfiles because I didn't want to put everything in one giant .tex file (to allow working on individual chapters separately). In addition, I had to add this:

\usepackage{subfiles}
\makeatletter
\let\org@subfile\subfile
\renewcommand*{\subfile}[1]{%
\filename@parse{#1}% LaTeX's file name parser
\expandafter
\graphicspath\expandafter{\expandafter{\filename@area}}%
\org@subfile{"#1"}%
}
\makeatother

so that the images could be embedded using relative path.

from milewski-ctfp-pdf.

Blaisorblade avatar Blaisorblade commented on May 13, 2024

I initially went with subfiles because I didn't want to put everything in one giant .tex file (to allow working on individual chapters separately).

To rephrase: if you want just that, the main file just needs to use \input{chapter1}, without subfile, and \input just inlines the content of chapter1.tex.
EDIT: so for that goal subfile is indeed unnecessary.

from milewski-ctfp-pdf.

hmemcpy avatar hmemcpy commented on May 13, 2024

Closing this for now. The way I have it set up lets me include relative images, and I don't want to spend anymore time on this.

from milewski-ctfp-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.