The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
4answers
534 views

Why is LaTeX always divided in two programs?

If we want to write a document using LaTeX, whatever is our operational system, we need to download two programs, for example, WinShell and TexWorks. Why can't we use one single program?
6
votes
1answer
28 views

Write reference of linenumber to file

I want to write the actual linenumbers that a \lineref command generates into an external file. The lines are referenced correctly (after 2 times compiling), but the writing to a file does not work. ...
3
votes
1answer
84 views

A templating system in LaTeX

I need to generate quite a few LaTeX files in an automated way. I do not want to use any templating engine in Python or Elisp (two languages I'm probably most comfortable with); I'd prefer to do it ...
3
votes
1answer
36 views

Replacing some macro tokens in a list before \write ing

I'm trying to hack a bibliography package (amsrefs), and fall into the following problem. I'm trying to convert the amsrefs format back to .bib files. This doesn't quite work, because strings get ...
4
votes
1answer
32 views

Using \newcommand with \write\@auxout inside

I have read some related posts but still cannot resolve the problem with \newcommand{\myLabel}[2]{\makeatletter\write\@auxout{\string\newlabel{#1}{{#2}{\thepage}}}\makeatother} I would like to ...
5
votes
0answers
141 views

TeX engine can't write on hidden aux files in Windows

To make my latex folder clean, I tried to hide all auxiliary files with the following DOS command: attrib +S +H *.aux ...... attrib +S +H *.toc But when I tried to compile my latex file again, ...
4
votes
2answers
80 views

Generate file write handles on the fly

I am experimenting a little bit with automatic generation of file handles via \newwrite. I want to achieve following behaviour: A user provides a list of file categories, for example Hints, ...
4
votes
0answers
62 views

Difference between morewrites and scrwfile

I have tested morewrites and scrwfile in my template which uses so many writes that without loading any of those packages I would run into the no room for new \write problem. I find that with ...
7
votes
1answer
252 views

debug No room for a new \write problem

I have a template with an extensive documentation. (See TemplateDocumentation.pdf). It compiled several month ago. Now with updated packages it does not compile anymore because of the famous No room ...
9
votes
2answers
174 views

Adding newlines while writing text to a file

Within a custom command, I'm doing the following to write to a file: \newcommand\mycommand[1]{ \newwrite\file \immediate\openout\file=foobar.tex \immediate\write\file{ foo bar #1 ...
2
votes
0answers
178 views

Alternative to Morewrites [closed]

Is there an alternative to morewrites? Using the glossaries package for different types of lists, as well as lstlisting package has put me over the maximum writes number, however, I cannot seem to ...
7
votes
1answer
179 views

Writing \\ to a File

I have a local class that a number of people use. One of the new things I want it to do is write out various user-defined data to a file, so that a follow-up LaTeX document can do something ...
6
votes
1answer
57 views

How many times is “align” processed?

Consider the following MWE which writes the word "Cat" to a file. \documentclass{article} \usepackage{amsmath} \begin{document} \newwrite\datei \immediate\openout\datei=Beispiel.txt \begin{align*} ...
5
votes
1answer
380 views

At which point does \immediate\write write to file?

Assume I have opened a file myfile and write to it with \immediate\write\myfile{My cat is too old} I have multiple such statements in my document and do calculations in between which influence the ...
3
votes
1answer
78 views

Modify the stored value of enumeration in output file

This question is in reference to a previous question: Write the value of enumerate to output file. I would like to take the solution one step further, but I couldn't get it to work. ...
8
votes
1answer
539 views

Write the value of enumerate to output file

I would like to save the present value of an enumeration into an output file. Using information from another question I have the following minimal example: \documentclass{article} ...
9
votes
3answers
286 views

Write on a file and input it

I'm trying to redefine a \tableofcontents-like command. I proceed this way : the displayed elements are written to a file, and the file is input when I want the display. If I know the toc will be ...
8
votes
1answer
113 views

Is there any side effect in using \immediate in the definition of \protected@write?

In latex.ltx, \protected@write is defined as: \long\def \protected@write#1#2#3{% \begingroup \let\thepage\relax #2% \let\protect\@unexpandable@protect ...
10
votes
1answer
139 views

How to write the € symbol into a file, when using Package [utf8]{inputenc}

With the following MWE, I can write the € symbol into the file euro.txt \documentclass{article} \newwrite\tempfile \immediate\openout\tempfile="euro.txt" \begin{document} Write Euro symbol into a ...
6
votes
2answers
252 views

How to redefine commands and environments, and make them acceptable for `\write`

My general problem is the following. I want to "convert" many .tex files into some other format (xml-like). I don't want to modify the tex files, I can only build a documentclass. The texfiles are ...
3
votes
2answers
461 views

Difficulty with \write

I have a macro \Content wich contains several occurence of a macro \comm. The latter increases a counter a displays the value of the counter. Calling \Content gives the correct output. But i want to ...
7
votes
2answers
682 views

How to output a tabulation into a file

With the commands \openout and \write I output text into a file. How can i output a tab ? \documentclass{article} \begin{document} \newwrite\tempfile \immediate\openout\tempfile="filename.txt" ...
7
votes
2answers
2k views

How to use an underscore in a filename

With the commands \openout and \write I output text into a file. I want this file to have a name of containing an underscore (eg. name_01.txt), but I'm unable to get the underscore in the filename. My ...
15
votes
3answers
1k views

Writing { and } to a file with LaTeX

How can the special characters { and } be written literally to an external file in LaTeX, without being balanced? Obviously the following does not work: \immediate\write\my@outfile{{} ...
4
votes
2answers
623 views

write macro parameter character to file (#)

During pdfLaTeX processing, I'm writing a string of key-value pairs to an external file. Sometimes the value will contain \# and I want only the # to be written to the file. Here is my code which ...
8
votes
4answers
1k views

How to write a command to file

I am trying to write to a auxillary file using \newwrite\tempfile [...] \immediate\openout\tempfile=list.tex \immediate\write\tempfile{Text to write to file} \immediate\closeout\tempfile It works ...
7
votes
4answers
1k views

How to use a \write command inside a \newenvironment ?

I'd like to make a new environment which would store its content in a file, so that I can read that file at another part of the document. More specifically, I want to have an environment {proof} such ...
6
votes
2answers
1k views

“Illegal parameter number” errors, in a macro for writing macro definitions to a file

Problem. I'm trying to write a command similar to \newcommand, but I'm having problems with illegal parameter numbers: for reasons that I can't fix out, it's asking me to use parameters of the type ...
12
votes
4answers
1k views

Making efficient use of \writes

I'm currently trying to compile my thesis using LaTeX and have run up against the old ! No room for a new \write . problem. After some googling it seems the only way to actually resolve this problem ...
10
votes
3answers
883 views

`\write` non-printable ASCII characters to a file

\immediate\write\SomeStream{x} writes x to the file open in \SomeStream. I would like to write non-printable ASCII characters, such as ``, to a file. My naive guess is \begingroup %To keep ...
6
votes
3answers
496 views

Spurious newline in \write

When I \immediate\write\somefile{foo}, TeX writes foo to the file open in the output stream \somefile, but it also goes to the next line. (The resulting file has 4 bytes.) Since I am writing files ...
5
votes
2answers
347 views

Processing the body of an environment multiple times

Dear all, I am new to package writing (LaTeX2e) and to this forum, and I probably read to much of the TeXBook and not enough on LaTeX. My package works, except that verbatim is verboten. Given a user ...
9
votes
3answers
553 views

What are the right rites to \write right now?

(with apologies for the title) I've just entered the murky waters of trying to get one LaTeX file to write out something useful as it goes along. In brief, I want my lecture LaTeX file to be able to ...