{input} is about the \input command which makes LaTeX process the content of a given file basically the same way as if it would be written instead of \input.

learn more… | top users | synonyms

5
votes
4answers
1k views

How to make “\input” in a “\include”-d file use the correct current path?

I'm having a master file let's say test.tex and also some folders sub1/ and sub2/. There is also a TeX file in each of them: sub1/sub1.tex and sub2/sub2.tex. In the sub1/ and sub2/ are also some ...
7
votes
1answer
138 views

How can I prevent a new paragraph between two \input commands?

I want to use the command \input{} to insert two textfiles, text1.tex and text2.tex, into my latex working file. I want these two textfiles to produce one single paragraph when I am compiling my ...
17
votes
2answers
4k views

Inputting multiple files in LaTeX

Suppose I have a directory containing a bunch of LaTeX source files, and I want to input all of them into a single main file. I could do this by saying \input{dir/file1.tex} \input{dir/file2.tex} ...
6
votes
1answer
473 views

How to use “input” on Linux (Fedora 16)? [closed]

This seems like a trivial thing, but I can't figure out how to use input properly on Fedora. When I used Windows 7, I would put the following into my document ...
8
votes
2answers
2k views

Cannot use \toprule when doing \input inside tabular — why?

Using \input inside a tabular environment does not seem to work in all cases, but I don't see why. The MWE below gives the following error message: ! Misplaced \noalign. \toprule ->\noalign ...
2
votes
1answer
783 views

Including TikZ image (with external inputs) inside adjustbox adds horisontal spacing, why?

I'm working on my masters thesis and so I have a bunch of tikz files that I want to include in the thesis. This I do by using adjustbox to limit the size to \textwidth as such \adjustbox{max ...
27
votes
3answers
2k views

Replace \input{fileX} by the content of fileX automatically

Suppose I have a document with multiple include or input statements \input{fileA} \input{fileB} etc. Is there an easy way to generate a single .tex file where \input{fileA} is replaced by the ...
4
votes
1answer
304 views

Add offset to line number (in error message) when using input files

I am compiling a latex document, and when I have errors, I get nice messages like l.1041 \end{frame} which tells me that there is an error somewhere before line 1041. So far, so good. I can use my ...
4
votes
1answer
2k views

inputenc error with unicode chars and verbatim

I am writing a package where I need to save the contents of several environments in verbatim mode to an auxiliary file. Then the auxiliary file is processed by an external program. In the next ...
1
vote
0answers
118 views

Splitting a big document into several output PDF files [duplicate]

Possible Duplicate: Keep chapter number of chapters inserted with \include Can one TeX file output to multiple PDF files? My document structure has: 1 file with preface; 12 individual ...
26
votes
4answers
17k views

How to make the main file recognize relative paths used in the imported files?

I'm currently using doxygen to generate some documentation for a project, and doxygen generate some LaTeX code that then can be used to generate a nice pdf. But let's say I would like to write ...
2
votes
1answer
1k views

Using \newcommand and \input

I like to use variables for my paths, so that if I migrate to another system/username, I don't have to change every path name. This does not seem to be working with the input command. I have the ...
13
votes
1answer
455 views

Why is \input not expandable?

In latex.ltx I found \def\input{\@ifnextchar\bgroup\@iinput\@@input} where \@@inputis expandable. I would like to know if there is an expandable version of \input. The problem comes from an example ...
4
votes
1answer
1k views

Including a text file in LaTeX

I write a program by DevC++ compiler and save it by .cpp format, and want to paste the code in my editor, Do I have to paste all the code each time? Is there a way to include the file instead of ...
4
votes
1answer
443 views

remove unwanted contents from list of listings

The following code adds a wrong line to the list of listings \documentclass{scrbook} \usepackage{listings} \usepackage{filecontents} \begin{document} \begin{filecontents*}{democodefile} ...
7
votes
1answer
202 views

Can I amend the preamble from outside the preamble?

I am writing a document (mydoc.tex) that will include a section as a separate document (mysection.tex) using \input{mysection.tex}. If I want to include something in the preamble (specifically ...
9
votes
2answers
433 views

randomize the order of text lines in a .tex file

I need to create an environment (let's call it randomizer) that randomly changes the order of its lines, which may contain any text or latex commands (assume without verifying that they don't break ...
6
votes
1answer
569 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 ...
4
votes
4answers
3k views

how to use \input{file.tex} correctly?

Suppose I have two latex files file1 and file2 with the same preamble and so on. Then I want to create a file called bigfile which just puts the two files together. This is not working for some ...
4
votes
1answer
4k views

input files in different directories

I have following example directory structure. ArticlesWritten - ArticleA - - FileOnlyInArticleA.tex - - Introduction.tex - - main.tex - - MainAsChapter.tex - - ...
7
votes
1answer
333 views

How to \input the part between \begin{document} and \end{document} from another LaTeX file?

Sometimes I want to \input some LaTeX code, which belongs to a standalone LaTeX file. I would like to input the part between \begin{document} and \end{document}, while skipping the other part.
8
votes
4answers
218 views

Checking for a matching entry within a file

I have a file containing a list, like this: apple orange pear pineapple How can I create a macro which checks if an item is on that list. E.g.: \isfruit{pear} returns "1". \isfruit{carrot} ...
0
votes
1answer
340 views

Preprocess LaTeX file, a latex -E equivalent [duplicate]

Possible Duplicate: Replace \input{fileX} by the content of fileX automatically I'm developping a framework for managing LaTeX project's dependencies but I can't figure out if there is a ...
4
votes
1answer
377 views

Parse \input statements in AucTeX, TeX-insert-quote

AucTeX recognizes for example the statement \usepackage[german]{babel} in a .tex file. Then typing " twice will result in "` before a word resp. "' after a word. However if ...
4
votes
2answers
487 views

how do I use the \input command on windows, combined with \IfFileExists?

I'm trying to use a command in my LaTeX file that inputs a file if it exists, and if it doesn't exit, inputs another one. This is the command: ...
5
votes
1answer
472 views

Creating a common settings file

I have created a file which provides convenient options to change the settings for all of my documents. For e.g.: \def\BookFontRoman{Gentium Plus} \def\BookFontCJK{Adobe Song Std} \def\PageWidth{280} ...
4
votes
4answers
973 views

Import LaTeX File into a Template?

I have the following Task todo: I have made me a default structure for lecture notes and now I want to compile my notes into separate PDFs for learning. So my goal is to have for every course a ...
7
votes
3answers
947 views

How to make nonstopmode really not stop on a missing input file

I have a file test.tex with these contents: \input{missing} \input{present} When I run PDFLaTeX with --interaction=nonstopmode it stops after the first missing input file: $ pdflatex ...
4
votes
1answer
844 views

Split table into multiple files with \input

I want to split my table into multiple files: \input{table_head.tex} with following content \begin{table}[htpb] \centering \caption{Caption} \begin{tabular}[r]{ccc} \addlinespace \toprule A & B ...
1
vote
1answer
133 views

Is that a bug between `xymatrix`, the `input` command and .sty file?

I have a problem compiling the following document. First, I have a file macros.sty that consists of : \newcommand{\test}{ \xymatrix@R=0mm{x} } Then, I have an auxiliary file out.aux that consists ...
3
votes
2answers
436 views

Linewidth resets when using input files

I'm trying to set some figure files in standalone .tex files, and then input them in the main file. Those files looks something like this \ifx \plotwidth \undefined \newlength{\plotwidth} ...
6
votes
1answer
358 views

Get {standalone} to ignore blocks of text from \input files (e.g., \begin{spacing} and \maketitle)

I've got a number of separate .tex files that are all \documentclass{article}. I'm inputting these into a \documentclass{book} file as chapters. In the book.tex file, then, I've got inputs like this: ...
9
votes
2answers
1k views

Splitting a large document into several files

Why is it recommended to split a large document into several parts and include them with \include? Is it only a relic of the past times when computers and LaTeX compilers were slower, or is it still ...
6
votes
1answer
1k views

\input{…} is ignored with beamer option ignorenonframetext

I'm using beamer to create my slides and wanted to use beamerarticle to create written paper which is not just printed slides 3 on 1 page. The option ignorenonframetext for the beamer class forces it ...
0
votes
1answer
527 views

How to fix the location of tables when they're imported with \input? [duplicate]

Possible Duplicate: Keeping tables/figures close to where they are mentioned I'm using MiKTeX and TexMaker 2.2.2. Using the latabstat command in Stata I create small tex files of some ...
1
vote
1answer
206 views

Adding new parameter in lyx

In texmaker, I create document_setting.tex for input some document attribution like the author, publisher, some attribution in acknowledgements. And then input document_setting in master document ...
4
votes
2answers
2k views

How to prevent a \lstinputlisting being split across pages?

This question shows how to prevent a long listing from being split across several pages when the code is written directly into the tex file. I want to achieve the same effect when including code in ...
7
votes
1answer
324 views

How could I use \input within soul arguments?

So, I basically want to do something like this: \documentclass{article} \usepackage{soul} \begin{document} \so{Hello} \so{\input{key.tex}} \end{document} Now the first "so" works but the second ...
4
votes
2answers
167 views

Can a file know if it has been \include'ed or \input'ed?

I have a somewhat large User's Guide for a code I've been working on with collaborators. Each chapter is in a subdirectory of the top directory, which includes the .tex file that grabs and stitches ...
9
votes
2answers
684 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 ...
7
votes
4answers
813 views

How to write a command to file

I am trying to write to a auxillary file using \newwrite\tempfile [...] \immediate\openout\tempfile=list.tex \immediate\write\tempfile{Text to write to file} \immediate\closeout\tempfile It works ...
6
votes
3answers
239 views

Is there a way to load additional packages specified in the document environment?

It seems strange but I really need this. Is there a built-in macro to load additional packages specified in the document environment? % main.tex \documentclass{article} \begin{document} ...
5
votes
1answer
830 views

tabular, siunitx and input - `Extra }, or forgotten $.`

I'm trying to include data into a tabular environment \usepackage{booktabs} \usepackage{siunitx} \begin{table} \begin{center} \begin{tabular}{SSSS} \toprule {$na^3$} & ...
14
votes
6answers
2k views

\endinput: what is it for?

I am working on a big document and I am using the \include command to put chapters one after the other. On the internet I came to know about the existence of the \endinput command. However I do not ...
4
votes
1answer
2k views

Generate a merged LaTeX file, with \input code in place?

I'm currently working on an experiment that involves re-typesetting a digitized physical book from OCRed images. For various reasons involving the workflow, the resulting project architecture is a ...
5
votes
1answer
557 views

What happens to a relative path in a file added with \input{}?

I stumbled upon the following question: In the preamble of my main tex file for my thesis, I've included several other files with definitions for abbreviations which are in the same path as main.tex, ...
7
votes
2answers
669 views

Make a .tex file that combines complete .tex documents in subdirectories

I'm using LaTeX for my research journal (similar to WordPress). There are a number of subdirectories that contain complete (standalone) .tex files along with PDF files that I made from those ...
2
votes
1answer
1k views

Is there a way to get TexMakerX to recognize commands defined in an input file?

I have a file that defines a bunch of commands for various variables that I use in other documents. Here's a small example of what it contains: \newcommand{\varElevation}{\ensuremath{\alpha_{el}}} ...
11
votes
2answers
2k views

How to make \include work with a quoted string path containing spaces?

In Windows, \input can work with a quoted string path containing spaces, but \include cannot. How to fix it? \documentclass{book} \begin{document} %\input works! \input{"Contents/Installing and ...
5
votes
1answer
2k views

Supertabular problem with \input

Consider a simple supertabular example: \documentclass{article} \usepackage{supertabular} \begin{document} \begin{supertabular} a & b \\ \end{supertabular} \end{document} Suppose I wanted to ...