The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
1answer
53 views

A standard UN*X tool to pack a bunch of files in filecontents environment?

I was looking for something like: filecontents *.sty | cat - main.tex > newmain.tex It should be easy to write a script that iterating over its arguments, would wrap each in a filecontents ...
12
votes
2answers
173 views

Why can't filecontents work in a macro

I am trying to output some text in a file. I use filecontents and it works nicely. However, if I put the filecontents environment inside a macro, it only ouputs the comments but not the text when the ...
8
votes
2answers
71 views

Applying and doing math on two functions read from a file using pgf

I'm trying to read two functions of x from a file, and then get the result of f(8) / g(8) using pgfmathparse. Here is a minimal (not) working example: \begin{filecontents}{data.dat} f(x) g(x) x ...
1
vote
1answer
65 views

Help LaTeX with Windows not flushing file cache in time when using filecontents.sty

Casually, I run into trouble while using the filecontents package: LaTeX complains that the data file created by the filecontents environment is not writeable: LaTeX Warning: Overwriting file ...
7
votes
1answer
251 views

Generate Tikz tree from filecontents

Is there an easy way to create tree nodes from data in a file? I need the tree to have nodes in the format 1,2,3,4 rather than 1,2,4,8 etc. I can't create the nodes in a loop as there would be two ...
5
votes
1answer
70 views

Concatenating files created with filecontents

I am creating a large number of data files "on the fly" using the filecontents package. I need to be able to concatenate these files in various permutations For example in the MWE below, I would ...
2
votes
1answer
285 views

filecontents can't update my bibliography database

It seems that when I modify the content of filecontents, it will not update the corresponding files auotmatically by compiling. Here is an simplified example: \documentclass{amsart} ...
1
vote
0answers
89 views

Deleted Main.bib using filecontents while trying to enter citation involving mathematical treatment [closed]

Ok. I feel pretty stupid but I was trying to find a solution to using mathematics in bibliography. I ended up using the following example in this forum that used filecontents. Help with math symbols ...
1
vote
1answer
212 views

Enumerate pattern: 1, 1, 2, 2, 3, 3, … , etc

This is a follow-up question to \include on every other page?. I went with what the best answer suggested and surrounded each question and answer by \begin{filecontents}{some title} and ...
8
votes
1answer
92 views

filecontents replaces tabs with spaces

filecontents package replaces tabs with spaces. Is there any solution to preserve tabs in the generated file without changing the following code? \begin{filecontents*}{textWithTabs.txt} Aa Bb ...
10
votes
1answer
475 views

Make a “standalone” version of multiple files: all document in one .tex file

Disclaimer: this question is not related to the standalone package. When writing an article, I split the content between several files, to ease the versionning notably. At the time of writing, most ...
6
votes
1answer
88 views

\end{filecontents} and \input{} on the same line

This code generates output that shows contents of excerpt1.tex \documentclass{article} \usepackage{filecontents} \begin{document} Pragraph is starting. \begin{filecontents}{excerpt1.tex} Part that ...
0
votes
0answers
803 views

Biber, TeX Live 2013, and OS X 10.9 [duplicate]

This question is related to the question Tufte-Style Asides. I downloaded caesar_example.tex from Github sources and complied it from TeXShop. The output file caesar_example.pdf does not contain the ...
4
votes
1answer
4k views

Inline Bibliography [duplicate]

I know how to use a .bib file to add BibTex and use that in the main document. Is there a way I can include the bib-file in my latex document and not use an external bib-file?
5
votes
1answer
115 views

Using filecontents inside of xparse

I'm trying to reproduce this using xparse: \begin{filecontents}{sections/autogen/somefile.tex} % Line to auto-produce \begin{myotherenvironment} Do lots of stuff \end{myotherenvironment} ...
13
votes
2answers
234 views

Filecontents and newenvironment issue

I need to write some inlined code on an external file, then load it with listings. I would like to define a new environment, but if I do, filecontents does not save the first line of code (see MWE): ...
6
votes
1answer
291 views

filecontents* cannot write to file in Windows

With the following MWE: \documentclass{article} \usepackage{filecontents,hyperref,listings} \begin{filecontents*}{script.bat} @echo off echo "Hello, World!" pause \end{filecontents*} ...
11
votes
1answer
638 views

Can filecontents write an external file in a parent directory?

Reading Are there any disadvantages of TeX being Turing complete? got me thinking about the potential of .tex files for harbouring malicious code. The filecontents package is used to write external ...