Skip to main content

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
35 views

Using `\input` inside documentation (.dtx) files

The different category codes active in .dtx files cause problems with commands that use \input inside them. An example is the \worldflag command from the worldflags package. Comments within included ...
karlh's user avatar
  • 826
1 vote
1 answer
33 views

Use a File as Input for a Macro with the `listofitems` Package [duplicate]

After a saga about parsing SGF files that culminated in this very thorough answer by user @StevenB.Segletes, I've been trying to use files as input for the macro he was able to create there. The final ...
psygo's user avatar
  • 458
2 votes
1 answer
131 views

\documentclass in separate .tex file

I have always put all my preamble, including \documentclass, in a separate "preamble.tex" file like this: \documentclass[a4paper, twoside=on, titlepage=on, 11pt, BCOR=1cm, ...
Reto Ambrosini's user avatar
0 votes
0 answers
20 views

Transmit filename to main file while using !# tex root

I have, in a directory named tds, several files, say td1.tex, td2.tex etc. with no preamble but with the directive : % !TEX root = ../main.tex In this file main.tex : \documentclass{book} \usepackage{...
Yves's user avatar
  • 1
1 vote
1 answer
56 views

\documentclass not working when inside \input [closed]

When I place my \documentclass command inside my preamble.tex file (which I am importing into the main.tex file using \input), my compliation fails with the error *** (job aborted, no legal \end found)...
jonnybolton16's user avatar
0 votes
1 answer
48 views

\input not loading tikzset definitions from standalone

I made the following tikz as a standalone .tex and wanted to \input the file into another. It compiles as a syandalone but it wont load the tikz boxes and arrows when imported. \documentclass[tikz]{...
David Barcene's user avatar
2 votes
2 answers
86 views

Including standalone tikz in beamer

I have a stand.tex that contains the following latex code: \documentclass[tikz,border=10pt]{standalone} \begin{document} \begin{tikzpicture} % Draw horizontal line \draw[->] (0.5,0) -- (19,...
FooBar's user avatar
  • 1,015
2 votes
1 answer
151 views

LaTeX error when formatting external data with siunitx

The following example fails with ! Argument of \@iinput has an extra }. The problem does not occur when not using \input or not using \num. How can I avoid the error? \documentclass{minimal} \...
Diomidis Spinellis's user avatar
1 vote
0 answers
24 views

Can a variable be passed to the same program to iterate over, instead of editing the source and running it with distinct values?

My MWE is: \PassOptionsToPackage{rgb,dvipsnames,svgnames,dvipsnames,hyperref}{xcolor} \documentclass[border={2pt},tikz]{standalone} \usetikzlibrary{math, calc} \begin{document} \begin{tikzpicture}[...
chandra's user avatar
  • 3,104
0 votes
1 answer
35 views

How can I use \input with relative figure folders? [closed]

I am trying to make a main file with \input of a bunch of tex files. These tex files use \Figures... . png as images in each folder of each tex file. The \input in the main tex file gives the error ...
ZOMBYSPIDER's user avatar
0 votes
1 answer
75 views

How can I input external files by using a list of names?

My code is the following: \documentclass[ngerman,german,14pt,twoside,openany]{scrbook} \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8]{...
mario1000's user avatar
  • 502
0 votes
1 answer
63 views

Problem with \input with pdflatex [closed]

I'm having a problem when using the \input command with PdfLatex to compile. I have two files, the first one and the other to include with \input. \documentclass[12pt]{article} \usepackage{lipsum} \...
Luca's user avatar
  • 1
0 votes
0 answers
32 views

Include all chapters, but compile only one?

Instead of one big tex file, I put the chapters into separate tex files for faster compilation. My main tex file now looks like this: \include{ch-abstract} \include{ch-acknowledgments} \include{ch-...
Blau's user avatar
  • 53
0 votes
0 answers
19 views

Errorin compiling using color package and input

I'm using Overleaf to do a report for school, and in order to be readable, I've chosen to write every chapter in different .tex and then take them in the main .tex with all the packages, and do \input....
Côme's user avatar
  • 1
0 votes
1 answer
39 views

Difficulty with template for multiple chapters

Folks: I am a Latex newbie. I have a book consisting of 24 chapters in word. I would like to be able to work on each chapter separately, but compile them as one Latex file. I copied code from ...
gandolfo's user avatar
0 votes
2 answers
61 views

Importing a section from another document (with begin document)

I have two different latex files, which I would like to import one to another file. Here's what I've searched previously in older posts. This one Another one To understand my case, I provide the ...
Wilory Lu's user avatar
  • 113
0 votes
0 answers
29 views

\graphicspath but for tables [duplicate]

I want to do something similar to this post Separate directory for tables I want to have a standard directory path for tables like I have it for figures. For figures, I have the following: \...
cascom's user avatar
  • 1
1 vote
0 answers
48 views

\input{} does not work inside \longtable{} [duplicate]

I want to create multiple reports with dynamic tables. When I try to insert columns with \input{inputfile.tex} it gives me the errors: "Misplaced \noalign. \midrule ->\noalign" and "...
HauptDa's user avatar
  • 11
2 votes
4 answers
127 views

Loop to input content into tabular

I'm trying to input files that represent rows of a table into a tabular environment using a loop, but I'm having trouble using input. Here is a MWE of my code without using loops. I have files with ...
Nicolas Suarez's user avatar
0 votes
0 answers
26 views

\input with multicols pagebreaks

I have multiple .tex files that I insert into a main document.tex file. This is done for separating the different parts of my paper. The .tex files that are called with \input in document.tex contain ...
ptushev's user avatar
0 votes
0 answers
21 views

TeXstudio: create chapters in subfolders and figurtes in subsubfolders

I'd like to setup my document as such: /folder/main.tex %includes the preamble info /folder/chapter1/CH1.tex /folder/chapter1/Figures/<all_Ch1pictures.png> /folder/chapter2/CH2.tex /folder/...
MrI2C's user avatar
  • 125
0 votes
0 answers
34 views

Importing parts of a .txt file in LaTeX document [duplicate]

Can you define which lines and columns from a .txt file to show up in LaTeX? I tried the \lstinputlisting command where it seems I can only limit the output to specific lines and not columns as well, ...
Charles TeXavier's user avatar
0 votes
1 answer
163 views

Easy way to iterate through files in directory

I've already read multiple solutions where the poster iterates over the number of the files, but what I'm looking for is a simple way to iterate through the files in a directory. For example, \...
Figaro's user avatar
  • 3
0 votes
1 answer
51 views

nested relative inputs

Problem: This is something that that bothered me for quite a time. If you have multiple files, then you have to make all input paths relative to the main tex file (or actually the directory from where ...
Nathanael Skrepek's user avatar
0 votes
0 answers
176 views

How to determine where does `\input{}` search for a file?

I have some file foo-<YYYY>.tex which I update every year and is located in the following path: C:\Git\directory\texmf\tex\latex\folder My MiKTeX configuration contains the previous path in its ...
Daneel Olivaw's user avatar
0 votes
0 answers
49 views

several table of contents

How does the code have to be edited if an external tex file is included (via \input)? The external file should have its own independent table of contents. \documentclass[a4paper]{article} % ...
nobody's user avatar
  • 1
1 vote
1 answer
68 views

breakable textfield

is there any way to have a fillable textfield which is breakable across two pages, i.e. not to be forced to one page only? MWE: \documentclass[11pt,a4paper]{letter} \usepackage[utf8]{inputenc} \...
Stefanos Rotas's user avatar
0 votes
0 answers
75 views

pdflatex for pdf with interactive/fillable box with adjustable height to input

Following up on this question from August 2023, is there any update on creating a form on a hyperref generated pdf, with height adjustable (without rescaling) to the context, so it can be saved/...
Stefanos Rotas's user avatar
1 vote
1 answer
38 views

When inputting a file, can I extract the title as a section header?

To move sections and sections down the hierarchy, I have: \let\section\subsection \let\subsection\subsubsection In case it's needed, here is ExampleFile.tex \documentclass{article} \title{Example ...
Claire's user avatar
  • 13
2 votes
4 answers
80 views

How to turn string read from (CSV) file into counter

I have a csv file with tags and (page) nrs, as follows: tag,nr t1,1 t2,5 t3,9 The nr-column refers to page numbers in a pdf file. Each page has a corresponding tag. Given a tag, I want to show the ...
avandeursen's user avatar
0 votes
0 answers
337 views

How to properly define TEXINPUTS

There are numerous questions on this site (and elsewhere on the web) how to define $TEXINPUTS and other strategies for including non-standard locations to be searched by TeX. See, for instance the ...
jan's user avatar
  • 2,266
2 votes
1 answer
53 views

Input under conditions

I have a main document with inputs of several others. This is my main document \documentclass[11pt, a4paper]{article} \newcommand{\years}[1]{\textbf{Years} #1} \newcommand{\corps}[1]{#1} \begin{...
Laura G's user avatar
  • 23
1 vote
1 answer
62 views

input tex from variable

This PR0101_Enunciado.tex file is inside the folder Ejercicios and contains this line only : Un enunciado de pregunta Then, in another folder at the same level of somefolder, I have this main.tex: \...
Lev's user avatar
  • 191
0 votes
0 answers
148 views

How to create a latex file with html input value?

I have a latex file and a website. On the website I have an input field, in which you can write text. Then when you click a download-button on the website I want that it automatically creates a pdf (...
mat's user avatar
  • 1
0 votes
0 answers
85 views

longtable contents from file

I observed a difference in a longtable environment that reads it contents via an "\input" command. longtable package version 4.17 creates an additional empty line, that is not present with ...
chrisF682's user avatar
3 votes
1 answer
84 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
0 votes
0 answers
54 views

Wrong pathnames with latexdiff -- flatten and multiple files added with \input

I've written my thesis in latex and have one folder per chapter and in each chapter folders, I've subfiles per sections. Now, I'm using latexdiff on my mac's terminal to look at difference between the ...
Alice's user avatar
  • 1
5 votes
4 answers
268 views

Using \input for command arguments

I'm making an rpg system. I want to separate the contents of the spell from the formatting of the spell to, for example, be able to format the spells differently for character sheets vs a dedicated ...
Amit's user avatar
  • 53
2 votes
1 answer
135 views

\Include working on mac, but not on windows

I am working on a big LaTeX document (thesis), that's broken down into multiple .tex files, and I thus have only a thesismain.tex file to compile that uses \include. On a MacBook, compilation goes ...
Kal8578's user avatar
  • 175
1 vote
2 answers
1k views

Change build root directory in VSCode

tldr: how to change build root to different path from main tex file. Using VSCode and the Latex-workshop extension, I want to compile a document. My folder structure is as follows: /workspace_folder/ ...
Vahiel's user avatar
  • 61
0 votes
1 answer
255 views

List of acronyms as an input of a separate file .tex and not in the main

I'm trying to have a list of acronyms in my paper, but since it will be really long I don't want to write all the \newglossaryentry in the main. I tried to create a separate .tex file and use \input{} ...
Gin's user avatar
  • 1
0 votes
2 answers
262 views

Executing python script or code using \input not working

Im trying to execute a python script from within LaTeX by means of using the \input command, however I get a strange error that I can't really understand. Im following the working example taken from ...
Charlie's user avatar
  • 1,135
4 votes
4 answers
605 views

scanf functionality in TeX?

Is there a function akin to scanf of C that can simultaneously parse stdin or txt and assign them to variables? For example, I am trying to typeset a pdf from a text file. The first line contains the ...
qem69331's user avatar
1 vote
0 answers
40 views

Space after \input in tables causes new blank row

I have an issue with \input when using the new versions of LuaLateX. I include this MWE and afterwards some figures of the issue. I'm testing the code in Overleaf. The problem is that when I'm using ...
jlanza's user avatar
  • 1,269
1 vote
0 answers
47 views

Error with \input: runaway argument

I have the following two .tex files which won't compile: \documentclass[a4paper, twoside, 14pt, pdftex, pdfa]{extreport} \usepackage[utf8]{inputenc} \usepackage[czech]{babel} \usepackage{comment, ...
JoudaBouda's user avatar
3 votes
2 answers
292 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 ...
Pollo's user avatar
  • 437
0 votes
1 answer
216 views

eqref from another documents perspective

In the following code, I have two documents sharing the same input file (myeq.tex), which has a labeled equation. In Document 1, the equation would be referred to as equation 1 since it is the first ...
lostinmath's user avatar
0 votes
0 answers
132 views

Python from LaTeX: Strange Networkx/Graphviz error

It is hard to give a minimal example, because Python3 with some packages is needed. I want to call Python from LaTeX, here is an example how I want to do it (--shell-escape is needed): \documentclass[]...
Titanlord's user avatar
  • 541
1 vote
0 answers
49 views

Are header guards necessary for LaTeX packages? If so, how to implement one?

A header guard is used in some programming languages to avoid repeatedly importing the same file. Here's one example of this scenario in LaTeX: Let's say we have header1.sty, header2.sty and main.tex ...
Long Horn's user avatar
  • 115
1 vote
1 answer
126 views

How to input lyx file into .tex file

I would like to input the body of a lyx file into a tex file. Currently I convert the .lyx file (say child.lyx) to child.tex in Lyx with File > Export > Latex, and use \input{child.tex} in the ...
Alexei Alexei's user avatar

1
2 3 4 5
18