{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

13
votes
2answers
192 views

Which TeX procedure removes trailing tabs?

From reading the TeX source, it seems that the input_ln procedure is responsible for removing trailing spaces from lines upon input (before category codes are considered). A very short excerpt from ...
2
votes
1answer
5k views

TeXnicCenter problem, can't find input index file

I've just installed TeXnicCenter. The first error I have encountered is that when I try and build I get the following error: Couldn't find input index file D:\File location\test nor D:\File ...
0
votes
1answer
612 views

The Latex Font Catalogue - Calligra Font

I'm trying to get the following example working: \documentclass[danish,a4paper,11pt]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{slantsc} \usepackage{array} ...
7
votes
1answer
329 views

Typesetting multiple TeX files

Q1. Is there an existing template with the following features: (1) Multiple files, which I can typeset individually (as and when necessary). (2) A single .bib file from which I can cite in ...
2
votes
2answers
260 views

Wrong reference using \input twice for the same file

I have a short piece of text with an image that I need to use more than once in my document. The rational solution I came up with is to put the text in a file and call the file when needed, something ...
6
votes
1answer
153 views

Latex command /input relative adressing problem

My Latex project is organized like this: In my root Latex folder there is a root latex file named main.tex. In the same folder there is a subfolder pictures which contains 2 files named test.tex ...
5
votes
1answer
267 views

loop and input@path

I'm trying to have recursive path in the command \input@path, but it seems to be impossible (as I read, I'm with the TexLive 2012 and Linux). So I had the following idea, make a loop in \input@path, ...
6
votes
2answers
3k 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
363 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} ...
1
vote
3answers
344 views

Relative image path in renewed \maketitle

To minimize the amount of copy-pasting I have to do between documents/projects, I've decided to create a separate file in which I renew the \maketitle command. This file (title.tex) should then be ...
3
votes
2answers
1k 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 ...
5
votes
1answer
244 views

inputting a file not from a subdirectory

I apologise if this question has already been addressed. Say I have a set up like this: I have a main folder in which I have both preamble.tex and a folder sub_1. In sub_1, there is another folder ...
13
votes
3answers
10k views

Path to External Files in Nested \input

Problem I usually load a helping TeX file that contains my customizations, e.g., usual packages, corporate standard colors, and macros for abbreviations. I want my helping file to also load another ...
5
votes
1answer
70 views

Hook into \input (or any underlying command) in order to allow transparent preprocessing

Which command would be most suitable to be hooked in order to preprocess input before it is passed to TeX? Input file: \begin{document} \input{a} \end{document} Seen by TeX (after a file ...
10
votes
2answers
274 views

Large document edited by a dozen people

We, a team of 12 people, plan to write a 50 pages paper. The paper will be divided into chapters. Usually, no more than 2 or 3 people will work on a given chapter. Having one large file will create ...
7
votes
1answer
66 views

How can I access the numbers of pages on which input material begins and ends?

Is there a way to access the numbers of pages on which material included using \input begins and ends? Crude approaches along the lines of \def\myinput#1{% \typeout{ Input starts on page \thepage} ...
12
votes
2answers
7k views

How to use the import package?

I've read about the import package and am now trying to use it in my document, but I only run into errors. I have a main file named /ProjectPath/header.tex which loads all packages, etc. ...
3
votes
2answers
497 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 ...
1
vote
1answer
998 views

cannot scale images with latex fonts which are side by side

Referring to cannot use \caption under minipage, When I use the solution provided to the question in link above, in order to include images with latex math fonts embedded into them and place them side ...
5
votes
1answer
2k views

lstinputlisting does not include file within lstnewenvironment?

I want to use lstinputlisting to include a file with code within an lstlisting block, which is defined through a new environment. However, the lstinputlisting command itself, not the code, is ...
1
vote
1answer
5k views

How to insert one latex document into another.

This is probably online but I am not sure how to word the search. I have a long latex document, and it is getting messy editing it, is there a way to split the chapters into separate latex documents ...
15
votes
3answers
2k views

Expandable version of \InputIfFileExists or \IfFileExists

From this question: Cannot use \toprule when doing \input inside tabular -- why? I know that everything inside the tabular environment should better be expandable. The MWE below suggests that ...
4
votes
1answer
199 views

Parse a file with a regexp and return first match

I need to write a command that searches a file for a string that matches a certain regexp, and inserts that string. I know how to parse a string of text using a regex with \usepackage{l3regex} ...
6
votes
4answers
2k 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
155 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 ...
22
votes
2answers
6k 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
564 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
1k 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 ...
34
votes
3answers
4k 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
383 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
159 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 ...
27
votes
4answers
20k 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
2k 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 ...
14
votes
1answer
568 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
541 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} ...
8
votes
1answer
217 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 ...
10
votes
2answers
525 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
744 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
7k 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
6k 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
342 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
239 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
392 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
416 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
697 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
634 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
1k 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 ...