0

In my code, I use this command :

\newcommand{\boldstraightmath}[1]{\bm{\mathrm{#1}}}

The problem is that Mathtype does not recognize specific (or customized) command such as \boldstraightmath. For example, the following equation is not well translated by mathtype recognize only classic Latex functions.

\boldstraightmath{C}_i(\boldstraightmath{q})=\mathrm{exp}(\boldstraightmath{Y}_1q_1)\cdot \mathrm{exp}(\boldstraightmath{Y}_2q_2)\cdot ...\cdot \mathrm{exp}(\boldstraightmath{Y}_iq_i)\boldstraightmath{A}_i

Consequently, I need to transform the command \boldstraightmath and coming back to initial definitions with classic functions such as: \bm{\mathrm{C}}. Is there a way to come back to my original code without newcommand? I need a better thing than find/ replace \boldstraightmath by \bm{\mathrm{A+}}

Imran
  • 3,096
  • 1
    if thee system you are using doesn't understand tex defintions you can not solve it from tex so you will need to just replace the command using your editor – David Carlisle Sep 07 '21 at 09:18
  • @DavidCarlisle ok but how can i do a smart find/ replace operation which works with a function ? in a editor like notepad++ for example – Bendesarts Sep 07 '21 at 09:20
  • That is an editor specific question so not clearly related to tex or this site, but I'm sure notepad++ will have a regular expression replace – David Carlisle Sep 07 '21 at 09:22
  • 2
    incidentally why are you using \bm{\mathrm{C}} that is just a slow and complicated way get \mathbf{C} – David Carlisle Sep 07 '21 at 09:24
  • There are some approaches described in https://tex.stackexchange.com/questions/67709/is-there-a-script-that-reads-a-tex-file-and-replaces-every-instance-of-a-newcom. But indeed \mathbf{} seems simpler. – Marijn Sep 07 '21 at 20:59
  • See also https://tex.stackexchange.com/questions/604051/de-macro-has-no-effect/604086. – Marijn Sep 07 '21 at 21:02

0 Answers0