1
vote
2answers
35 views

How would I take imported file and format it to account for spacing?

Basically what I'm trying to do is use something like \input{details.txt} which contains: ____Here are some random details with stuff everywhere. This is to see if latex will use this ...
3
votes
1answer
201 views

Relative paths for \input and building from different directories

The minimal example If I have a directory containing my main LaTeX source file and it uses \input to incorporate some data in another file, I can use a relative pathname. E.g., with these files: ...
4
votes
1answer
64 views

How to make LyX process TeX code without converting it into .lyx format?

When I do \input{file} in a .tex document I later import in LyX, LyX converts file.tex into file.lyx and changes \input{file} to \input{file.lyx}. But LyX doesn't do well with the TeX code it does not ...
4
votes
1answer
156 views

Using a non-centralized structure for tex files - similar to \graphicspath

I have a fairly large document, that I have picked apart into different sections etc, each in their own file. To include graphics that are not in one central directory I use \graphicspath which works ...
7
votes
1answer
136 views

does LaTeX support native multifile management?

This is not really a practical question, but more of an academic one: I use emacs to write my LaTeX files and in order to process multifile documents I include at the end of each file a local ...
8
votes
3answers
188 views

How to join two or more external .tex file using another .tex file and then compile?

Suppose I have two tex files file1.tex and file2.tex. I want to join them in another tex file. I have tried to do this with the following one : \documentclass{book} \begin{document} ...
3
votes
2answers
190 views

Include file with preamble to another tex file

I have two files: paper.tex with text, title, and full preamble with authors and so on. It compiles successfully. The second file (B) has also a full preamble with title, authors, little text. It ...
11
votes
3answers
201 views

Read authors from file

At our university, we students write a lot of summaries in LaTeX. We have the convention of adding a CONTRIBUTORS.txt file to the repository containing the document code, which lists all contributors ...
1
vote
0answers
46 views

Loop to include multiple files [duplicate]

Possible Duplicate: How to iterate through the name of files in a folder I would like to include all the *.tex files from a directory in a document. To avoid me having to add manually the ...
10
votes
6answers
283 views

How can I '\input' a file without getting the implicit newline?

Intro I'm working on a lightweight package that allows you to put any content (typically LaTeX code) in an environment, then use that content multiple times, each time scanned separately, so you can ...
4
votes
1answer
272 views

Include one TeX file into another

I have main.tex file with: \documentclass[]{report} \begin{document} \input{filename.tex} \end{document} Let say filename.tex have the following content: \begin{abstract} text \end{abstract} ...
5
votes
2answers
2k views

Is it possible to create a LaTeX preamble “header”?

Is it possible to create a header in LaTeX containing my usual preamble, functioning similar to a header in C? Specifically, can I write a text document (or something similar) with the preamble that I ...
3
votes
1answer
321 views

Including a .bib file with \input does not work

In the following simple document, the bibliography does not work : \documentclass{article} \usepackage[numbers]{natbib} \usepackage{inputenc} \inputencoding{utf8} \begin{filecontents}{\jobname.bib} ...
3
votes
2answers
861 views

Generating a single TeX file by merging different TeX files

I have a main TeX file which inputs many other TeX files i.e. for example \documentclass{article} \begin{document} \input{input1.tex} \input{input2.tex} \input{input3.tex} \end{document} Let's call ...
2
votes
2answers
437 views

Disable including of system files [duplicate]

Possible Duplicate: How can I safely compile other people's LaTeX documents? I've got a Linux server that is rendering LaTeX documents, I want to disable the access of LaTeX to system ...
13
votes
3answers
427 views

Need help creating a custom aux file read/write routine to suit my needs

I require two new commands, \createreference and \citereference, to work with. They should work as shown in the following examples: \createreference{john}{John Q. Citizen} should write the text “John ...
6
votes
1answer
647 views

\input only part of a file using catchfilebetweentags package

I would like to include only a part of a .tex file into a different .tex file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package. I tried the ...
5
votes
1answer
2k views

Including all files within a directory [duplicate]

Possible Duplicate: How to iterate through the name of files in a folder Using \input{filename}, I can input a file canned "filename.tex". I have a directory containing all of the files I ...
12
votes
2answers
804 views

How to avoid automatic .tex extension in filenames?

I am in an mildly unfortunate situation in which, because of the way I prepared the files automatically, I ended up with a file to be attached but also another file with the same name but ending in ...
14
votes
3answers
2k views

Create list of all external files used by master LaTeX document?

Is there an easy way to create a list of all external files (complete path) which are used by a LaTeX document (and its "sub-documents") by \input \include \includegraphics ? (may I have forgotten ...
4
votes
3answers
389 views

Can i automatically load chapters and sections based on the filesystem?

I was interested in knowing if i can load chapters and sections of my book based on the filesystem. For example: Chapter 1/ Section 1.tex Section 2.tex Section 3.tex Chapter 2/ Section 1.tex ...
10
votes
2answers
880 views

Space inserted after “\input” call

I've noticed a significant issue with the \input command, it seems. For some reason, I can't seem to prevent it from adding a space after it reads its input. Even if there is no newlines or spaces ...
12
votes
1answer
570 views

How do I create a macro which reads the content of a file when the macro is defined?

I am trying to do something like: \newcommand{\sometext}{\input{somefile.txt}} This works, but requires inputting the file every time the macro is used in the document. I would like to know a way ...
9
votes
3answers
272 views

Make newlines expand to custom command

I am making a guest list which I will print on a sticker sheet, cut them out, then stick them to envelopes. This means that each guest/guest group will have a bounding box drawn around it as a cutting ...
8
votes
1answer
3k views

How to make \lstinputlisting applicable to file paths with spaces?

I am using the listings package and the path to the source code contains some spaces. For example, the path can be /some dir/sub dir/file 1.txt and \lstinputlisting{/some dir/sub dir/file 1.txt} does ...