2022 Developer Survey is open! Take survey.

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
0 votes
1 answer
29 views

Indenting text from '\enumerate'

I am trying to write a document that has the same question in two places. So, I've written that question down in a seperate tex file, and used the \input command in both places to copy the question. ...
user avatar
0 votes
0 answers
55 views

LaTeX sporadically replaces dashes with $\Gamma$ when making linebreaks

I'm working on a large report and have noticed that the output pdf often contains $\Gamma$ at the end of lines, when there should be `-' instead. However this is not consistently the case, as you can ...
user avatar
0 votes
2 answers
110 views

How to input/include individual files as rows for a table?

In a scenario where attempting to build multiple documents where each document will have a page with their own (long) table using common data. The following is a minimal example of the table ...
user avatar
  • 103
1 vote
1 answer
34 views

commands defined in external file and imported by lua are not recognized

Suppose I have a file sourced.tex which defines a new command \MyCommand: \newcommand{\MyCommand}{Hello World} If I create a file main.tex and I source this file with \input, I'm able to use the ...
user avatar
  • 1,372
3 votes
1 answer
74 views

lua code inside directlua throws an invalid escape sequence error

I'm trying to make use of lualatex to automate generation of some part of a pdf. The directory tree for my minimal working example looks like the following: │ lua_escaping_issue.tex │ └───a_folder ...
user avatar
  • 1,372
1 vote
1 answer
41 views

Patch \input in tabular if on a recent LaTeX

I am trying to implement a workaround for the error I get when inputting a table as external file in a file using \input. The code snippet below works for this purpose: \IfFileExists{filename} \...
user avatar
  • 175
0 votes
1 answer
46 views

Cloning parts of the document in other locations

I am correcting an article I wrote based on the reviews of my referees. What I want to do is to create a document that unifies both the text of the article (written in tex) and the corrections. Since ...
user avatar
  • 33
2 votes
3 answers
100 views

How to use for loop to input files

Suppose I am writing a book with 45 chapters (in separate files 1.tex 2.tex etc) and I want to input them into main.tex. How can I write a for loop for this?
user avatar
  • 339
2 votes
1 answer
103 views

You have cited something which is not included in your bibliography

I have the following overleaf project structure: root ├──IEEEtran.cls ├──IEEEtran.bst ├──Introduction.tex ├──main.tex ├──Related_Work.tex ├──References └──refererences.bib My main.tex file ...
user avatar
  • 319
2 votes
2 answers
74 views

Show plots conditionally / progressively

I would like to show my plot through multiple stages. For example, I'd like to show first the blue plot, then blue and red, and finally all three, without copying the file multiple times and ...
user avatar
  • 1,361
0 votes
1 answer
63 views

Plain TeX input Tikz package not found

I ran \input tikz.tex \bye and the Tikz package is not found This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_2) (preloaded format=pdftex) restricted \write18 ...
user avatar
  • 339
0 votes
1 answer
25 views

How to input different page layouts in same document?

I'm currently trying to adapt a template I found for a ''cook book'' and I wanted to include different page layouts to keep the document a little bit varied. I know Latex isn't the best tool for such ...
user avatar
0 votes
0 answers
19 views

syntax package prevents underscores in file names [duplicate]

I'm working in Overleaf, and using the syntax package for Backus-Naur notation, as suggested here. However, it seems to interfere with using the \input command on files with underscores in their names....
user avatar
  • 1
0 votes
0 answers
47 views

How to evaluate latex code in markdown (pandoc) code chunk?

I wan't to evaluate latex command \input{file} in code section in pandoc markdown. I tried this: ```matlab syms s; G = \input{"raw.txt"}; step(G); ``` file raw.txt contains this: (100*s + ...
user avatar
  • 3
1 vote
2 answers
209 views

TeX capacity exceeded, sorry [input stack size=5000

\documentclass[11pt,a4paper]{article} \usepackage{ngerman} \usepackage[ngerman]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{marvosym} \usepackage{...
user avatar
  • 19
1 vote
1 answer
135 views

Can TeX read a line in a file and use it as input?

Yes, TeX can read a line in a file and use it as input. The example working code below now implements the accepted answer from Willie Wong. For the new user: "\inputL" and "\inputR"...
user avatar
0 votes
2 answers
65 views

How can I input multiple txt files with special characters into my main tex file?

I am very new to LaTex and learning it with TexMaker. I want to make a book. For this book i have 99 txt-files (each a chapter). I want to import this chapters into my main tex-file with the command \...
user avatar
0 votes
1 answer
57 views

How to \read inside a command and return the result?

As a followup of How to use file content as a numeric value for a length?, I'm trying to do this (I really need to read the data.txt file inside this new command and use the value later, when the ...
user avatar
  • 10.1k
1 vote
4 answers
55 views

How to use file content as a numeric value for a length?

I'm trying to read the content from a file and then use it in the formula: \documentclass{article} \usepackage{calc} \newcommand\x{\input{size.txt}} \setlength\parskip{1pt * \x} \begin{document} Hello,...
user avatar
  • 10.1k
0 votes
1 answer
36 views

Input - Include part of file based on content

I have a chatlog file (chat.tex), and would like to include different parts of it in different parts of my document. I can extract the relevant parts I want using regular expressions, or string ...
user avatar
  • 133
0 votes
0 answers
26 views

Problem with \input{file} printing text on a new page

I have 5 exercise files and the final paragraph of Exercise_1.tex (which I inserted into the main file using \include{Exercise_1} happens to end at the top of a new page. Therefore, I wanted to use \...
user avatar
2 votes
2 answers
45 views

Problem with input inside input and @

I'm working in a package and want to create libraries, such as tikz and its usetikzlibrary. However, as I use @ in private macro names, when a library uses another I get an error. Here's my MWE (...
user avatar
  • 830
0 votes
1 answer
57 views

menukeys package breaks SyncTeX for \input files?

Including the menukeys package breaks SyncTeX's inverse search for content included by \input. MWE: mwe.tex: \documentclass{article} \usepackage{menukeys} \begin{document} Hello World. \input{...
user avatar
0 votes
1 answer
62 views

Inserting beamer slides from different projects

so basically I have a main thesis beamer project written in "Metropolis". Since, in the past months I have made a detailed presentation of a thesis chapter using beamer, I would like to ...
user avatar
1 vote
0 answers
28 views

Compilation errors when using \input inside tabular environment [duplicate]

I would like to include a table stored an external tex file in a latex document via \input inside a \begin{tabular}...\end{tabular} environment. This way the column alignment definitions and ...
user avatar
  • 133
0 votes
0 answers
61 views

Problem with \foreach and \input

I am having a problem using \foreach to import a variable amount of files into my latex template. This is the code I am using for this particular part: \documentclass[8pt,handout,t]{beamer} \...
user avatar
3 votes
1 answer
60 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 ...
user avatar
  • 133
3 votes
2 answers
86 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: ...
user avatar
0 votes
0 answers
59 views

I need to use \input to supply titles to \section, \subsection, and \subsubsection, but it only works for \section

Here is a MWE. Actually I am using latex2html for a web page. LaTeX works using \protect, but not latex2html. \documentclass{article} \begin{document} \section{\protect\input{titles/title-sample}} \...
user avatar
  • 57
2 votes
2 answers
47 views

input specific elements from csv

I have a csv table and I want to input specific cells. For instance, my csv is project.csv: , obj, resources, wp task1.1, 1 , 2k , 1 task2.1, 2 , 3k , 2 task3.1, 3 , 4k , ...
user avatar
  • 57
2 votes
0 answers
52 views

Differences regarding \input@path between older version of LaTeX (e.g. 2019) and newer ones (e.g. 2021)

Suppose the directory dir contains a file file.tex with some part of the document. Then the document \documentclass{article} \makeatletter \def\input@path{{./dir/}}% note the trailing slash \...
user avatar
  • 44.5k
0 votes
0 answers
25 views

\input{} is putting the files at the end of the document instead of where I put them [duplicate]

I have the following LaTeX file: \documentclass[a4paper, 12pt]{report} \usepackage{fancyhdr, caption, pgfplots, pdfpages, graphicx} \pagestyle{fancy} \fancyhead{} \renewcommand{\headrulewidth}{0pt} \...
user avatar
  • 133
3 votes
3 answers
98 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 ...
user avatar
  • 155
0 votes
1 answer
78 views

Positioning pdf_tex in Latex

I want to get a pdf_tex file between two paragraphs of text. But I only know the \input command for the embedding of the file and the \input command always places the picture on a new page. Is there a ...
user avatar
3 votes
2 answers
192 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 ...
user avatar
  • 119
0 votes
0 answers
34 views

For my usecase, should I use \input, \import or \include command, subfile package or standalone package

I am writing a manual. The manual has a bunch of versions intended for different audience. Let's say I am writing files A,B1,B2,B3,C1,C2,C3, where B1,B2,B3&C1,C2,C3 are different versions of the ...
user avatar
  • 1,023
0 votes
0 answers
16 views

How to use import pacakge(Error:test.aux not found)import

I tries to run my latex as a project, with each section using a different text file. But I seem unable to let import command do what I want it to do. Here is the MWE: mainfile \documentclass{article} \...
user avatar
  • 1,023
1 vote
3 answers
106 views

import package and graphicspath do not work together

Hi I tried to use the import command from the import package to not conflict with the relative paths in the imported file. However, this doesn't seem to work with \graphicspaths. Here the structure of ...
user avatar
3 votes
2 answers
187 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 ...
user avatar
  • 133
0 votes
0 answers
28 views

Tex adding information to txt

Is there any possibility to add Information to a .txt or other type of document? For example I have the following .tex \begin{filecontents*}{Info.tex} @ P & 1 & 60 & 2 & 77 \\ ...
user avatar
  • 119
3 votes
1 answer
41 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. ...
user avatar
  • 423
0 votes
1 answer
69 views

Import tex data in a spreadtab table with this structure

I want to import a products.tex in a spreadtab. The content of the products.tex is @ Plant & 1 & 60 & 2 & 77 \\ @ Book & 2 & 90 & 4 & 64 \\ @ Other & 3 & ...
user avatar
  • 119
1 vote
0 answers
55 views

how to import many input in spreadtab table [duplicate]

\documentclass{article} \begin{filecontents*}{products.tex} @ Plant & 60 & 2 \\ @ Book & 90 & 4 \\ @ Other & 100 & 10 \\ \end{filecontents*} \usepackage{...
user avatar
  • 119
0 votes
0 answers
112 views

quick tip on \input or \include?

I'd been trying to compile a pdf from a tex file, using only miktex texworks. But it turned out that the file(gutenberg 38769) was too big to be loaded at all on some devices and so I am now ...
user avatar
0 votes
1 answer
82 views

Undefined control sequence error after MiKTex update on 2021-08-25 while using parametrized file

Last time I updated MiKTeX was over an year and till now the below MWE worked: \begin{filecontents*}{tst.tex} \begin{tikzpicture}[auto] % placing the nodes \node[signal] (input) {}; \...
user avatar
  • 2,262
0 votes
1 answer
58 views

Acronyms aren't being listed, so can I preprocess only the \input s?

So, my true problem is that overleaf doesn't generate a glossary. I suspect that the problem is that I have sub-files with \input{}. Therefore my question is: is there a way to let latex create a ...
user avatar
0 votes
0 answers
32 views

Limiting the scope of a bibliography to an inputted file

I am in a bit of a pickle. I am compiling a big file with several contributions (over 100-200) by different people. For reasons I won't get into, I am constrained to the following: The different ...
user avatar
0 votes
1 answer
37 views

How to input Subtitle from a file

I am using this template to write a thesis. While using the \subtitle command I am having a problem. If I follow the syntax like \subtitle{This is the subtitle} it works. However, if I wish to input ...
user avatar
  • 153
0 votes
1 answer
109 views

Functions on Latex

Is there a way to write functions on latex? For example... def some_function{input}: \command{input} I've been thinking of using newcommand but I want to be able to use a variable for the input so ...
user avatar
0 votes
0 answers
27 views

RequirePackage with .gls suffix

In order to improve polyglossia I want to use the RequirePackage mechanism (with option), by loading lds file. I think overwriting @pkgextension will be suffisant but could you confirm ? Does it exist ...
user avatar

1
2 3 4 5
16