I would like to use a script which is included in TeX Live called De-macro (link), this module is a bit old, the last update is from 2007 and it works with Python 2.7 I guess.
I tried to use it yesterday, so I followed the instructions :
- I created a file with some tex using macros called
ideas.tex
. - I included
\usepackage{rmsmacros-private}
in this file. - I created a file called
rmsmacros-private.sty
with my macros. - Then I used the script and I did
de-macro ideas.tex
- The script told me that all is ok and created
ideas.db
andideas-clean.tex
- All seemed to be okay.
But finally, when I opened ideas-clean.tex
which should had all my macros expanded, finally just the line \usepackage{rmsmacros-private}
has been erased and nothing else had been changed.
So do someone has this script working or does this script not working anymore?
Thank you in advance for your help.
My code is available here : https://we.tl/t-gT3UMxOfyu
de-macro
, I get a syntax error (most likely it was written for Python2 and fails on Python3, will not look into it).\def
s in you.sty
file, which are not compatible withde-macro
. From its documentation: "Only newcommand, renewcommand, newenvironment, and renewenvironment are understood"\def
with the fresher\newcommand
, for most of your commands it should be straight forward. Also, maybe you could just copy-paste the code from.sty
into the header of your.tex
, if you want to make your file portable?\usepackage{rmsmacros-private}
, but the package is calledtestmacro-private.sty
, sode-macro
does not find your definitions. Rename your file! python: The code seems to be written for python 2.5, and thus raises a string as an exception, which was removed from python 2.6+. But as long as there is no exception is to be raised, you are good with python 2.7...