2

I am trying to figure out how to make changes automatically when I modify my results. I typically make tables and then I discuss my results multiple times in the body of the text in latex. The obvious problem I have is that every time I run a new iteration of my results I have to change my discussion of results in paragraphs and footnotes etc. Hence, I am looking for a way that I can change a number or phrase in a key place and then reference it else where in the text so that when I change it once, the new number or phrase is updated everywhere else. To be clear, I do not what to reference a table number, an equation or a matrix, I need to replicate exactly what I write in a key place and then feed the changes wherever I need. Example, if I write my great discovery is 1000'' in my introduction or in a table, I want the phrasemy great discovery is 1000'' to show wherever I need it to show elsewhere in the document.

Thanks.

1 Answer 1

2

TeX is a macro processor so doing what you describe is its main mode of operation.

\newcommand\keyphraseA{my great discovery is 1000}

...

\section{Introduction}
Blah blah \keyphraseA, blah blah...

...

\section{zzz}
In the introduction we stated \keyphraseA.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .