GeneralPackage To Store \gdef Definitions In An External File

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
kurttodoroff
Posts: 27
Joined: Thu Feb 07, 2019 4:25 pm

Package To Store \gdef Definitions In An External File

Post by kurttodoroff »

I want LaTeX to write the document \gdef{} commands and corresponding replacement text (or, its equivalent package command data) to an external file, similar to how it writes \label{} data to the auxiliary file.

This would allow me to use the \gdef{} definition in a document location that occurs before the definition occurs, similar to \label{} and \ref{}.

I prefer to avoid using \newcommand for the lengthy technical definitions in this document, insofar as it is simpler and more convenient to place the \gdef{} at the location of primary usage, than to place the \newcommands in the preamble.

For example, I would define the inertial navigation system outputs, in the INS section. Other sections, preceding and superseding this section, would use this language. Definition management is simplified by locating the \gdef{} in each corresponding section.

Is such a package available?

Thank you.

Kurt

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply