1

This question already has an answer here:

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

\documentclass[a4paper,10pt,english]{article}
\usepackage{amsfonts}
\newcommand{\bN}{\mathbb{N}}
\newcommand{\bZ}{\mathbb{Z}}
\begin{document}
$\bN$ and $\bZ$ are closed under the operation of addition  
\end{document}

I want the content to be converted to

   $\mathbb{N}$ and $\mathbb{Z}$ are closed under the operation of addition  

Remark: I know that I can do this using find/replace in the editor. Here, I am asking about other possibilities.

Best regards

marked as duplicate by Sean Allred, Robert, ChrisS, Adam Liter, dustin Apr 5 '14 at 5:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What you're asking for is in fact impossible in the general case; expansion is a decently complicated topic with regard to TeX. There is certainly a question on this site that addresses this idea fully, but I'm on mobile and unable to find it. (I know for a fact that I've asked one about this myself; I believe it was a duplicate even then.) – Sean Allred Apr 5 '14 at 3:58
  • 1
    Possible duplicates: tex.stackexchange.com/q/3174/7674 and tex.stackexchange.com/q/67709/7674 – Robert Apr 5 '14 at 3:58

Browse other questions tagged or ask your own question.