Questions tagged [import]
{import} is about the use of the import package or using the \input, \import, or \include commands for including text and code from other files.
273
questions
0
votes
1
answer
13
views
How to call embedfile from a subdocument using the relative path?
I want to create documents containing multiple exercises, which I include using the import command from the import package. Depending on which exercise is included, additional files should be embedded ...
1
vote
1
answer
109
views
Test whether a string is in a list
\documentclass{article}
\usepackage{expl3,xparse}
\usepackage{currfile}
\ExplSyntaxOn
\NewDocumentCommand \IfStringInList {mmmm}
{ \clist_if_in:nnTF {#2} {#1} {#3} {#4} }
\ExplSyntaxOff
\begin{...
0
votes
0
answers
27
views
Is there a way to specify directories to search files in them and relative imports in files in these directories
In project folder, I have directory tex from which I would like to import files without specifying directory name. For this, I added this directory to input@path. tex directory actually contains other ...
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 ...
2
votes
0
answers
43
views
Strange behavior of the import package when image and tex file names are the same (except extension)
I find a strange issue of the import package when working on a large tex project.
A minimum running example
I am on Linux Mint 21.3 with texlive 2021.20220204-1.
Here is my folder structure.
/
+- main....
0
votes
1
answer
34
views
Compile glossary files individually for testing
Is there a setup that allows importing glossary definitions from another file, while at the same time being able to compile this file in a standalone manner (for testing purposes)?
acronyms.tex
\...
0
votes
0
answers
29
views
Page numbering after titlepage
I am writing a small booklet for my elective using \documentclass{abstract}, and creating a separate titlepage.tex, then inserting it with \import{./}{titlepage.tex}. There are no page numbers on the ...
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 ...
0
votes
1
answer
96
views
Using import package with foreach loop
I have nested folders with multiple files containing statements and solutions for exercices.
main.tex
exercices (folder)
⮑ statements (folder)
⮑ 1.tex
⮑ 2.tex
⮑ solutions (folder)
⮑ 2.tex
...
0
votes
1
answer
49
views
Move equation in subfigure
I'd like to move an equation inside a figure environment.
It should appear slightly above the current place:
\documentclass[
a4paper,
11pt,
]{article}
% Needed for correct typography and ...
0
votes
0
answers
77
views
I saw answers on excel to LaTex but do not want a latex table... Need to use LaTex in Excel to make .csv with math symbols, subs & supers, etc
I am trying to make a csv file for flashcards that includes latex symbols, the file needs to be in csv format and I was editing it in excel to change the plain text such as d/dx f(x) or x^2 a_n etc to ...
2
votes
1
answer
567
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. ...
3
votes
2
answers
251
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,...
1
vote
0
answers
36
views
Import a gif in LaTeX? [duplicate]
Is it possible to add a gif into latex?
I tried it with the same packages of picture format, but it is not working.
0
votes
1
answer
86
views
Import a picture in LaTeX? [duplicate]
I just started writing in LaTeX.
I want to import a picture but failing.
The picture is .png format.
1
vote
1
answer
631
views
How do I import a picture in LaTeX?
I am new to latex. I want to import a picture but failing.
The picture is .jpg format.
1
vote
1
answer
45
views
How do I remove the displayed "1.2.11.2.1" in the compiled document?
I am writing a handout using the report class in Overleaf. I wanted to add a graph I had made beforehand in another document (named fig 1.2.1) and I uploaded it to main.tex. I used import and this ...
0
votes
0
answers
26
views
Is there a way to create an all inclusive master tex file from many imported tex files [duplicate]
I have a main tex file which includes many import statements.
I'm compiling with pdflatex to generate a PDF.
I'd like to create a new .tex file that includes all the content from the main .tex file, ...
0
votes
1
answer
31
views
How can nested files infer their paths? Part II: From a leaf to another branch of the root
The following question is closely related to this one but represents a scenario much closer to my real life use case, in which descendants reference their ancestors, rather than vice versa, and the ...
1
vote
1
answer
103
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 ...
0
votes
1
answer
317
views
Standalone package error "! Extra }, or forgotten \endgroup" in Texmaker
I am using the Texmaker latex editor, and get the following error when trying to use the Standalone package:
! Extra }, or forgotten \endgroup.
I am simply following the overleaf tutorial on the ...
1
vote
2
answers
68
views
Import Information into Several Documents from a Master Document
Context: I'm a university lecturer and therefore facing the same tasks whenever I prepare for a new semester. One of them is creating course material with LaTeX which includes a syllabus, slides for ...
0
votes
0
answers
22
views
Contents imported from csv file goes beyond the page below
I want to create a one-word Q&A document. I imported the contents from a .csv file which has 104 rows, the contents go below the page and not to the next page. How do I rectify it?
\documentclass[...
0
votes
1
answer
168
views
How to import and choose format/font for numbers in Latex documents?
I would like to add huge tables to a Latex document and I would like the numbers to be similar to this style
1- What is this style or how it can be adopted?
2- Is there a more efficient way to import ...
0
votes
0
answers
85
views
Importing a pre-generated index file to Overleaf
I have a problem with the index generated using Overleaf. I am using imaxeidx with no flags other than the title and number of columns. After generating the .idx file I simply use \printindex to print ...
0
votes
0
answers
2k
views
How to open cls files with overleaf ? thanks
I am new to writing a dissertation and I am using overleaf. my professor sent us a cls file called "muthesis" but I don't know how to use overleaf to import the templates into it. i would ...
0
votes
0
answers
33
views
Import seems to fail with TexStudio after reinstallation. Why?
I reinstalled Texsudio on a new SSD yesterday. After that I only encounter problems, Nothing changed to my actual MikTex installation, which has always been on my boot disk.
E.g. when I import my ...
0
votes
1
answer
72
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.
...
2
votes
1
answer
428
views
Bulk-Export Macros in TeXstudio
I have a collection of macros that I use. I want to export them, then import them on another computer.
I'm looking for some way to bulk-export my macros.
There are two highly-related questions, but ...
2
votes
1
answer
382
views
Bibliography imported from main and subfiles
I have a bib file that I need several subfiles to have access to. Currently the file structure is:
project
main.tex
Bib.bib
Chapters
Chapter1
Chapter1.tex
I can ...
4
votes
1
answer
224
views
Including articles as appendix in dissertation
For my dissertation, I need to include my published articles as an appendix. My articles are standalone LaTeX projects with their own preamble, template to adhere to the style guide for the publisher, ...
0
votes
1
answer
607
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 ...
0
votes
1
answer
675
views
Problem when run imported files in TexStudio
I use TexStudio with a nested structure, in other words I have many files in many folders to help keep things tidy. The problem happens when I have to import another document.
\documentclass[...
0
votes
1
answer
106
views
Collective book / odt template to latex
I have to create a collective book for a lab, humanities field, where authors don't use latex. I found some ideas to insert in a same chapter names of authors appearing in the table of contents, an ...
0
votes
0
answers
213
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 ...
0
votes
0
answers
28
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}
\...
1
vote
3
answers
642
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 ...
0
votes
0
answers
79
views
Latex adds 'end.tex' to my file names. Why?
I have been using this code without problems and then out of the blue, it started throwing a new error.
% Table generated by "H:\do files\weekly_comparison_by_year.do"
\begin{table}
\begin{...
0
votes
0
answers
37
views
Why is the chapter missing when importing with the \import command?
I am writing a report that contains a total of 6 chapters. I use the \import command to import them, but I have the following problem: if I try to import all the chapters, they appear up to the fourth ...
1
vote
0
answers
1k
views
One Dot vs Two Dots to import file
Sometimes I see one dot (like: \subfile{./chapters/file.tex}) and sometimes two (like: \graphicspath{{figures/}{../figures/}}) while importing a file. Can someone clarify which is used when?
1
vote
1
answer
249
views
Importing value from txt-file to tikz
I want to import a value form an txt-File and use it in tikz. But for some reason this is not working (line 25). I was not able to find a workaround like the \protect-command which works for \caption ...
1
vote
1
answer
401
views
How to import text files to populate the right places in LaTeX template
I developed a LaTeX template for my work in recipe development. I work on multiple, new, recipe ideas weekly, and the task of picking through the template to change titles, image file names, ...
2
votes
2
answers
745
views
Figure appearing as ?? on Overleaf
I've followed tutorials online such as https://latex-tutorial.com/tutorials/figures/ and https://www.overleaf.com/learn/latex/How_to_Write_a_Thesis_in_LaTeX_(Part_3):_Figures,_Subfigures_and_Tables#...
2
votes
0
answers
33
views
Appendices not showing up properly when imported to main.tex
I'm using the standalone package so that I can write parts of my paper separately.
My appendices is structured into sections. When I compile appendices.tex it shows up as expected i.e. 1. [title] ...
1
vote
2
answers
404
views
Importing \bigplus and \bigtimes from mathabx package
Similar to my question here: I want to import \bigplus and \bigtimes from the mathabx package but not use the whole package as it alters the look of \int, \partial etc.
There are a lot of solutions ...
1
vote
1
answer
563
views
Multi-file latex project, with a title page in hebrew
I have a large LaTeX project (my thesis) with a main TeX file (main.tex) and many subfiles contained in their own sub-directory. All are interrelated with the subfiles package.
Now I want to add a ...
0
votes
1
answer
1k
views
Combining Latex files with different preambles
I am in the process of writing a Python program that scrapes exam questions in tex files from a website and combines them to create a new paper. The questions are picked by random from a spreadsheet, ...
1
vote
0
answers
77
views
LaTeX commands in pgfplots legend entries from csv import
I am trying to import data from a csv file, where legend entries are automatically taken from the csv file's header. Those legend entries contain LaTeX math code.
% used PGFPlots v1.16
\documentclass[...
0
votes
0
answers
165
views
Exporting and importing user's custom commands from Texmaker
I have Texmaker on two different PCs, but only on one of them I defined custom commands in Texmaker. Is there a way to export these commands from one Texmaker and to import them on the other one?
2
votes
3
answers
4k
views
I get "already defined" error when using `amsthm` package with `\import`
I use \import command to modulize my chapters.
I also use amsthm package to define my own theorem environment.
When I try to compile the main (root) file, I get the following errors:
Command \thm ...