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
34 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
  • 51
0 votes
1 answer
32 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
50 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
0 votes
0 answers
15 views

latex \input \import do not show file

See the code. I am trying to import some files into my thesis. When I use the following, from chapter 3, it does not show the file 'chapter3', it shows 'Input: Chapter 3/chapter3', see attached photo. ...
G-09's user avatar
  • 101
4 votes
4 answers
596 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
35 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,229
1 vote
0 answers
40 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
256 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
0 votes
1 answer
41 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
55 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
  • 521
0 votes
0 answers
6 views

bundledoc problem: \def\input@path does not translate to .dep properly

I define the root path for my \input files in the main.tex files as: \makeatletter \def\input@path{ {../fig/} } \makeatother When I input a tex file whose address is ../fig/tikz_plots/...
Hüseyin Can Önel's user avatar
1 vote
0 answers
36 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
1 vote
1 answer
51 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 vote
1 answer
38 views

Piping shell command output to another command

I'm trying to write a command that wraps \href with a QR code to the given URL. For this I need to generate a temp file and reuse it later, so I wrote a \mktemp command that wraps the mktemp utility: %...
user84207's user avatar
  • 145
1 vote
2 answers
156 views

chapterbib with subfiles for sections

I'm using chapterbib for a long document and the creation of bibliographies for each chapter works fine. Each chapter is in its own file that gets included. Is there any option to split the chapter ...
gothicVI's user avatar
  • 538
2 votes
1 answer
111 views

A funny bug with input, newcommand, ifthenelse in a beamer

First I write a tex named thequest like: \begin{quest} Just a problem. \end{quest} Then in the main tex, I write \newtheorem{quest}{Question} \newcommand{\Fakeframe}[1]{\ifthenelse{\equal{#1}{}}{}{ ...
Ngiap's user avatar
  • 89
0 votes
0 answers
13 views

How to avoid pagebreak using input? [duplicate]

I'm just starting to use TeX, and I'm having a lot of trouble with it, which is why I'm asking. I am creating a solution of Lang Algebra for my personal collection. Since there are a lot of exercises, ...
MH.Lee's user avatar
  • 101
0 votes
1 answer
68 views

Add search path for \usetikzlibrary

How could I add a folder to the search path of tikz? More precisely, I have a structure like this (see below for exact content): mycachedfiles/a.tex myinput.tex tikzlibrarymy.test.code.tex I’d like ...
tobiasBora's user avatar
  • 7,417
1 vote
0 answers
72 views

With luatexbase.add_to_callback() how can I conditionally get default behavior for open_read_file and find_read_file?

Rationale: The goal I have is to create a system where I pretend -- via Lua -- that a file is being read, while in reality the contents come from elsewhere. A concept elsewhere called VFS (virtual ...
0xC0000022L's user avatar
0 votes
0 answers
43 views

Input and biber

I think it's a trivial question, but I cannot find the answer elsewhere. I am using a file to include other files through \input. Everything works fine except from bibliography, which does not work ...
Giacomo's user avatar
  • 133
0 votes
1 answer
57 views

Alignment of \input images in tabular

I'm trying to create a tabular environment using two images: one is \input from gnuplot, while the other is \input from a \typesetarray from the array package. My goal is to have them both aligned to ...
cmp's user avatar
  • 57
0 votes
0 answers
84 views

How to make an \input file build on its own?

I am working on an article in LaTeX that I am splitting into multiple files with \input commands. Each section is in one such file of its own. Is there a way to make these files build on their own ...
aquaticapetheory's user avatar
2 votes
1 answer
20 views

Inputing data for a tabular environment leads to a weird extra space [duplicate]

I'm writing a table and I'm trying to import its contents from an external file. Curiously, I found out that when importing the contents TeX seems to add a weird space to the last entry. This does not ...
Níckolas Alves's user avatar
0 votes
0 answers
12 views

Using Matlab2Tikz in Texstudio error message: Paragraph ended before \pgfplots@@environment@axis was complete

I am currently trying to implement my Matlab results into my latex file in Texstudio. To save the figures from matlab i used the Matlab2Tikz function and saved them as a .tex and a .tikz file. My ...
Monsterhunter Mario's user avatar
2 votes
1 answer
210 views

What is the correct way to import files within subfiles?

The subfiles docs explains that it handles path issues when main files and subfiles are in different directories and subfiles contain paths relative to their own directories using the \import package. ...
socialscientist's user avatar
3 votes
2 answers
91 views

How do (relative) paths work with the subfile package?

I am trying to understand how (relative) paths need to be used with the subfiles package. In particular, it's not clear how content that I usually would include with \include, \input, \includegraphics,...
socialscientist's user avatar
0 votes
0 answers
79 views

How to input folders into latex?

I'm trying to compile my PhD thesis which contains three chapters. The relevant preamble I'm using is \documentclass[12pt]{report} \usepackage{titling} \usepackage{graphicx} \graphicspath{ {figures/} }...
Jan3's user avatar
  • 67
0 votes
1 answer
95 views

TeXstudio problem compiling

I am writing a long document (thesis). I have a main.tex file, and several individual files, for each thesis' chapter. These files are included in the main file using the \include command. I had ...
Marlon Calispa's user avatar
0 votes
1 answer
56 views

How to protect \input shell command args with backslashes

I want to \input"|..." to invoke a shell command and consume its output as LaTeX code. In particular, I want to write something like: \expandableShellCmdProtectCmdArgsWithBackslashes{echo}{2(...
David Fink's user avatar
0 votes
1 answer
62 views

Consuming variable's value (produced from shell call) as `\input`

Note: \input is not expandable: Why is \input not expandable? However, \@@input is. The goal is to \@@input some text produced from a shell call, obtained via \sys_get_shell:nnN (for how, see egreg's ...
David Fink's user avatar
2 votes
0 answers
145 views

How to define path for use with /input, such that TeXStudio can detect the location of the file using global command

Background I am writing a large document (main.tex) with several chapters (Introduction.tex, LiteratureReview.tex, etc). I use TeXStudio to compile the document. Each chapter is included using /input (...
Bernardo's user avatar
1 vote
2 answers
163 views

Error "Bad space factor (0)." when using \input to generate file name for VerbatimOut

I want to output some text, verbatim, to $TMPDIR/myFile.txt, then do some other operations with that file. Note: to allow LaTeX to write to files outside the current folder, you need to: Run LaTeX ...
David Fink's user avatar
0 votes
0 answers
46 views

(ctrl) + (left click) to "go to file" or "create file" with Overleaf

I am using Overleaf, and I want to know if it is possible to have a shortcut for Click right to "Go to file" with Overleaf. In TexStudio, I simply use ctrl + left click (On a Windows Machine)...
Álvaro A. Gutiérrez-Vargas's user avatar
0 votes
1 answer
45 views

LaTeX not compiling with nomencl package and custom .sty file when inputting another file

I am using my university's custom .sty file (cuthesis.sty) to write my thesis. It's been working fine up until now, but when I recently tried to start using the "nomencl" package, it just ...
rpinto73's user avatar
0 votes
1 answer
52 views

Table / tabular enviroment doesn't build the pdf

i was trying to create a table of with 3 columns \begin{tabular} but once i had completed it, Latex can't manage to build the .pdf. I've made already some tables that had no problem with it, and i ...
Federico's user avatar
1 vote
1 answer
81 views

How can nested files infer their paths? Part I: From root to leaf

I have set up the following file tree. . [D] (working directory) Test.tex [F] SubFolder [D] SubTest.tex [F] SubSubFolder [D] SubSubTest.tex [F] I would like each file to print ...
Evan Aad's user avatar
  • 10.8k
1 vote
1 answer
28 views

\subfile expands robust commands (so differs from \input in that respect)

I'm overloading _ as a non-breakable dash in nonmath, and this poses no problem with \input: \documentclass{article} \usepackage{babel} \let\subscr=_ \catcode`_=\active \DeclareRobustCommand_{\ifmmode\...
Michaël's user avatar
  • 1,344
0 votes
1 answer
45 views

How to instruct the LaTeX engine to search up the folder tree from files embedded via the `input` command?

I take a course that gives weekly homework assignments. I created a folder mycourse for the course, with subfolders mycourse/hw1/, mycourse/hw2/, etc. for every homework assignment. I have a mycourse/...
Evan Aad's user avatar
  • 10.8k
0 votes
4 answers
386 views

Input a file that contains special characters like "#", "_" without using external packages

I know this is a weird and stupid question, but I really need to achieve this. I have a file containing some characters like "#", "_". For example, the file is: abc_def#gh And I ...
Uy Linux's user avatar
0 votes
1 answer
42 views

How to prevent $\centering$ from making my graphs bold?

I need to display two graphs side by side, which are in stored as two exteral .tex files. This is what I've got: \begin{figure}[H] \begin{subfigure} \centering \resizebox{.5\...
sleepydrmike's user avatar
4 votes
2 answers
162 views

Expansion: argument of \input handled differently on Windows and Linux

Consider the following files main.tex and xyz.tex: % main.tex \documentclass{article} \begin{document} \newcommand\abc{XYZ.tex} \input{\MakeLowercase{\abc}} \end{document} % xyz.tex (all lowercase ...
gernot's user avatar
  • 48.3k
0 votes
0 answers
52 views

Umlaut in the name of the file containing the preamble

Using \input{filename} for a file in a subdir works fine even including the whole preamble, but when the targeted file has an Umlaut in its name, I get an Emergency stop with a Missing \begin{document}...
Nepumuk's user avatar
  • 483
2 votes
1 answer
2k views

TeXStudio: The file xxx.tex does not exist. Do you want to create it?

Yesterday it went well. But after I turn on the laptop today, the .tex files don't exist. But actually they are all located in 'chapters/...'. If I choose 'yes', I'll find that TeXStudio created a ...
Serene's user avatar
  • 41
0 votes
0 answers
28 views

Ipad-Annotation on pdf is deleted when using input command [duplicate]

When I use the command input(file.pdf), the annotation on the pdf gets deleted. Is there a way to keep the annotations. P.S. I cannot upload a annotated pdf file to test it.
Diana's user avatar
  • 1,191
1 vote
1 answer
146 views

Beamer mode and input

Here is the MWE \documentclass{beamer} \begin{document} \mode* \mode<all>{ \input{input1.tex} \input{input2.tex} } \end{document} Surprisingly, the ...
Arne's user avatar
  • 925
1 vote
2 answers
80 views

Splitting tex file via commands

I'd like to rearrange a document with snippets at will. It could be done via \input but the snippets are too small to be put in individual files. If put in a \newcommand the # from code listings ...
RootRaven's user avatar
  • 249
3 votes
1 answer
32 views

Alternating input from different .txt files

I'm trying to create a pdf which contains news articles, showing their url, the title, and the first paragraph or the article. These 3 are stored on 3 different .txt files and each have a line for ...
Diego Sanchez's user avatar
1 vote
1 answer
40 views

Inputting data from external file causes misplaced \noalign error [duplicate]

I want to be able to process data using a python script and write it to an external file which can be imported into a latex table environment. The data is formatted exactly as it would be in the main ....
guskenny83's user avatar
0 votes
0 answers
34 views

How to make sure that this part will appear as Chapter in this latex document?

I was given the PCtex LaTeX template by my university. Since I was more comfortable with Overleaf, I tried to run the file there and I found out that some problems occur when all the chapters are ...
nlydamohd's user avatar
0 votes
0 answers
38 views

Pipe input for table content is working odd

I have following document: \documentclass[parskip=half-]{scrreprt} \usepackage{ragged2e} \usepackage{makecell,xltabular} \usepackage[dvipsnames,x11names,table]{xcolor} \begin{document} \subsection{...
Michael's user avatar
  • 197

1
2 3 4 5
18