Generalimport only option?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
theo moore
Posts: 72
Joined: Thu Jan 15, 2009 3:16 pm

import only option?

Post by theo moore »

If you use \include, you can use the \includeonly{files} command to only generate a document with certain files. This is handy if you have a large document and don't want to comment out the \include commands (and suffer a large number of unlinked references)

However, I use \import. For example

Code: Select all

\import{./chap1/}{chapter1}
\import{./chap2/}{chapter2}
\import{./chap3/}{chapter3}
\import{./chap4/}{chapter4}
Is there a similar option? My document is large, and it takes a while to go from dvi to pdf format.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

import only option?

Post by localghost »

You have to give a brief description of this command and tell us where it comes from because it is not from standard LaTeX. In case it is from a non-standard document class not available on CTAN, attach the class file to your next post or give a link where to get it.


Best regards
Thorsten
theo moore
Posts: 72
Joined: Thu Jan 15, 2009 3:16 pm

import only option?

Post by theo moore »

localghost wrote:You have to give a brief description of this command and tell us where it comes from because it is not from standard LaTeX. In case it is from a non-standard document class not available on CTAN, attach the class file to your next post or give a link where to get it.


Best regards
Thorsten
Ack. I hadn't realised that I was using the import package.

The details are here and here.

In any case, I did find the answer. Basically, instead of using

Code: Select all

\input{filepath}{filename}
You can use

Code: Select all

\includefrom{filepath}{filename}
at which point the extra,

Code: Select all

\includeonly{file1, file2, ...}
inserted into the preface of your document works!
Post Reply