How to redefine the exponent command The Next CEO of Stack OverflowWhen to use edef, noexpand,...

Horror movie/show or scene where a horse creature opens its mouth really wide and devours a man in a stables

Increase performance creating Mandelbrot set in python

How to count occurrences of text in a file?

Can I equip Skullclamp on a creature I am sacrificing?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

Are there languages with no euphemisms?

Is HostGator storing my password in plaintext?

Grabbing quick drinks

How can I quit an app using Terminal?

How should I support this large drywall patch?

Why does C# sound extremely flat when saxophone is tuned to G?

How to write the block matrix in LaTex?

Why here is plural "We went to the movies last night."

WOW air has ceased operation, can I get my tickets refunded?

Why did we only see the N-1 starfighters in one film?

Text adventure game code

Why does standard notation not preserve intervals (visually)

How to understand which control sequence in undefined in "Undefined control sequence." message?

Go Pregnant or Go Home

What's the point of interval inversion?

Unreliable Magic - Is it worth it?

Why do professional authors make "consistency" mistakes? And how to avoid them?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?



How to redefine the exponent command



The Next CEO of Stack OverflowWhen to use edef, noexpand, and expandafter?How can I redefine the verb|…| command?How to redefine an existing command using futurelet scanning for number and type of parameters?Why does TeX remove braces around delimited arguments?Redefine existing commandTrouble Defining a LaTeX CommandHow to redefine a command using DeclareMathOperatorRedefine LaTeX commandUse newcommand in newenvironment - content of environment is argument of newcommandRedefine Citation Command












0















I prepare a package that defines a special environment, let us call it myenv, and within the myenv a command, let us call it mycom that stacks its arguments the one above the other. So mycom{x}[y] stacks x above the optional y (if y is not given the command considers y to be {}).



In myenv math makes no sense so I want to simplify the typing by writing y^x (or {y}^{x}) in textmode to mean mycom{x}[y].
When the myenv closes the meaning of ^ must return to normal.



How can I do this?









share























  • You mean mycom{x}[y] to give x above y or vice versa?

    – JouleV
    5 mins ago
















0















I prepare a package that defines a special environment, let us call it myenv, and within the myenv a command, let us call it mycom that stacks its arguments the one above the other. So mycom{x}[y] stacks x above the optional y (if y is not given the command considers y to be {}).



In myenv math makes no sense so I want to simplify the typing by writing y^x (or {y}^{x}) in textmode to mean mycom{x}[y].
When the myenv closes the meaning of ^ must return to normal.



How can I do this?









share























  • You mean mycom{x}[y] to give x above y or vice versa?

    – JouleV
    5 mins ago














0












0








0


1






I prepare a package that defines a special environment, let us call it myenv, and within the myenv a command, let us call it mycom that stacks its arguments the one above the other. So mycom{x}[y] stacks x above the optional y (if y is not given the command considers y to be {}).



In myenv math makes no sense so I want to simplify the typing by writing y^x (or {y}^{x}) in textmode to mean mycom{x}[y].
When the myenv closes the meaning of ^ must return to normal.



How can I do this?









share














I prepare a package that defines a special environment, let us call it myenv, and within the myenv a command, let us call it mycom that stacks its arguments the one above the other. So mycom{x}[y] stacks x above the optional y (if y is not given the command considers y to be {}).



In myenv math makes no sense so I want to simplify the typing by writing y^x (or {y}^{x}) in textmode to mean mycom{x}[y].
When the myenv closes the meaning of ^ must return to normal.



How can I do this?







macros





share












share










share



share










asked 6 mins ago









AntonisAntonis

111




111













  • You mean mycom{x}[y] to give x above y or vice versa?

    – JouleV
    5 mins ago



















  • You mean mycom{x}[y] to give x above y or vice versa?

    – JouleV
    5 mins ago

















You mean mycom{x}[y] to give x above y or vice versa?

– JouleV
5 mins ago





You mean mycom{x}[y] to give x above y or vice versa?

– JouleV
5 mins ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482061%2fhow-to-redefine-the-exponent-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482061%2fhow-to-redefine-the-exponent-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...