0

When I write a book - I have a master tex file, say book.tex which contains the title, etc., the macros, inputs individual chapter files. When I work on a chapter, say chapter1.tex and see what I did, I have to typeset book.tex. This is inconvenient - Ctrl-t does not do what I want (tries to typeset chapter1.tex), I have to click on another window, etc. Is there is a way around this?

PCTEXv6 can do it but that software is not supported anymore. The files are organized in a project and PCTEX typesets book.tex even if the active window is chapter.tex.

  • 3
    This is the purpose of \includeonly. Just include each chapter with \include and \includeonly the chapter you are working on. See e.g. tex.stackexchange.com/q/87010 – Schrödinger's cat Sep 20 '19 at 5:03
  • I know about \includeonly. The question is about MIKTEX - Ctrl-T tries to typeset the current chapter which is not even a full latex file, it starts with \chapter{…}. I need to change the window first to book.tex, typeset it, then go back to the chapter1.tex window, etc. – ABC Sep 20 '19 at 5:14
  • 2
    you are asking about keybindings like control-t in some editor but you have not said what editor you are using! the underlying tex system (miktex in your case) is not relevant here, you are just asking for an editor macro to typeset the required document, so you need to say what editor that is. – David Carlisle Sep 20 '19 at 6:54
  • It is TexWorks, which comes standard with MiKTex. – ABC Sep 20 '19 at 8:59
  • That depends on your used editor/Ide for writing TeX code. Please see the following question tex.stackexchange.com/questions/339/latex-editors-ides ... – Mensch Sep 20 '19 at 11:08
0

I think I found the answer. Instead of compiling the whole book while working on a chapter, one can do even better - compile the chapter itself. This thread was of help:

Bind reports/articles into a book, but keep the ability to compile them individually

There are several packages which could do this. The package subfiles works best for me. References to other chapters or citations do not work but this is not a problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.