6

I have a directory of .tex files that I want to build using latexmk by running latexmk in that directory. However, there is one .tex file that is included by all other files, which is not a valid document in itself, and should therefore not be compiled.

Removing the .tex extension from the specific file is not an option, because LuaLaTeX will not find it otherwise.

3
  • From the latexmk documentation, you can use the @default_files variable in a .latexmkrc to set the list of files that will be built when no file is specified. Alternatively, on a Unix-like system, you could use a for loop and run latexmk on a specified set of files: for n in [a-m]*.tex [o-z]*.tex; do latexmk $n; done (which would exclude any tex file starting with n). Feb 20, 2015 at 15:50
  • 2
    Two other possibilities: 1. Change the extension of the file from .tex to something else, e.g., .inc. Then LuaLaTeX will find it. 2. Use the (not-yet-documented) configuration array variable @default_excluded_files, as in @default_excluded_files = ('common.tex'); in a .latexmkrc file. Feb 20, 2015 at 17:28
  • Using a different extension is a fine workaround, thanks!
    – Ruud
    Feb 21, 2015 at 23:06

1 Answer 1

1

Two other possibilities:

  1. Change the extension of the file from .tex to something else, e.g., .inc. Then LuaLaTeX will find it.

  2. Use the (not-yet-documented) configuration array variable @default_excluded_files in a .latexmkrc file, as in:

@default_excluded_files = ('common.tex');  

- John Collins | 2015 Feb

1
  • how does it "not provide an answer to the question"? it directly addresses the question - "not compile a .tex file via latexmk" as also acknowledged by the questioner in the comment replies: "Using a different extension is a fine workaround, thanks!". and where did it "require clarification from asker" ? Nov 4, 2023 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .