As of May 31, 2023, we have updated our Code of Conduct.

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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
811 views

\includefrom with \includeonly

I need \includefrom of the import package to resolve input statements in chapters/intro/intro.tex. But when I combine this with \includeonly, it is not included: \includeonly{chapters/intro/intro} \...
0 votes
1 answer
136 views

Large document multifile structure with pgf and data subfolders using import

My project file structure is: C:\USERS\NAME\MULTIFILE_MWE │ main.tex │ ├───pgf │ data.csv │ pgftikz_fig.tex │ └───sections section_import.tex My requirements are: main.tex ...
4 votes
1 answer
308 views

AUCTeX/RefTeX, the `import` package and cross reference

Today I switched to the import package with the hope that it will simplify the management of the files of my text. It surely did that, but.... It broke RefTex in emacs. Now, I cannot lookup my labels ...
0 votes
0 answers
24 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 ...
0 votes
1 answer
530 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, ...
2 votes
1 answer
101 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
63 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,...
0 votes
1 answer
353 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
113 views

Relative paths when using import and endfloat packages

I am combining multiple tex files (different papers) that are from different projects. I decided to use the import package. Figures and tables of each file should go at the end of a chapter. Because ...
0 votes
1 answer
63 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
22 views

\href links do not work when the pdf is imported into another latex document

I am creating a cover_letter.pdf file using Latex. In the cover letter, I need to create a hyperlink to a website. \href{https://www.some-website.com}{\textbf{My text}} the above command works fine ...
1 vote
1 answer
145 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
0 answers
35 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
60 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
2 answers
417 views

Importing python code into texstudio

I've got some python code that I wrote and I wonder how can import the code from file.py or file.txt into texstudio instead of copying all my code again.
1 vote
1 answer
42 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
1 answer
105 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 ...
0 votes
0 answers
22 views

Convert a .tex file to PDF before importing it in the document

How can I compile a .tex file as a PDF before importing it into the document? This is related to my previous question, as it could be a possible solution to that question. However, this question is ...
1 vote
1 answer
72 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
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
28 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 ...
4 votes
3 answers
1k views

Can I automatically load chapters and sections based on the filesystem?

I was interested in knowing if I can load chapters and sections of my book based on the filesystem. For example: Chapter 1/ Section 1.tex Section 2.tex Section 3.tex Chapter 2/ Section 1.tex ...
69 votes
6 answers
198k views

Importing csv file into latex as a table

I am using the \csvautotabular function to import data from a csv file. It has worked beautifully; however, I only want to import certain columns from the file. How can I exclude certain columns? ...
1 vote
2 answers
46 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 ...
9 votes
1 answer
4k views

How can I get the actual relative path using \import and \subimport?

I have structured my PDFLaTeX document in folders. Inside them there are .tex files, .PDF figure files. And all works using \import and \subimport commands from the Import package: Main/ |-- main.tex ...
0 votes
1 answer
55 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. ...
0 votes
0 answers
20 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[...
1 vote
0 answers
170 views

Run a library from a folder? [closed]

I'm struggling to get Tikz to run on my University terminal, for some as of yet unknown reason, and I don't have the permissions to install Tikz. I've emailed the 'computer help people' asking them to ...
1 vote
2 answers
3k views

relative paths don't work without absolute path

I'm trying to automate pdftex to generate docs. I'm in some kind of hell where TeX assumes people want to use absolute paths or the working directory. I have the file main.tex. It imports several ...
1 vote
2 answers
527 views

Show a full outline with subfolders in TeXnicCenter?

I have a question regarding the structure of a project in TeXnicCenter. I am currently writing my thesis and created a project with a main document main.tex. Each chapter is a tex subfile that I link ...
0 votes
1 answer
103 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
2 answers
222 views

LaTeX Import Command Error while Nesting

I am facing this issue while I am trying to use \import command from latex. I have nested document which is compiling on GitLab pipeline. My configuration uses sub-modules also. Please see the error ...
0 votes
0 answers
53 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
35 views

How to import \newtheorem{} from an external .tex file to main file?

I have an external .tex file that stores all of my custom commands, and I also wanted that .tex file to include \newtheorem lines. The structure of this input file is of the form: \newcommand{\im}{\...
0 votes
0 answers
904 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
31 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 ...
2 votes
1 answer
207 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 ...
1 vote
1 answer
177 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 ...
2 votes
2 answers
184 views

AUCTeX/RefTeX with import package in emacs, known problem from 2013 but is there a fix now?

I realized this issue with import in AUCTeX/RefTeX mode today which was also mentioned in the below thread from some years ago: AUCTeX/RefTeX, the `import` package and cross reference RefTeX ...
4 votes
1 answer
160 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
247 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
0 answers
75 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
20 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
328 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
72 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
33 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
736 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?
12 votes
4 answers
5k views

Matplotlib PGF images in subdirectory

I have a two-dimensional image plotted by Matplotlib using the PGF backend. It is stored in the figures subdirectory (since I have a lot of images and don't want to clutter up the main folder). As an ...
2 votes
1 answer
8k views

Stata output directly to Latex

I am looking for a best, most universal option to transfer stata output to latex (of any kind) i know esttab and things like this however what if i want to transfer something different (any type of ...
1 vote
1 answer
148 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
2 3 4 5 6