Linked Questions

0
votes
1answer
211 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 ...
2
votes
0answers
130 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 ...
2
votes
0answers
98 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 ...
0
votes
0answers
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 ...
0
votes
0answers
56 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 ...
1
vote
0answers
40 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 ...
0
votes
0answers
28 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}{\...
40
votes
5answers
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 ...
38
votes
3answers
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 ...
12
votes
3answers
302 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 ...
8
votes
1answer
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?
9
votes
1answer
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 ...
4
votes
3answers
248 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 ...
4
votes
1answer
466 views

Are there any programs that will attempt to preprocess simple LaTeX?

I find myself in the awkward, although apparently not uncommon, position of being ordered to write, or at least end up with, documentation in the Word format. I don't have anything that fancy in my ...
3
votes
0answers
360 views

looking for selective latex command replacement methods

I have a perl script for generating wordpress (or physicsforums or wikipedia) style latex markup from standalone latex files, but it has grown into a bit of a monstrosity and has also recently met it'...

15 30 50 per page