The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
3answers
158 views

How to read a character one by one from an external file, modify it, and save it back to another external file?

The purpose of this question is to learn how to read character by character of a fetched line of characters, modify it and save back to another file. For the sake of simplicity, let's take a simple ...
4
votes
1answer
44 views

Listings WriteFile adds additional line if content contains two spaces between words

I use the listings latex package to write/read the environment body to a file. But if in the environment are two spaces between some words, there is an additional linebreak added at the beginning (I ...
10
votes
3answers
254 views

Space after command with \write

I did not see this question yet, correct me if there is. It's not the usual problem of adding a space after a command. It's more specifically when writing to a file. For some reason the same method ...
4
votes
1answer
239 views

How to copy contents of one file to another?

So I have a .txt-file and I need to import the data line per line. That works like it should. I need however to adapt the contents loaded into a command an write it to another .txt file that later ...
4
votes
2answers
312 views

Accent characters incorrectly written external file

I tried to write some strings in an external file for use in a special type of index, but using utf8 accented characters appear wrong. In my external file, those characters appear in the same way as ...
4
votes
1answer
97 views

listing's lst@BeginWrite gobbles '->' and '=>' from input

I'm trying to write a package that takes verbatim input and appends it to several files. My current approach is based of off an answer by Martin Scharrer to a similar problem. The difficulty arises in ...
8
votes
1answer
333 views

Help wanted on \openout, \write and \closeout

Is there a way to test if a token is already associated with a writer? Something like this: \def\do@write#1{% \immediate\write\mywriter{something: #1}% } \def\@writesomething#1{% ...
14
votes
2answers
464 views

Write environment body verbatim to a file

How can one write the body of an environment verbatim to an external file. I tried the following but get problems if the body contains undefined macros (error) or e.g. a % (disappears in the output). ...
9
votes
3answers
229 views

How can I write % into a file?

How can I write % into an auxiliary file? % will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and \% will write \% into the file. How ...
0
votes
1answer
444 views

Is it possible to change jobname from within the input file? [duplicate]

Possible Duplicate: How to influence the name of the pdf file created with pdfLaTeX (from within the source code)? I have a template as follows. % template.tex \documentclass{article} ...
5
votes
1answer
361 views

How to append data to a temporary file?

I want to create a new temporary file (named main-temp.tex), append data to it multiple times, and import the contents later. I haven't learnt how to use TeX file operation, both reading and writing. ...
2
votes
0answers
114 views

How to automatically increase the number of \write registers? [duplicate]

Possible Duplicate: Making efficient use of \writes I am trying to compile a document that heavily uses PGF/TikZ externalization as well as a table of contents, list of figures, etc. I am ...
6
votes
1answer
300 views

Could you give me a working, dangerous LaTeX input file to test the vulnerability of my server?

I have an IIS web server on which I installed Miktex distribution. I host a site that allows users to submit LaTeX input codes. The server then compiles the input using pdflatex.exe to produce a pdf ...
6
votes
1answer
685 views

How to write the \columnwidth to an external file

Some figures in my LaTeX document I am generating with Python. Normally I manually check how wide my picture can be with \showthe\columnwidth and adjust the image width accordingly. (This whole is ...