Skip to main content

Questions tagged [write]

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

4 votes
2 answers
163 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
  • 1,028
7 votes
1 answer
168 views

I’d like to have a solution environment that does the following: It writes the contents of the environment to an external file \jobname.py. All the solutions should be in the same file \jobname.py. ...
Colas's user avatar
  • 7,654
3 votes
1 answer
120 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
  • 893
1 vote
2 answers
114 views

I am trying to generate random fractions and write their simplification to an external tex file using the code below. But, il only repeats the last one several times. Is there a why to write each ...
user389050's user avatar
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,055
3 votes
2 answers
90 views

I have a document that typesets some data, but also writes it to a csv file using \write. The data includes UTF8 characters. As a convenience, it should be possible to open the csv file under Windows ...
gernot's user avatar
  • 52k
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
4 votes
2 answers
258 views

Please consider the MWE below. This is a simplified version of a large project. I need to create an enumerated list that is generated dynamically during runtime. This list is included at some later ...
Masroor's user avatar
  • 18.6k
0 votes
0 answers
114 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,072
0 votes
1 answer
57 views

I am making a function that should write its argument to a file (for further processing by Python) From the following question I get something that mostly works. Adding newlines while writing text to ...
Atnas's user avatar
  • 537
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
4 votes
2 answers
226 views

\documentclass{article} \usepackage{lipsum} \newwrite\foo \openout\foo=foo.foo \begin{document} \immediate\write\foo{A} \immediate\write\foo{B} \lipsum \immediate\write\foo{C} \lipsum \immediate\...
Ray's user avatar
  • 165
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
2 votes
2 answers
178 views

I am confused about how expansion works in \addtocontents, or more precisely in \protected@write. As I understand it, \addtocontents should essentially expand its second argument with \protected@edef ...
mbert's user avatar
  • 12.1k
6 votes
2 answers
625 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

15 30 50 per page
1
2 3 4 5
12