TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's function is using the wanted text to replace specified text in .tex file.

share|improve this question

closed as unclear what you're asking by Joseph Wright Aug 12 '13 at 20:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Do you mean something like "Find and Replace"? – John Wickerson May 19 '13 at 9:03
@John Wickerson Yes. It can handle a multi-replace mission between \begin{document} and \end{document}. – cowkileg May 19 '13 at 9:13
There're indeed such packages for strings. e.g. xstring. But I think you should use a text editor to do such things. – Leo Liu May 19 '13 at 9:17
To do complex simultaneous find-and-replace operations, I would recommend a text editor like Emacs. It allows you to use regular expressions to describe the replacement task. There's quite a learning curve, but it's ultimately very powerful once learnt. – John Wickerson May 19 '13 at 9:23
@cowkileg Is your goal to produce a new .tex file with some replacements performed, or is it to do some replacements on the fly, on, say, the argument to a macro you define? In the first case you are probably better off using an external tool, in the second, packages like xparse or l3regex can be of use. We need to have a better idea of what exactly you want to achieve and (if relevant) why you don't simply write the TeX file with the replacements (perhaps performed externally). – Bruno Le Floch May 19 '13 at 10:42

Browse other questions tagged or ask your own question.