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.
905 questions
0 votes
1 answer
99 views
Is there a good way to define common code between LaTeX projects?
I have multiple courses, each containing similar LaTeX code. There are tests built on exam, slides built on beamer. I often include a file with the common files if there are multiple files for example:...
3 votes
1 answer
119 views
How to prevent `\input` from appending an extra newline at the end of a file?
I'm trying to visualize newlines in an input file by making ^^M active and displaying it as \n. However, the \input command appears to append an extra empty line at the end of the file, which I don't ...
0 votes
1 answer
67 views
How to fix relative input path referencing using LaTeX Workshop in VSCode?
Setup I have the following folder structure: home/ A/ A.tex C.tex B/ B.tex C.tex and the file contents are as follows home/A/A.tex \input{../B/B.tex} home/B/B....
0 votes
1 answer
66 views
Create a table of content inside a table using \input{\jobname.toc} for a custom class
I newbee to writing a class for syllabus book creation. I am trying to generate a \jobname.toc file outputing commands, which when I try to read through \input{\jobname.toc} inside tabular environment,...
1 vote
1 answer
67 views
How do I define an element in one tex file to appear next to another element in another tex file?
I am creating a dictionary using a python script to convert an XML file filled with entries into a LaTeX readable file. As I edit the XML file, I regenerate the entries.tex file, which is imported ...
4 votes
5 answers
291 views
How to \input file as arguments?
Background I have a file QA.tex whose entire content looks like: {Question}{Answer} I would like to include this file into a document, but parse for only the Question part. My attempt at a solution (...
5 votes
3 answers
322 views
Processing All Files [0-9]*tex
I am drafting a multi chapter document. Unfortunately, the names of the input files still change often. Fortunately, I keep them in a reasonable list that determines order, such as 02-introduction....
0 votes
0 answers
31 views
Build tree in WinEdt: cannot find \inputted file in the local MiKTeX directory
When I try to build file tree in WinEdt, \inputted files in the local TeX directory are not found. The code lines \input greekup2 \input pusymb_t2a \input x2symb produce such nodes in the tree: ...
1 vote
1 answer
93 views
spreadtab fails with \input for data rows, giving "Misplaced \noalign" and other errors
I'm trying to use the spreadtab package to create a table where the data rows are imported from an external file using \input. When I input the data directly into the spreadtab environment (by typing ...
4 votes
2 answers
226 views
Should I omit file types when including images etc
The LaTeX compiler is able to determine the file without adding the filetype e.g., \includegraphics[width=0.8\textwidth]{images/frontend/verbose} which is similar to \includegraphics[width=0.8\...
2 votes
2 answers
296 views
! TeX capacity exceeded, sorry [input stack size=10000]
I get this error with these sets of equations. The commented out ones also produce same error as one that is not commented out. How do I fix it? What am I doing wrong? This is my error code: ! TeX ...
4 votes
2 answers
106 views
Conditional statement in TikZ depending on external variable
Imagine you have a tikz figure defined in myfig.tex : \begin{figure} %conditional statement (mychoice==1)... \draw[blue,thick] (0,0) -- (1,0); %conditional statement (mychoice==2)... \draw[red,thick] (...
0 votes
2 answers
108 views
Is it possible to test if a document class is loaded, and if not, load one, otherwise use the one already loaded?
I have a shared preamble file that provide uniform configuration for my documents. But it has no document class of its own. That way, I can determine the class for each document. But that means it ...
2 votes
2 answers
105 views
input header with ltablex adds unwanted space
I'm using ltablex to create a multi-page table. I import the header using input. However, an unwanted space is created below the header: tableheader.tex header1 & header2 & header3\\ \hline\...
0 votes
2 answers
71 views
Can't `\input` preamble to latex file
I'm using overleaf and I have a file Preamble.tex: \documentclass[tikz, margin=2mm]{standalone} \usetikzlibrary { arrows.meta, shapes.geometric, trees, shapes, positioning, backgrounds, ...