Questions tagged [catchfile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
111 views

Put file contents as PDF comment (respecting UTF-8)

I want to have file contents rendered as comment in a PDF file. I decided for pdfcomment, which works. pdfcomment requires newlines being typeset as \textCR\textLF. Which leas me to the following ...
koppor's user avatar
  • 3,122
0 votes
0 answers
57 views

How to use listings with catchfilebetweentags?

Question When inserting a listing with the catchfilebetweentags package, I get the error job aborted, no legal \end found. How do I make these packages work together? If I can't, are there viable ...
cero's user avatar
  • 221
1 vote
0 answers
139 views

Storing file paths and names in an array or list for use as arguments for \catchfilebetweentags or \insertgraphics [closed]

EDITED SOLVED---Thanks @Skillmon I have a multitude of compartmentalized tex files each with three tags (all built from the same template with the same tag names). The files are 20001.tex, 20002.tex,.....
TheBeeTee's user avatar
3 votes
2 answers
252 views

tabularray: How to comment out some rows using \if condition inside a table stored in a macro?

The following gets me this error ! Incomplete \iffalse; all text was ignored after line 26. So, how to make \if work inside the table stored in the macro \MyTable? \newif\ifShowRow \ShowRowfalse \...
Diaa's user avatar
  • 9,269
3 votes
3 answers
169 views

tabularray: Reading a table stored in a macro by catchfile

How to fix the following error, so that the table saved in \MyTable can be read by tabularray? ./tabularrayfilecatch.tex:29: Misplaced alignment tab character &. \MyTable ->1 & 2 \ 3 & ...
Diaa's user avatar
  • 9,269
1 vote
0 answers
38 views

Copy text between labels (catchfilebetweentags package)

I would like to copy parts of a .tex file into another .tex file AND for these parts to be defined as everything that is between two particular labels. I've tried the catchfilebetweentags package and ...
JVerissimo's user avatar
2 votes
2 answers
333 views

What are the alternatives to catchfilebetweentags?

I want to be able to have files chapter1.tex, chapter2.tex, etc. (with preambles) that can compile on their own and a file allChapters.tex that gather the actual contents of the chapters. So far, I ...
Colas's user avatar
  • 6,658
1 vote
0 answers
56 views

Catchfile and complex chemfig symbols

An excellent suggestion for a way to call chemfig symbols stored in individual files from a common library was put forth here. I have tested the solution with a variety of relatively simple compounds ...
John Chris's user avatar
0 votes
1 answer
200 views

Issue with mol2chemfig and moderately complex structural formula

This issue very well could be related to: this post When \callchemfigsymbol{s_adenosyl_l_methionine.tex} is uncommented, an error is observed. When \callchemfigsymbol{methane_pseudo_3D_stereo.tex} is ...
John Chris's user avatar
3 votes
1 answer
86 views

Pass content file to macro

I'm trying to execute a macro that get a string as a parameter. I want to load the string from as a verbatim content of a file. I'm oriented mostly on catchfile package with no success. I've already ...
pna's user avatar
  • 135
0 votes
0 answers
537 views

Catchfile error when using --shell-escape flag in LaTex system preferences

I am trying to use the minted package to copy and paste python code into a LaTex document. I am using MacOS13 and using TEXShop version 4.44. I used the following: \documentclass{article} \...
Put1demerde's user avatar
2 votes
1 answer
75 views

Force catchfilebetweentags to fail upon missing tag

When moving code around different files during refactoring it would be nice if catchfilebetweentags could raise a compilation error when the target tag does not exist. At the moment it silently ...
gallais's user avatar
  • 195
2 votes
1 answer
101 views

Is catchfilebetweentags compatible with endfloat?

I am using catchfilebetweentags to add figures to a document as described here. I get an error when additionally using the endfloat package. Here is an example: Main file: \documentclass[11pt]{...
tvg's user avatar
  • 151
5 votes
1 answer
713 views

Catchfilebetweentags not working

According to the description of catchfilebetweentags package command \ExecuteMetaData*[<file>]{tag} should do the same job as \ExecuteMetaData[<file>]{tag} but also ,,uncomment'' comment ...
Tomasz23's user avatar
  • 570
1 vote
1 answer
107 views

Problem inserting data in table using multiple files with catchfile

I have multiple data from different files that I want to use in the body of tabular environment. I saw a solution here, but the method only works for one such file only. If the following was done \...
Ricky's user avatar
  • 143
0 votes
0 answers
126 views

Write text only if Execute Metadata is not empty

I use the catchfilebetweentags package to get specific content from a common .tex file. MWE for the file where all content is stored (called master.tex): \documentclass[]{article} \usepackage{...
Thev's user avatar
  • 1,528
4 votes
2 answers
343 views

TikZ: colors stored in matrix with coordinates inferred

I'd like to use data stored in an external CSV file to fill nodes inside a tikzpicture matrix. If my data is stored as x/y/z, I can write the following loop (put together from this and this): \...
PatrickT's user avatar
  • 2,828
2 votes
0 answers
88 views

Read out text file until first empty line is found [closed]

Im currently writing a manual for a package and wanted to include parts of a Matlab file. I was able to display the whole file with the listings package but my goal is to only display the first part ...
K. Weinberger's user avatar
1 vote
1 answer
63 views

Excluded `\marginpar{}` imported into another file fails to compile

This is another follow up question based on this (using an altered MWE from this answer) Situation I am importing several parts of a file into another one (a summary-excerpt). This is done using the ...
BadAtLaTeX's user avatar
  • 1,110
6 votes
1 answer
241 views

Conflict between catchfilebetweentags and a kind of arrow from xypic: argument of \next@ has an extra }

I'm using the solution from https://tex.stackexchange.com/a/4952/1403 to input a part of file.tex into another file. But I'm getting this error: at the line \ExecuteMetaData[file.tex]{tag}. Here's ...
Bruno Stonek's user avatar
  • 1,321
3 votes
1 answer
230 views

Missing spaces when importing parts of other file

This question is a follow up and based on this question (using an altered MWE from this answer) Situation I am importing several parts of a file into another one (a summary-excerpt). This is done ...
BadAtLaTeX's user avatar
  • 1,110
3 votes
1 answer
644 views

Compile error with catchfilebetweentags

I tried to test the package catchfilebetweentags with the following minimal example, but get a compile error. What's wrong here and how to fix it? Contents of catch_main.tex \documentclass{article}% ...
student's user avatar
  • 28.8k
0 votes
0 answers
84 views

.tex file with catchfilebetweentags macros expanded

I have a .tex file, say original.tex, where I have imported snippets from several other files using the \catchfilebetweentags command. For archiving, I wish to produce a version of original.tex that ...
Abhishek Anand's user avatar
3 votes
1 answer
110 views

Result of Catchfile doesn't work inside a tikzpicture environment [duplicate]

This is a follow-up to this question. I am trying to get points to be graphed using data from an external file. The vertical coordinates are countries, and the horizontal ones are years. For this to ...
Peutch's user avatar
  • 2,132
3 votes
1 answer
134 views

Figure problem with catchfilebetweentags

This question is a follow up and based on this answer by touhami Situation I would like to create an excerpt from a script that I have TeX'ed as a compendium of the most important statements (...
BadAtLaTeX's user avatar
  • 1,110
3 votes
1 answer
202 views

Import several parts of file at once

As a follow up to this Question Situation I would like to create an excerpt from a script that I have TeX'ed as a compendium of the most important statements (theorems & definitions). I seek to ...
BadAtLaTeX's user avatar
  • 1,110
3 votes
1 answer
1k views

"\input only part of a file" and keep numbering

I would like to create an excerpt from a script that I have TeX'ed as a compendium of the most important statements (theorems & definitions). The question \input only part of a file has an ...
BadAtLaTeX's user avatar
  • 1,110
6 votes
1 answer
1k views

XeLaTeX and ifplatform/catchfile (loaded by "minted"): Errors on compilation [closed]

FOR THE RECORD I was unable to test any of the solutions provided, as I changed my main system last year. After that, no more problems arose. I suspect the old system had problems with the hard drive....
logo_writer's user avatar
1 vote
0 answers
139 views

Is there a way to input part of a file that includes sagetex?

I am trying to build a sort of jumbling program for Tex Files. Specifically I want to randomly order problems on quizzes/exams that are generated. I have gotten most of the work done, but I am left ...
Jason's user avatar
  • 939
4 votes
1 answer
174 views

catchfilebetweentags error with multicol

I am using the catchfilebetweentags library to store equations in an external file and then import them into my document. This is useful when you need to use the same equation in multiple documents. ...
Napthali's user avatar
  • 143
4 votes
0 answers
130 views

How to import multiple fragments of file labled with the same label?

I want to make include of labled part of file. I need something like catchfilebetweentags but with the support of multiple usage of the same lable. Catchfilebetweentags include just the first ...
cito's user avatar
  • 41
10 votes
2 answers
357 views

Workaround to make catchbetweenfiletags work with lualatex

I recently discovered that a basic example of the package catchbetweenfiletags doesn't work with lualatex (while it works with pdflatex). What follows is the MWE. Do you know if there is workaround ...
alfC's user avatar
  • 14.2k
0 votes
1 answer
881 views

Replacing placeholder text in LaTeX \input file

I am using the Dia graphics editor and exporting my diagrams to TikZ code. I am trying to address Dia's inability to easily typeset formulas e.t.c. by using LaTeX for this part. Unfortunately that ...
thkala's user avatar
  • 415
3 votes
1 answer
140 views

catchfilebetweentags bug with \verb command

With example \RequirePackage{filecontents} \begin{filecontents*}{main.tex} %<*example> \verb|This is an example| %</example> \end{filecontents*} \documentclass{article} \usepackage{...
Mettbe's user avatar
  • 31
4 votes
1 answer
214 views

Make catchfile work with pgffor's foreach

Consider the following MWE, extracted from my solution to this question: \begin{filecontents*}{demolist1.dat} 1,2,3 \end{filecontents*} \begin{filecontents*}{demolist2.dat} {1,0,2},{0,3},{1,1} \end{...
Bordaigorl's user avatar
2 votes
1 answer
265 views

Specifying a letter class \address from an external file using catchfile package

I'm working with the letter class, and have created a custom .cls file in which most formatting of a letter is taken care off. From a .tex file used to produce the letter (or call, as I may have ...
John Chris's user avatar
10 votes
2 answers
1k views

Why does \ExecuteMetaData break my paragraphs?

I have a lot of content to assemble in several different ways and would like to use excerpts from one file in another. I have specified: \usepackage{catchfilebetweentags} I then have an external ...
Caleb's user avatar
  • 1,978
7 votes
1 answer
1k views

Formatting code fragments extracted from file with minted

I would like to use the catchfilebetweentags package to grab code snippets from a source file and use minted to highlight them. Imagine I have the following in program.scala: //<a def ...
Nicolas Payette's user avatar
6 votes
2 answers
651 views

How can I use `catchfile` package to gobble first characters on a line

When using the fancyvrb environment Verbatim, you can gobble the first n characters of each line before printing it out. I'd like to be able to do something similar, but not via verbatim. In the ...
A.Ellett's user avatar
  • 50.1k