Skip to main content

Questions tagged [write]

{write} is about writing to files in TeX macros.

Filter by
Sorted by
Tagged with
2 votes
2 answers
67 views

MWE: \documentclass{article} \begin{document} \ExplSyntaxOn \iow_new:N \g__test_iow \iow_open:Nn \g__test_iow { test.pl } \iow_now:Ne \g__test_iow { \# } \iow_close:N \g__test_iow \ExplSyntaxOff \end{...
Grass's user avatar
  • 974
3 votes
1 answer
119 views

I have a token list that includes (at least) one non-expandable command (defined by \NewDocumentCommand) and want to write the result to a log file (lets assume the critical command generates ...
Matthias's user avatar
  • 883
0 votes
0 answers
43 views

I am currently trying to write a pair of commands, the first can be used repeatedly (with different arguments) and writes out to a file, the second inputs the file with some custom wrappings. This has ...
Jason's user avatar
  • 1,015
0 votes
0 answers
49 views

The following code renders a paper test and attempts to write out an answer file with the location of each answer, so an autograder can pick out each answer, scan it in and try to grade. The answer ...
Dov's user avatar
  • 1,625
0 votes
0 answers
113 views

I need to patch the macros \cref and \Cref so that when used like this: \cref{label1,label2,label3} besides generating the normal layout in the document, they write something like this to the .aux (...
Gabriele's user avatar
  • 2,052
2 votes
1 answer
159 views

I would like to export all the code fragments of a lectures book I wrote in a ordered tree structure as <chapter>/<section>/<some name or number>.<ext>. the code is in variuous ...
max's user avatar
  • 161
0 votes
0 answers
60 views

I have some LaTeX that's something like this: Donec id elit non mi porta gravida at eget metus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Morbi leo risus, porta ac ...
Circle B's user avatar
  • 123
6 votes
2 answers
623 views

Consider the following MNWE, which I'm compiling with pdfTeX: \documentclass{article} \usepackage{morewrites} \usepackage{memoize} \usepackage{tikz} \begin{document} \begin{tikz} \draw (0,0) -| (1,1)...
cfr's user avatar
  • 248k
-1 votes
1 answer
113 views

How can I write this type of "V" in latex
Memristor's user avatar
  • 119
0 votes
1 answer
69 views

Goal: Have an active character not expanded when writing to file MWE \documentclass{article} \makeatletter % == Package code -- untouchable \def\foo{\@ifnextchar[{\@foo}{\@foo[x]}} \...
aker's user avatar
  • 15
0 votes
0 answers
181 views

Imagine that \cite{webb2004oscillations}) and \citep{webb2004oscillations}) yield, respectively Webb and Owen, 2004 (Webb and Owen, 2004) When writing a paper, what is the best practice to cite this ...
sam wolfe's user avatar
  • 285
1 vote
0 answers
57 views

Objective A function that enables me to write custom log data. The result is the command \writeToLog (see MWE), which writes its input to the file log.txt. Issue In my actual document I'm using the ...
Steven's user avatar
  • 405
1 vote
2 answers
140 views

Here are some macros that I am trying to define (based on this question): \odef{foo}{bar} will define an "object" with name foo and value bar. \objRef{foo} will insert the value of the foo &...
Ben Zelnick's user avatar
6 votes
1 answer
307 views

We are writing a cls file that produces a text file as a side effect of running latex. This will be done in a cloud service within a docker container, so security is a serious concern. The output file ...
mccurley's user avatar
  • 179
0 votes
1 answer
151 views

I need to write contents from thebibliography environment (BixTeX/BibLaTeX are not used) to an XML file. Each bibliographic source should be in a separate pair of <reference> and </reference&...
Crosfield's user avatar
  • 109
0 votes
0 answers
137 views

I am trying to create a para id with page number as a separate file, through a command \def\paraopenid#1{\label{#1}\immediate\write\paraID{<ParaID="#1" StartPageNumber="\...
rcv's user avatar
  • 2,262
1 vote
1 answer
563 views

Is it possible to expand the \gls command in order to print it's "output" in a text file? Here a 'MWE.tex' file content: \documentclass{article} \usepackage{glossaries-extra} \...
zetyty's user avatar
  • 787
4 votes
1 answer
139 views

Took me all night (literally) to figure out. Compilation was failing one time out of two, with the following original error (line 12) : "Bad space factor (0)". That was crazy because ...
Vincent Krebs's user avatar
0 votes
0 answers
168 views

I encountered the need to write last name with initials (extracted from the full author's string based on first chars of first and middle name) into an external file. I use the xstring package to ...
Crosfield's user avatar
  • 109
3 votes
1 answer
199 views

I would like to use \immediate\write18 (encoded in the \OuputToFileA macro) to output a string containing a single quote. If I replace the single quote with another character, such as X \StrSubstitute{...
Peter Grill's user avatar
1 vote
1 answer
76 views

I am getting spurious text in the output of \immediate\write18 when the lineno package is used. The MWE below yields the following in the file foo.tex: If one comments out the line that includes ...
Peter Grill's user avatar
2 votes
1 answer
239 views

There are plenty of .txt files and I try to figure a way in Latex to merge all *.txt to one *.txt. I thought about \newread and \newwrite but I don't know if there is a better way or how to start. the ...
IH Pro's user avatar
  • 155
0 votes
0 answers
53 views

Is there any possibility to add Information to a .txt or other type of document? For example I have the following .tex \begin{filecontents*}{Info.tex} @ P & 1 & 60 & 2 & 77 \\ ...
IH Pro's user avatar
  • 155
1 vote
1 answer
79 views

I want a *.tex document that create a *.tex that content the following lines: \newread\NoFile \newcounter{AME} \openin\NoFile=V/AME.txt \read\NoFile to \AME \closein\NoFile so I looked up in the ...
IH Pro's user avatar
  • 155
1 vote
2 answers
83 views

I need to write to an auxfile some mathematical formulas. The following MWE does not work: \documentclass{article} \usepackage{amsmath} \newwrite\filehandle \newcommand{\addToFile}[1]{\immediate\write\...
Colas's user avatar
  • 7,654