21 questions linked to/from LaTeX macro expander
314 views

### Expand all \newcommand without doing anything else in LaTeX? [duplicate]

Can I expand all \newcommands without doing anything else in LaTeX? Edited: My true goal is standardizing math papers in plain text so that theorems and definitions can be accurately and easily ...
133 views

### Is there a way to partially evaluate TeX files? [duplicate]

I am looking for tools or techniques that can partially evaluate (e.g. inline definitions) a TeX source file into an equivalent, simplified TeX file with some parameters fixed. Specifically I would ...
101 views

### Can TeX produce an expanded TeX as an output format similar to PDF? [duplicate]

I am looking at TeX as an output format similar to PDF that describes the page sufficiently, but with all tokens resolved (more like going from Postscript to PDF). This format should also indicate all ...
79 views

### Replacing all custom macros and standardizing papers written in TeX [duplicate]

I would like to be able to replace every single user-defined macro in papers written in TeX by its definition. That is, if TeXing is considered to be a function f and my standardizing script is ...
58 views

### how to expand some macros in latex file [duplicate]

I have a latex file that uses some of my own macros (a mix of tex & latex macros). I need to post the latex source, but don't want to expose the macros (some of which are nasty hacks that just get ...
43 views

### replacing macros parameters by its definition [duplicate]

Usually, I use many macros in my documents to save time. I am searching for clever "ideas, methods, tools" which can replace macros by its definition. For example, if we have a the following document ...
31 views

### How to extract expanded equations that use commands? [duplicate]

I have a document with a lot of equations that use commands to maintain consistency. For example, it looks like this \documentclass{article} \usepackage{amsmath} \newcommand{\numberOfDocuments}{\...
2k views

### Is there a script that reads a TeX file and replaces every instance of a \newcommand?

I'd like to know if there's a script that reads a .tex file and replace every instance of a non-standard TeX command with whatever it is replacing. I am not sure if what I want is clear but let me ...
6k views

### Submitting a journal article as a single tex file

Although many academic journals readily accept submissions in some format of TeX, indeed some enlightened ones insist on it, it is rare that one can simply send exactly the same document that one has ...
303 views

### List (at run time) the macros that are currently defined

TeX of course knows at any time what control words and symbols are defined. Is it possible to access this information, for example at the end of a run? Edit: the answer for pdfTeX is no, since the ...
2k views

### Convert from LaTeX to Plain TeX

Is there a way to convert a LaTeX document, which uses a lot of packages and macros, into Plain TeX, such that all macros are expanded and all dependencies on external packages are gone?
3k views

### Is there a LaTeX/TeX preprocessor/inliner that replaces only selected macros with their definitions?

I have the following situation: Like most LaTeX users that write much, I have my own header files where the packages I use normally are required and the macros I use often are defined. So if I write ...
257 views

### Automatically Adding Potentially Referenced Macros From Auxillary File

In this question someone asked if there was any way to eliminate user defined macros from a TeX document and replace them with the appropriate primitives. The answer seemed to be that while some ...