[Python] Replace all customize command defined by \newcommand with full commands by using...

Discussão em 'Python' iniciado por Stack, Setembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I'm used to using a lot of custom commands when writing LaTeX. Like this

    \newcommand{\blim}[1]{\lim\limits_{#1}}
    \newcommand{\bsum}[2]{\sum\limits_{#1}^{#2}}


    Recently, I was asked to abandon this custom command in papers. Is there a way to restore them to the way they used to be. For example \newcommand

    $\blim{x \to x_{0}}$
    $\bsum{k=1}{n}$


    should be replaced by

    $\lim\limits_{x \to x_{0}}$
    $\sum\limits_{k=1}^{n}$


    I've tried using de-macro package in LaTeX and this one doesn't work.

    Here are some similar questions that I can find in the past but are still unresolved. I've tried pretty much all of the methods offered by all of these questions, but they don't work very well for my needs.


    Maybe what I need is a Python program that I'm familiar with, rather than perl or sed like the other answers mentioned in the other answers (I've tried them all and failed, probably because I'm not familiar with them)

    Continue reading...

Compartilhe esta Página