My question is simple, are there some predefined directories (in the texmf file system) where I can save my .tex files for further inclusions ?
If yes :
- which ones are they ?
- Can I defined mine manually editing a configuration file ?
If not :
- Is there some way to include a .tex file (placed anywhere on the disk) in a .tex file I write (anywhere on the disk too) ?
For instance :
I'm writing a document located at /media/XXX/documents/latex/foo/bar.tex
And I need to include a file let's say located at ~/texmf/includes/style1.tex
ps : and between include or input, which one seems more appropriate in my case ?
~/texmfshould mimic the structure of your installed 'tex tree'. That means your personal LaTeX.styfiles (and the like) should be located in~/texmf/tex/latex/(with further personal subdivisions if you like/need)..bibfiles could be put in~/texmf/bibtex/bib/. And so on. I made the following, e.g.:mkdir -p ~/texmf/{bibtex,doc,fonts,tex,texdoc}(some of these have sub-directories as well). – jon Feb 21 '13 at 19:36.styextension (= style) and put it where I said the first time around. If it is a regular.texfile containing text that will be printed as part of the main file, I would keep it in the same directory as your 'masterfile'. And you should 'include' a.styfile in the preamble of your document; e.g.,\usepackage{style1}. – jon Feb 21 '13 at 21:33.texfile contains. If it contains things like configuration parameters and\newcommands(etc.), then you can put it where I said and load it with\usepackage. If, however, it is something like a chapter or section of text that you want to include in the body of a 'masterfile', then there are different reasons why you might want to use\includeor\input. – jon Feb 21 '13 at 23:30~/texmf/tex/latex/personalis the preferred directory (the innermost one can have any name you like). – egreg Feb 21 '13 at 23:47