Replace backtick ` with power ^ in math modeIs it catcode or catcode`?Append a token list to everymathIncluding .tex files that need a different style file than the main textHow to replace \ with \& in math mode?Using mathspec to change digits font in math mode isn't workingHow to change a single character font after writing long document?Redefining command outside math modeIs there a way to get “dumb” single quote in math mode?

How does the government purchase things?

Why don't sharp and flat root note chords seem to be present in much guitar music?

What can I do to keep a threaded bolt from falling out of it’s slot

How could China have extradited people for political reason under the extradition law it wanted to pass in Hong Kong?

Does Swashbuckler's Fancy Footwork apply if the attack was made with Booming Blade?

Would combining A* with a flocking algorithm be too performance-heavy?

If all closed subsets of a set are compact, does it follow that this set is subset of a compact set?

A second course in the representation theory

Something in the TV

Most practical knots for hitching a line to an object while keeping the bitter end as tight as possible, without sag?

What is the evidence on the danger of feeding whole blueberries and grapes to infants and toddlers?

Thread-safe, Convenient and Performant Random Number Generator

Can a group have a cyclical derived series?

The sound of thunder's like a whip

Should my "average" PC be able to discern the potential of encountering a gelatinous cube from subtle clues?

Can others monetize my project with GPLv3?

Why don't we use Cavea-B

How to avoid using System.String with Rfc2898DeriveBytes in C#

What does it mean to have a subnet mask /32?

Is a butterfly one or two animals?

How to determine if an Apex class hasn't been used recently

Why is 日本 read as "nihon" but not "nitsuhon"?

How to setup a teletype to a unix shell

Sleeping solo in a double sleeping bag



Replace backtick ` with power ^ in math mode


Is it catcode or catcode`?Append a token list to everymathIncluding .tex files that need a different style file than the main textHow to replace \ with \& in math mode?Using mathspec to change digits font in math mode isn't workingHow to change a single character font after writing long document?Redefining command outside math modeIs there a way to get “dumb” single quote in math mode?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I'd like to declare the backtick symbol ` to be the math operation power ^, so that by writing



documentclassarticle
usepackageamsmath
% DeclareMathSymbol`mathbinsymbols^
begindocument
$3`2$
enddocument


it is displayed
enter image description here



I was thinking to use DeclareMathSymbol<symbol><type><sym-font><slot> but I'm not sure there is a slot code for ^ since it is an operation rather than a symbol.



I'd like to avoid using newcommand because otherwise I will have to write 3`2 in order to get the power.










share|improve this question



















  • 3





    If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

    – Schrödinger's cat
    8 hours ago







  • 1





    Out of curiosity, why? Is it simply to avoid hitting the shift key?

    – Teepeemm
    8 hours ago











  • @Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

    – sound wave
    7 hours ago

















3















I'd like to declare the backtick symbol ` to be the math operation power ^, so that by writing



documentclassarticle
usepackageamsmath
% DeclareMathSymbol`mathbinsymbols^
begindocument
$3`2$
enddocument


it is displayed
enter image description here



I was thinking to use DeclareMathSymbol<symbol><type><sym-font><slot> but I'm not sure there is a slot code for ^ since it is an operation rather than a symbol.



I'd like to avoid using newcommand because otherwise I will have to write 3`2 in order to get the power.










share|improve this question



















  • 3





    If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

    – Schrödinger's cat
    8 hours ago







  • 1





    Out of curiosity, why? Is it simply to avoid hitting the shift key?

    – Teepeemm
    8 hours ago











  • @Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

    – sound wave
    7 hours ago













3












3








3








I'd like to declare the backtick symbol ` to be the math operation power ^, so that by writing



documentclassarticle
usepackageamsmath
% DeclareMathSymbol`mathbinsymbols^
begindocument
$3`2$
enddocument


it is displayed
enter image description here



I was thinking to use DeclareMathSymbol<symbol><type><sym-font><slot> but I'm not sure there is a slot code for ^ since it is an operation rather than a symbol.



I'd like to avoid using newcommand because otherwise I will have to write 3`2 in order to get the power.










share|improve this question














I'd like to declare the backtick symbol ` to be the math operation power ^, so that by writing



documentclassarticle
usepackageamsmath
% DeclareMathSymbol`mathbinsymbols^
begindocument
$3`2$
enddocument


it is displayed
enter image description here



I was thinking to use DeclareMathSymbol<symbol><type><sym-font><slot> but I'm not sure there is a slot code for ^ since it is an operation rather than a symbol.



I'd like to avoid using newcommand because otherwise I will have to write 3`2 in order to get the power.







math-mode macros






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 9 hours ago









sound wavesound wave

2035 bronze badges




2035 bronze badges










  • 3





    If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

    – Schrödinger's cat
    8 hours ago







  • 1





    Out of curiosity, why? Is it simply to avoid hitting the shift key?

    – Teepeemm
    8 hours ago











  • @Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

    – sound wave
    7 hours ago












  • 3





    If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

    – Schrödinger's cat
    8 hours ago







  • 1





    Out of curiosity, why? Is it simply to avoid hitting the shift key?

    – Teepeemm
    8 hours ago











  • @Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

    – sound wave
    7 hours ago







3




3





If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

– Schrödinger's cat
8 hours ago






If you want to live dangerously: documentclassarticle letoldbacktick` catcode``=active protecteddef`ifmmodeexpandafter^elseexpandafteroldbacktickfi begindocument $3`2$ a`b enddocument (see here).

– Schrödinger's cat
8 hours ago





1




1





Out of curiosity, why? Is it simply to avoid hitting the shift key?

– Teepeemm
8 hours ago





Out of curiosity, why? Is it simply to avoid hitting the shift key?

– Teepeemm
8 hours ago













@Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

– sound wave
7 hours ago





@Teepeemm Yes i know i'm lazy but i'm going to type thousands of ^, i solved with a small autohotkey script which prints ^ when i press NumLock

– sound wave
7 hours ago










1 Answer
1






active

oldest

votes


















6














All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-)



DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. The superscript happens in a much lower level in TeX. Usually, the ^ symbol has the category code (catcode) 7, which is a "superscript token". This means that whenever TeX sees a ^, it will make a superscript. At the simplest, you can have that effect by changing the catcode of a ` to 7:



documentclassarticle
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


however, the code above will raise a Missing $ inserted because now that ` is a superscript character, it is only meant to be used in math-mode. You can redefine ` to mean a "normal" (catcode 12) ` character:



documentclassarticle
renewcommand``
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


and then you won't be able to write a grave accent with, say, D'ej`a vu (the output will be "Déj‘a vu"). Plus, any code which relies on ` being a catcode-12 token will fail miserably.



A arguably better alternative is to make the ` an active character only in math-mode and define it equal to a superscript token:



documentclassarticle
catcode``=active
globallet`=^
mathcode``="8000
begindocument
$3`2$ and some `quoted' text
enddocument


the output is:




enter image description here




But again, this might break something, somewhere, which relies on ` being a catcode 12 token.






share|improve this answer




















  • 3





    Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

    – Schrödinger's cat
    8 hours ago






  • 2





    @Schrödinger'scat LOL! How could I miss that? :-)

    – Phelype Oleinik
    8 hours ago













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%2f504960%2freplace-backtick-with-power-in-math-mode%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-)



DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. The superscript happens in a much lower level in TeX. Usually, the ^ symbol has the category code (catcode) 7, which is a "superscript token". This means that whenever TeX sees a ^, it will make a superscript. At the simplest, you can have that effect by changing the catcode of a ` to 7:



documentclassarticle
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


however, the code above will raise a Missing $ inserted because now that ` is a superscript character, it is only meant to be used in math-mode. You can redefine ` to mean a "normal" (catcode 12) ` character:



documentclassarticle
renewcommand``
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


and then you won't be able to write a grave accent with, say, D'ej`a vu (the output will be "Déj‘a vu"). Plus, any code which relies on ` being a catcode-12 token will fail miserably.



A arguably better alternative is to make the ` an active character only in math-mode and define it equal to a superscript token:



documentclassarticle
catcode``=active
globallet`=^
mathcode``="8000
begindocument
$3`2$ and some `quoted' text
enddocument


the output is:




enter image description here




But again, this might break something, somewhere, which relies on ` being a catcode 12 token.






share|improve this answer




















  • 3





    Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

    – Schrödinger's cat
    8 hours ago






  • 2





    @Schrödinger'scat LOL! How could I miss that? :-)

    – Phelype Oleinik
    8 hours ago















6














All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-)



DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. The superscript happens in a much lower level in TeX. Usually, the ^ symbol has the category code (catcode) 7, which is a "superscript token". This means that whenever TeX sees a ^, it will make a superscript. At the simplest, you can have that effect by changing the catcode of a ` to 7:



documentclassarticle
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


however, the code above will raise a Missing $ inserted because now that ` is a superscript character, it is only meant to be used in math-mode. You can redefine ` to mean a "normal" (catcode 12) ` character:



documentclassarticle
renewcommand``
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


and then you won't be able to write a grave accent with, say, D'ej`a vu (the output will be "Déj‘a vu"). Plus, any code which relies on ` being a catcode-12 token will fail miserably.



A arguably better alternative is to make the ` an active character only in math-mode and define it equal to a superscript token:



documentclassarticle
catcode``=active
globallet`=^
mathcode``="8000
begindocument
$3`2$ and some `quoted' text
enddocument


the output is:




enter image description here




But again, this might break something, somewhere, which relies on ` being a catcode 12 token.






share|improve this answer




















  • 3





    Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

    – Schrödinger's cat
    8 hours ago






  • 2





    @Schrödinger'scat LOL! How could I miss that? :-)

    – Phelype Oleinik
    8 hours ago













6












6








6







All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-)



DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. The superscript happens in a much lower level in TeX. Usually, the ^ symbol has the category code (catcode) 7, which is a "superscript token". This means that whenever TeX sees a ^, it will make a superscript. At the simplest, you can have that effect by changing the catcode of a ` to 7:



documentclassarticle
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


however, the code above will raise a Missing $ inserted because now that ` is a superscript character, it is only meant to be used in math-mode. You can redefine ` to mean a "normal" (catcode 12) ` character:



documentclassarticle
renewcommand``
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


and then you won't be able to write a grave accent with, say, D'ej`a vu (the output will be "Déj‘a vu"). Plus, any code which relies on ` being a catcode-12 token will fail miserably.



A arguably better alternative is to make the ` an active character only in math-mode and define it equal to a superscript token:



documentclassarticle
catcode``=active
globallet`=^
mathcode``="8000
begindocument
$3`2$ and some `quoted' text
enddocument


the output is:




enter image description here




But again, this might break something, somewhere, which relies on ` being a catcode 12 token.






share|improve this answer













All of this is really not recommended, unless you really know what you are doing and/or is willing to suffer the consequences. In the words of Mr. Cat, this is "living dangerously", and you may end up being dead when someone opens the box ;-)



DeclareMathSymbol is used to select the glyph in a font which will be used to write a specific symbol on the paper. The superscript happens in a much lower level in TeX. Usually, the ^ symbol has the category code (catcode) 7, which is a "superscript token". This means that whenever TeX sees a ^, it will make a superscript. At the simplest, you can have that effect by changing the catcode of a ` to 7:



documentclassarticle
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


however, the code above will raise a Missing $ inserted because now that ` is a superscript character, it is only meant to be used in math-mode. You can redefine ` to mean a "normal" (catcode 12) ` character:



documentclassarticle
renewcommand``
catcode``=7
begindocument
$3`2$ and some `quoted' text
enddocument


and then you won't be able to write a grave accent with, say, D'ej`a vu (the output will be "Déj‘a vu"). Plus, any code which relies on ` being a catcode-12 token will fail miserably.



A arguably better alternative is to make the ` an active character only in math-mode and define it equal to a superscript token:



documentclassarticle
catcode``=active
globallet`=^
mathcode``="8000
begindocument
$3`2$ and some `quoted' text
enddocument


the output is:




enter image description here




But again, this might break something, somewhere, which relies on ` being a catcode 12 token.







share|improve this answer












share|improve this answer



share|improve this answer










answered 8 hours ago









Phelype OleinikPhelype Oleinik

32.6k7 gold badges56 silver badges111 bronze badges




32.6k7 gold badges56 silver badges111 bronze badges










  • 3





    Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

    – Schrödinger's cat
    8 hours ago






  • 2





    @Schrödinger'scat LOL! How could I miss that? :-)

    – Phelype Oleinik
    8 hours ago












  • 3





    Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

    – Schrödinger's cat
    8 hours ago






  • 2





    @Schrödinger'scat LOL! How could I miss that? :-)

    – Phelype Oleinik
    8 hours ago







3




3





Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

– Schrödinger's cat
8 hours ago





Hmmh, I was hoping that you would refer to my code as "cat code". ;-)

– Schrödinger's cat
8 hours ago




2




2





@Schrödinger'scat LOL! How could I miss that? :-)

– Phelype Oleinik
8 hours ago





@Schrödinger'scat LOL! How could I miss that? :-)

– Phelype Oleinik
8 hours ago

















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%2f504960%2freplace-backtick-with-power-in-math-mode%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

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480