[OS X TeX] Running out of \write's while building a grouped-by-chapter symbol index
Ross Moore
ross.moore at mq.edu.au
Sat Jun 26 18:54:28 EDT 2021
Hi George,
On 27 Jun 2021, at 7:41 am, George Tourlakis <gt at cse.yorku.ca<mailto:gt at cse.yorku.ca>> wrote:
Hello Ross, thank you.
What package(s) are you using to handle creation of the Glossary?
Rather unsophisticated (meaning “simple”): I use “imakeidx” and \index[sym i]{…} records a math symbol or expression (“…” is the placeholder for that) that I want to include. The “i” in "sym i” is specific to the chapter (in my case i=0,1,…,15) where the expression or symbol is recorded.
I bumped into the package “morewrites”. Using it made the problem go away.
That’s great, that it worked for you.
I do not not know exactly what the LaTeX \write command does but apparently it is called by the compiler
\write is the command that causes information to be sent to a buffer, to later be written into a file.
\newwrite is the command that allocates the buffer and associates it with the filename on disk.
and there is a quota on how many it can call (anyway, that is how I picture it).
The limit is on the number of buffers.
The morewrites package expands the quota apparently. In my case it worked!
No, it doesn’t give you more buffers.
It just allows the existing limited number of buffers to be used more effectively.
e.g., instead of immediately writing to the buffer, it stores the information
in a macro expansion, or perhaps in a token-list.
Then at the end of your document the contents of these macros (or token-lists)
are each sequentially written into a single buffer and flushed into the correct file.
The *same* buffer is used for *all* the files, one at a time.
This places a greater memory requirement on your TeX program.
But usually there is plenty available, and there is a parameter you can adjust
to give more (indeed, much more) should you require it.
This does *not* require recompilation of tex nor rebuilding the format (.fmt) files.
If using morewrites helps, then great; as I said above.
I mention the Glossaries package, since this gives an extra
really great feature for indexes and glossary items.
Namely, for each usage of an indexed item you can have a hyperlink to
its location on the Index/Glossary page.
That is, click on the item, then you go to the page where you have defined
its purpose or usage. Then click the back-view arrowhead to return to where you were.
That’s what the hyperlink gives you, traditionally.
But on the Mac, (with Preview and Skim) there’s an even better feature.
Just hover over the link and you get a popup of a view of that item in the glossary page.
Similarly in the Glossary page you can have hyperlinks to (the page) where the \index
(or \gls ) entry occurred.
The following images show these features at work in a document that I’m currently working on.
[cid:03990E9E-C716-4172-B0AD-B10086220F51 at modem]
(There’s a blank rectangle in that first image, which is where a small text-popup occurs,
telling you which page the hyperlink target is on.
See how the mouse is over “Atlantic Sea Scallops” (in a wide table turned sideways).
The popup shows the Glossary page with an image of a scallop.
The 2nd image shows that Glossary page, with the mouse hovering
over a link to the page where the acronym is used, as a whole chapter
devoted to a particular fish species at a particular fishing ground.
This snapshot image caught the textual popup as well.
[cid:348C8E43-E9B7-4919-95BE-77101C448183 at modem]
I’ve just given you a preview of part of my upcoming talk at (online) TUG 2021.
Coincidentally, I was chatting to a couple of physicists at my uni, a few days ago.
One of them knew I was working a lot with LaTeX, and I told them a bit
of what I was doing. The other suggested that it would be great to have popups
for each variable usage, which would avoid the need to be constantly trying
to find where the variable was defined or assigned a value.
This is exactly what these popups, using glossaries features, can do!
Hope this helps.
Ross
Cheers,
George
On Jun 26, 2021, at 4:51 PM, Ross Moore <ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>> wrote:
Hello George,
What package(s) are you using to handle creation of the Glossary?
If glossaries.sty then there is a savewrites=true option that can be used.
Give it a try.
In your case the idea is that you will need to use the same write channel for each chapter.
You must not issue the TeX \newwrite command more than once.
You may need to consult the documentation to get everything working correctly; e.g. using a different type for each chapter.
Hope this helps.
Ross
On 27/06/2021, at 5:40, "George Tourlakis" <gt at cse.yorku.ca<mailto:gt at cse.yorku.ca>> wrote:
Hi folks,
I have encountered an unfamiliar (to me) problem:
I am wrapping up a text book project. Creating a single symbol index was easy but useless, as symbols were listed randomly (vis a vis page numbers).
So I turned to a by-chapter symbol index (but still one that is placed at the end of the book, the symbols grouped by chapter). This time compilation halts with a "too many \write’s" error message. (I have 16 chapters, 0-15; if I try to print a by-chapter index for the first 7 or so chapters only, then I am OK).
Any suggestions for a workaround?
Thanks,
Cheers
George
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq<http://www.tex.ac.uk/faq>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/<https://sites.esm.psu.edu/~gray/TeX>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<http://dir.gmane.org/gmane.comp.tex.macosx>
https://email.esm.psu.edu/pipermail/macosx-tex/<https://email.esm.psu.edu/pipermail/macosx-tex>
TeX on Mac OS X Website: http://mactex-wiki.tug.org/<http://mactex-wiki.tug.org/>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<https://email.esm.psu.edu/mailman/listinfo/macosx-tex>
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq<http://www.tex.ac.uk/faq>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/<https://sites.esm.psu.edu/~gray/TeX/>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<http://dir.gmane.org/gmane.comp.tex.macosx>
https://email.esm.psu.edu/pipermail/macosx-tex/<https://email.esm.psu.edu/pipermail/macosx-tex/>
TeX on Mac OS X Website: http://mactex-wiki.tug.org/<http://mactex-wiki.tug.org/>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<https://email.esm.psu.edu/mailman/listinfo/macosx-tex>
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955 | F: +61 2 9850 8114
M:+61 407 288 255 | E: ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>
http://www.maths.mq.edu.au
[cid:image001.png at 01D030BE.D37A46F0]
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.
This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>
<http://mq.edu.au/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210626/9e2fc49e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SeaScallops.png
Type: image/png
Size: 346721 bytes
Desc: SeaScallops.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210626/9e2fc49e/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sectionmark.png
Type: image/png
Size: 374189 bytes
Desc: sectionmark.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210626/9e2fc49e/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210626/9e2fc49e/attachment-0005.png>
More information about the MacOSX-TeX
mailing list