Questions tagged [input]

{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.

Filter by
Sorted by
Tagged with
4 votes
1 answer
10k views

'Can only be used in preamble' Error when using \input for a chapter

It's my first post here; hopefully I'm not butchering how I'm supposed to post this. I'm working in the Report class using Arara, trying to use \input to import a chapter. % arara: pdflatex % arara: ...
John Samples's user avatar
4 votes
1 answer
495 views

Can I specify a parameter that I pass with input?

I made my own preamble and saved it into a separate file. I include it with \input{Preamble} Now in the preamble there is \title{MyTitle} Now I want to pass MyTitle from my main document. How do ...
Michael S.'s user avatar
4 votes
1 answer
363 views

Is there a way to limit the scope of the Table of Contents (\tableofcontents command)?

Question If I have a document with multiple tables of contents, can I limit the scope of a toc sections are added and reset the toc? Situation I have a document made up of 10 languages. (using \...
Jonathan Komar's user avatar
4 votes
3 answers
500 views

How can I get pgf's foreach to iterate over the contents of an input file

I would like to write something like: \foreach \myline in {\input{filehandle}} {\dosomethingwith\myline} If I have an outside_file.tex: this, is, the content, of, a file and then try to pass it to ...
A.Ellett's user avatar
  • 50.6k
4 votes
1 answer
115 views

Loading pgfkeys key values from an external file?

I've set up some pgfkeys keys and I'm trying to load the settings from an external file. The only way I know in LaTeX to load files is \input, but it seems to not be the right choice. \begin{...
Nicola Gigante's user avatar
4 votes
1 answer
2k views

combine documents of different classes

I need to add to an article another document, class exam. include and input don't work properly if the preamble is different. I must add some multiple choice and clozes as an appendix to the article I'...
spacelander's user avatar
4 votes
1 answer
2k views

Problem with graphicspath and pdf_tex

I use \input for a subsection, in which I would like to include a pdf_tex file MK.pdf_tex via \input. The pdf_tex files are in a folder /fig. If I use \input{./fig/MK.pdf_tex} it returns the error "MK....
Doedork's user avatar
  • 51
4 votes
1 answer
1k views

Outsourcing Tikz and relative paths

Summary: How do I get includegraphics to be relative to the current file, when using tikzscale? Details Similar to pmav I like to have a .tikz file which contains only the tikzpicture environment. (...
ted's user avatar
  • 3,377
4 votes
1 answer
632 views

\includestandalone cannot compile \section or \subsection commands

Main.tex \documentclass{scrartcl} \usepackage{standalone} \begin{document} \section{A} \includestandalone{Subfile} \end{document} Subfile.tex \documentclass[crop=false,float=true,class=scrartcl]{...
kando's user avatar
  • 1,338
4 votes
1 answer
1k views

How can I input part of a file in verbatim?

I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or ...
john's user avatar
  • 41
4 votes
2 answers
1k views

Why do nested standalone files ignore the \ifstandalone and \onlyifstandalone{} calls?

I am trying to use the standalone package to break up my large document into smaller ones. The structure of my document currently is: main.tex \documentclass{article} \usepackage{packages} %custom ...
Ssxxkk's user avatar
  • 43
4 votes
1 answer
2k views

How can I use relative paths?

I want to add a table from a separate tex file to my document. I get an error saying the file vr_sets.tex is not found, when I do this in Chapter2/chapter2.tex: \input{tab/vr_sets} This also fails: ...
tommy.carstensen's user avatar
4 votes
1 answer
6k views

LyX undefined control sequence \input

I'm a new user. I-m in trouble with lyX and in particular how to use \input{file.tex} correctly. Error: "undefined control sequence". Actually I'm not sure where I have to specify the path so that LyX ...
user46589's user avatar
  • 165
4 votes
0 answers
251 views

Inputting a big number of tables into LaTeX

I am working on the project in LaTex that requires me to input a large number of tables produced in R via xtable packages. Let's say I have already output a large number of tables (about 150 of them). ...
Sikun's user avatar
  • 41
4 votes
0 answers
813 views

How to escape double quotes in \input

I'm trying to call shell commands that contain multiple (nested) quotation marks. This is, for instance, what I would write on the shell: $ python -c "print \"Hello World\"" which produces Hello ...
Philipp's user avatar
  • 41
4 votes
0 answers
135 views

How to import multiple fragments of file labled with the same label?

I want to make include of labled part of file. I need something like catchfilebetweentags but with the support of multiple usage of the same lable. Catchfilebetweentags include just the first ...
cito's user avatar
  • 41
4 votes
1 answer
430 views

How to copy figures and "input"ed LaTeX source files from absolute directories to a local one? [closed]

For example, in my main.tex I use \input{/home/certain-directory/chapter-1.tex} and \input{/home/another-directory/chapter-2.tex} I also have some figures included by their absolute paths in my /...
Hongying's user avatar
  • 569
4 votes
1 answer
4k views

Creating an abbreviations file [duplicate]

I'm new to the LaTeX scene as I've starting writing my thesis. I'm using a root .tex file and using \include to add in my chapters (etc). I'm also using \nomencl to add an abbreviations list. I'd like ...
UbuntingBiochemist's user avatar
4 votes
0 answers
2k 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 .tex ...
Juan José's user avatar
3 votes
3 answers
4k views

Add version number to document from file

I have been going crazy looking for a solution. Essentially, I need to add the version number of the document somewhere on the title page. What I want to do is have a file such as version.tex which ...
ruben1691's user avatar
  • 543
3 votes
2 answers
2k views

How to do multiple calls to \includeonly?

Doing multiple call to include only as: \includeonly{myfirstinclude} \includeonly{mysecondinclude} It is only including the last file called mysecondinclude by the last \includeonly call. It is ...
user's user avatar
  • 4,755
3 votes
2 answers
460 views

\input inside \href

I have a number of papers that include my email on the cover of the paper, and need to find a solution to \input my email address using \href. This way I will be able to edit my email once, and then ...
Hector Bahamonde's user avatar
3 votes
3 answers
1k views

Input a list of files

I want to include multiple files in my source. The files are to be included in a file liste.tex in the following format: fichier1.tex files2.tex test3.tex .... I relied on answering the questions ...
rpapa's user avatar
  • 12.4k
3 votes
2 answers
845 views

TeX capacity exceeded (OT1+ztmcm)

I'm getting the following error when trying to compile a master .tex file: TeX capacity exceeded, sorry [parameter stack size=10000] There's some info in the .log file that may be relevant but hasn'...
Daniel Diniz's user avatar
3 votes
3 answers
342 views

TeX capacity exceeded with several \input in a spreadtab

I use several \input in a spreadtab using the method from this answer in my document until I got this error: TeX capacity exceeded, sorry [text input levels=15]. I read in the Internet that I can ...
IH Pro's user avatar
  • 141
3 votes
1 answer
125 views

Why is the \input command not honored when there is an incorrect use of \texttt before it?

Here is my code: \documentclass{article} \usepackage{listings} \begin{document} Foo { \texttt \input{bar.txt} } Baz \end{document} This produces the output: Foo bar.txt Baz I was expecting this ...
Lone Learner's user avatar
  • 3,226
3 votes
3 answers
977 views

Manual input of table of contents file (\jobname.toc) empty in some circumstances

According to Using .toc external files, the following file should display the table of contents twice: \documentclass{report} \begin{document} \tableofcontents \chapter*{Contents (manual input)} \...
Denis Bitouzé's user avatar
3 votes
2 answers
155 views

identify pieces of text automatically generated from input and new command

I have a document where many of its values are defined in a separate file via \newcommand, and added to the main document using \input in the preamble. The file being included is the output of a ...
carandraug's user avatar
3 votes
2 answers
272 views

Unwanted space with input

Consider some file file.tex only containing the following: \hfill Some text We input this into the main file: \documentclass{article} \begin{document} \input{file} \hfill Some other text ...
Zuy's user avatar
  • 353
3 votes
3 answers
360 views

\input{} give error when only entering part of a command

I have a main.tex file, which in the preamble contains the following path definition \def\commonpath{C:/Users/Default/Documents/Folder} This compiles just fine. If I break the code into separate ...
jopeto's user avatar
  • 165
3 votes
3 answers
972 views

Is it possible to conditionally input a file in LaTeX?

I'm new to LaTeX, and here's what I'm trying to accomplish: I have Markdown and LaTeX files in my working directory, say markdown_1.md and latex_1.tex. In my main LaTeX file, main.tex, I have defined ...
Utkarsh Verma's user avatar
3 votes
2 answers
506 views

execute "makeatletter" code before and after a macro

I'm using subfiles package to handle a large project. I place the main file in the main directory, and subfile in a subdirectory. In order to use the \input command in the subfile while compiling in ...
anecdote's user avatar
  • 461
3 votes
2 answers
12k views

How to insert footnote with latex \input?

I have two tex files and use the command \input to include the table on my main file as follows: Main.tex \documentclass{article} \usepackage[T1]{fontenc} \usepackage{inconsolata} \usepackage{url} \...
ricardoramos's user avatar
3 votes
3 answers
442 views

\input{} as argument for \inputgraphic{}

I got a question very similar to this post (\includegraphics{\input{|shell command}}) which unfortunately hasn't been really answered. The aim is to make a command that invokes a python script to ...
Dirk van den Bekerom's user avatar
3 votes
1 answer
24k 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 ...
mihajlv's user avatar
  • 153
3 votes
1 answer
404 views

Issue with \input combined with \hline [duplicate]

I have always believed that \input was strictly equivalent to copy-pasting some code in a master latex file. But I currently experience this strange behaviour. Here is a minimal example. My main file ...
Roland's user avatar
  • 133
3 votes
2 answers
703 views

input: skip n lines

I am trying to insert content from another file whilst optionally skipping the first n lines. I have control over the inserted content, and my current solution is simply to wrap the first n lines in ...
2e0byo's user avatar
  • 143
3 votes
2 answers
286 views

Convert \input to number

I'm reading several txt-files from disk and I want to do some simple calculations on them and be able to print them on the page. Basically I have: \newcommand\getinput[2]{ \immediate\write18{do-...
RazorHail's user avatar
  • 157
3 votes
2 answers
649 views

list processing for file to input

i would like to create a 'list' of file names at arbitrary points in a document and use that list in the appendix to load these files. i understand that there's a generalized concept of a list in TeX ...
regnirpsj's user avatar
  • 195
3 votes
2 answers
2k 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} \setlength{...
adn's user avatar
  • 11.2k
3 votes
1 answer
78 views

Redefining \input with itself leads to unexpected behaviour

I am trying to intercept calls to \input and branch of functionality for some filetypes. However, I have run into the following strange error: Consider the M(n)WE given below, where the macro \input ...
marc's user avatar
  • 701
3 votes
2 answers
274 views

pgffor with foreach inputted from another file does not work anymore with MiKTeX 23.4

This piece of code used to compile just fine with MiKTeX 2.9.6300: \documentclass{article} \usepackage{pgffor} \begin{document} \input{forEachInput.tex} { test \fruit } \end{document} The file ...
Giulio's user avatar
  • 327
3 votes
2 answers
279 views

Using \seqsplit with \input

Given a long line stored in an external file, I would like to \input it and then use \seqsplit to allow it to break as necessary. a.txt: ...
Scott Colby's user avatar
3 votes
1 answer
61 views

How can I automate file inclusion using arguments?

I am working on a collection of books that uses content from other files. I want to have each reference in a file to avoid redundant content and to make it easier to review and correct the content. ...
A. Cedano's user avatar
  • 453
3 votes
1 answer
259 views

Using "\input{}" works/fails on similar snippets of code

(This question grew out of this one.) I've produced two snippets of code I want to \input{} in my main tex file. The two snippets look very similar, but it works only with one the snippets and I don'...
ulima2_'s user avatar
  • 185
3 votes
2 answers
142 views

unknown number of files in \input command

i need to load unknown number of "files.tex" in a folder and run LaTeX with \input command. i am trying the code below: \bash[stdout]<br> find . -type f | wc -l \END and run \input{file.tex} ...
alexandre goes da cruz's user avatar
3 votes
2 answers
3k views

Remove indent from the first line of multicol text included with \input in memoir

How can the first line indent be removed from the text, included with \input macro in a \multicol environment? \documentclass[letterpaper,12pt,english]{memoir} \usepackage[T1]{fontenc} \usepackage[...
ajeh's user avatar
  • 2,572
3 votes
3 answers
2k views

Typeset output from Maxima using input{}, specifically left justify

First of all, apologies if there is an answer for this already. I'm outputting symbolic results from Maxima using tex(<output>,"filename")$, which leaves me with an expression with $$ on each ...
nate's user avatar
  • 835
3 votes
2 answers
4k views

\input with wildcards (regex) in the file name

I would like to \input all tex-files in a certain directory starting with "prefix", in alphabetical order. Something like \input{prefix*tex} would be nice, but it doesn't work. Is there some ...
azimut's user avatar
  • 863
3 votes
1 answer
996 views

eplain macros in CWEB

I would like to use eplain macros in a CWEB program, but eplain and cwebmac seem to conflict in their PDF support. Specifically, they both define \ifpdf. The cweave program turns the code below (mwe....
musarithmia's user avatar
  • 12.5k

1
4 5
6
7 8
18