Questions tagged [mathcode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
59 views

Epigrafica font and mathastext incompatible for minus sign

I like the looks of the Optima font for my figure notations, which often include mathematical notations. I also prefer pdflatex. So I have found the Epigrafica font to be a nice Optima clone, which ...
3
votes
1answer
91 views

Getting a list of active characters

There are some characters that are active in plain TeX (e.g. ~) and some packages like babel make additional characters active (e.g. "). Is there a way to get a list of all active characters from ...
2
votes
2answers
416 views

bracket as ordinary symbol in math mode

I would like to to write in math mode using tt font and everything ok, but brackets. The next code $ \mathtt{[x + y]} $ get but i would like to get . It can be done by some additional commands $ ...
6
votes
1answer
4k views

Does Wikipedia use Latex? [closed]

I was reading a math text on Wikipédia and I saw some setences that looked like Latex code that my phone could not recognize.If it's a Latex text,and I would like to know, why my computer can read it ...
5
votes
2answers
135 views

How to make active characters work differently in mathmode and text mode?

Still learning about active characters, catcodes, mathcodes, and such. I know how to make *hello* produce bold in text mode and $x$ produce a bold $x$ in math mode. I also know how to make *{hello}...
1
vote
1answer
86 views

How to make @ turn math symbols bold

I would like to change the meaning of @ in math mode to be such that it takes the object following it and makes it bold, e.g. $@x$ should produce a bold math x, $@\alpha$ should produce a bold alpha, ...
1
vote
1answer
519 views

Comma as letter and semicolon as operator in math formulas

Inside document source2e.pdf there are the following two lines \DeclareMathSymbol{,}{\mathpunct}{letters}{"3B} \DeclareMathSymbol{;}{\mathpunct}{operators}{"3B} which treats these two punctuation ...
5
votes
1answer
177 views

Compilation error with \ifnum in ConTeXt

Why the following code gives me the following error? Code: \begingroup \catcode`\"=12 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A% \ifnum\mathcode`\-=45 \else \...
3
votes
1answer
754 views

fancyvrb error with math escapes and prime (')

I've recently noticed a few cases where fancyvrb math escapes fail. This works fine: \documentclass{article} \usepackage{fancyvrb} \begin{document} \begin{Verbatim}[commandchars=\\\{\},codes={\...
10
votes
4answers
2k views

How can I draw bars and stars faster?

I want to use the bars and stars method to list number of non-negative solutions of the equation x + y + z = 4. I tried with \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \...
3
votes
1answer
275 views

Making f active in math mode

I am trying to correct a spacing issue in mathspec. I wish to add an extra space after the letter f in math mode, but only if it is not followed by a subscript. I don't want to do this manually every ...
13
votes
1answer
583 views

How to change the mathematical symbol class of a unicode math symbol?

In unicode-math-table.tex the math class of many symbols is defined by lines like: \UnicodeMathSymbol{"026AC}{\mdsmwhtcircle}{\mathord}{medium small white circle}% Now if I want to use this ...
9
votes
2answers
470 views

Giving arbitrary unicode characters, passed as arguments, a math-active definition?

I've been trying to write a LaTeX3 function to make arbitrary unicode characters math active and give them a definition. I'm using XeLaTeX. My solution inexplicably works for some examples but not for ...
12
votes
2answers
516 views

Determining the math class of a non-keyboard symbol

What is the "right" way of determining the math class (e.g. ordinary/0, relation/3, closing/5, etc.) of a non-keyboard symbol? Something like \oplus is easy enough to guess, but I wasn't immediately ...
8
votes
2answers
210 views

Make §…§ marker for textmode INSIDE math mode

I want to definde §...§ as markers for textmode inside math mode. This would be useful for example inside "cases" environments, to add text defining the cases; or for defining sets. Instead of having ...
32
votes
2answers
2k views

What is the differences between mathcode and catcode and how can I use mathcode?

The command \catcode is often used to change some internals. E.g. the command \makeatletter changes the catcode @. But what is \mathcode and how does it work? catcodes are well explained here: Wiki ...