Different font for numbers in URLs [duplicate]
up vote
1
down vote
favorite
This question already has an answer here:
Problem with digits in URLs when using mathspec and hyperref
1 answer
I am using mathspec to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits that would normally use a font other than roman, such as those within URLs, also end up using this font, despite loading the mathspec command setallmonofonts (which I had assumed would override setmathfont).
documentclass{article}
usepackage{mathspec}
setmainfont{Book Antiqua}
setmathfont(Digits,Latin){Book Antiqua}
setallmonofonts{Courier New}
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
$$Some text in math mode. Some figures in math mode: 12345789$$
end{document}

Is there a way of setting the font for only the digits that occur in math mode? I would like to keep my specified monospace font for digits within monospaced strings (and likewise with sans serif fonts, should I need to use them).
xetex fontspec mathspec
marked as duplicate by Stefan Pinnow, Kurt, Community♦ Dec 3 at 17:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
1
down vote
favorite
This question already has an answer here:
Problem with digits in URLs when using mathspec and hyperref
1 answer
I am using mathspec to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits that would normally use a font other than roman, such as those within URLs, also end up using this font, despite loading the mathspec command setallmonofonts (which I had assumed would override setmathfont).
documentclass{article}
usepackage{mathspec}
setmainfont{Book Antiqua}
setmathfont(Digits,Latin){Book Antiqua}
setallmonofonts{Courier New}
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
$$Some text in math mode. Some figures in math mode: 12345789$$
end{document}

Is there a way of setting the font for only the digits that occur in math mode? I would like to keep my specified monospace font for digits within monospaced strings (and likewise with sans serif fonts, should I need to use them).
xetex fontspec mathspec
marked as duplicate by Stefan Pinnow, Kurt, Community♦ Dec 3 at 17:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This question already has an answer here:
Problem with digits in URLs when using mathspec and hyperref
1 answer
I am using mathspec to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits that would normally use a font other than roman, such as those within URLs, also end up using this font, despite loading the mathspec command setallmonofonts (which I had assumed would override setmathfont).
documentclass{article}
usepackage{mathspec}
setmainfont{Book Antiqua}
setmathfont(Digits,Latin){Book Antiqua}
setallmonofonts{Courier New}
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
$$Some text in math mode. Some figures in math mode: 12345789$$
end{document}

Is there a way of setting the font for only the digits that occur in math mode? I would like to keep my specified monospace font for digits within monospaced strings (and likewise with sans serif fonts, should I need to use them).
xetex fontspec mathspec
This question already has an answer here:
Problem with digits in URLs when using mathspec and hyperref
1 answer
I am using mathspec to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits that would normally use a font other than roman, such as those within URLs, also end up using this font, despite loading the mathspec command setallmonofonts (which I had assumed would override setmathfont).
documentclass{article}
usepackage{mathspec}
setmainfont{Book Antiqua}
setmathfont(Digits,Latin){Book Antiqua}
setallmonofonts{Courier New}
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
$$Some text in math mode. Some figures in math mode: 12345789$$
end{document}

Is there a way of setting the font for only the digits that occur in math mode? I would like to keep my specified monospace font for digits within monospaced strings (and likewise with sans serif fonts, should I need to use them).
This question already has an answer here:
Problem with digits in URLs when using mathspec and hyperref
1 answer
xetex fontspec mathspec
xetex fontspec mathspec
asked Dec 3 at 16:19
user176042
84
84
marked as duplicate by Stefan Pinnow, Kurt, Community♦ Dec 3 at 17:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Stefan Pinnow, Kurt, Community♦ Dec 3 at 17:23
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The trick from https://tex.stackexchange.com/a/99774 seems to work:
documentclass{article}
usepackage{mathspec}
setmainfont{Arial}
setmathfont(Digits,Latin){Arial}
setallmonofonts{Courier New}
makeatletter
DeclareMathSymbol{0}{mathalpha}{eu@DigitsArabic@symfont}{`0}
DeclareMathSymbol{1}{mathalpha}{eu@DigitsArabic@symfont}{`1}
DeclareMathSymbol{2}{mathalpha}{eu@DigitsArabic@symfont}{`2}
DeclareMathSymbol{3}{mathalpha}{eu@DigitsArabic@symfont}{`3}
DeclareMathSymbol{4}{mathalpha}{eu@DigitsArabic@symfont}{`4}
DeclareMathSymbol{5}{mathalpha}{eu@DigitsArabic@symfont}{`5}
DeclareMathSymbol{6}{mathalpha}{eu@DigitsArabic@symfont}{`6}
DeclareMathSymbol{7}{mathalpha}{eu@DigitsArabic@symfont}{`7}
DeclareMathSymbol{8}{mathalpha}{eu@DigitsArabic@symfont}{`8}
DeclareMathSymbol{9}{mathalpha}{eu@DigitsArabic@symfont}{`9}
makeatother
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
[Some text in math mode. Some figures in math mode: 12345789]
end{document}

add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The trick from https://tex.stackexchange.com/a/99774 seems to work:
documentclass{article}
usepackage{mathspec}
setmainfont{Arial}
setmathfont(Digits,Latin){Arial}
setallmonofonts{Courier New}
makeatletter
DeclareMathSymbol{0}{mathalpha}{eu@DigitsArabic@symfont}{`0}
DeclareMathSymbol{1}{mathalpha}{eu@DigitsArabic@symfont}{`1}
DeclareMathSymbol{2}{mathalpha}{eu@DigitsArabic@symfont}{`2}
DeclareMathSymbol{3}{mathalpha}{eu@DigitsArabic@symfont}{`3}
DeclareMathSymbol{4}{mathalpha}{eu@DigitsArabic@symfont}{`4}
DeclareMathSymbol{5}{mathalpha}{eu@DigitsArabic@symfont}{`5}
DeclareMathSymbol{6}{mathalpha}{eu@DigitsArabic@symfont}{`6}
DeclareMathSymbol{7}{mathalpha}{eu@DigitsArabic@symfont}{`7}
DeclareMathSymbol{8}{mathalpha}{eu@DigitsArabic@symfont}{`8}
DeclareMathSymbol{9}{mathalpha}{eu@DigitsArabic@symfont}{`9}
makeatother
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
[Some text in math mode. Some figures in math mode: 12345789]
end{document}

add a comment |
up vote
1
down vote
accepted
The trick from https://tex.stackexchange.com/a/99774 seems to work:
documentclass{article}
usepackage{mathspec}
setmainfont{Arial}
setmathfont(Digits,Latin){Arial}
setallmonofonts{Courier New}
makeatletter
DeclareMathSymbol{0}{mathalpha}{eu@DigitsArabic@symfont}{`0}
DeclareMathSymbol{1}{mathalpha}{eu@DigitsArabic@symfont}{`1}
DeclareMathSymbol{2}{mathalpha}{eu@DigitsArabic@symfont}{`2}
DeclareMathSymbol{3}{mathalpha}{eu@DigitsArabic@symfont}{`3}
DeclareMathSymbol{4}{mathalpha}{eu@DigitsArabic@symfont}{`4}
DeclareMathSymbol{5}{mathalpha}{eu@DigitsArabic@symfont}{`5}
DeclareMathSymbol{6}{mathalpha}{eu@DigitsArabic@symfont}{`6}
DeclareMathSymbol{7}{mathalpha}{eu@DigitsArabic@symfont}{`7}
DeclareMathSymbol{8}{mathalpha}{eu@DigitsArabic@symfont}{`8}
DeclareMathSymbol{9}{mathalpha}{eu@DigitsArabic@symfont}{`9}
makeatother
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
[Some text in math mode. Some figures in math mode: 12345789]
end{document}

add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The trick from https://tex.stackexchange.com/a/99774 seems to work:
documentclass{article}
usepackage{mathspec}
setmainfont{Arial}
setmathfont(Digits,Latin){Arial}
setallmonofonts{Courier New}
makeatletter
DeclareMathSymbol{0}{mathalpha}{eu@DigitsArabic@symfont}{`0}
DeclareMathSymbol{1}{mathalpha}{eu@DigitsArabic@symfont}{`1}
DeclareMathSymbol{2}{mathalpha}{eu@DigitsArabic@symfont}{`2}
DeclareMathSymbol{3}{mathalpha}{eu@DigitsArabic@symfont}{`3}
DeclareMathSymbol{4}{mathalpha}{eu@DigitsArabic@symfont}{`4}
DeclareMathSymbol{5}{mathalpha}{eu@DigitsArabic@symfont}{`5}
DeclareMathSymbol{6}{mathalpha}{eu@DigitsArabic@symfont}{`6}
DeclareMathSymbol{7}{mathalpha}{eu@DigitsArabic@symfont}{`7}
DeclareMathSymbol{8}{mathalpha}{eu@DigitsArabic@symfont}{`8}
DeclareMathSymbol{9}{mathalpha}{eu@DigitsArabic@symfont}{`9}
makeatother
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
[Some text in math mode. Some figures in math mode: 12345789]
end{document}

The trick from https://tex.stackexchange.com/a/99774 seems to work:
documentclass{article}
usepackage{mathspec}
setmainfont{Arial}
setmathfont(Digits,Latin){Arial}
setallmonofonts{Courier New}
makeatletter
DeclareMathSymbol{0}{mathalpha}{eu@DigitsArabic@symfont}{`0}
DeclareMathSymbol{1}{mathalpha}{eu@DigitsArabic@symfont}{`1}
DeclareMathSymbol{2}{mathalpha}{eu@DigitsArabic@symfont}{`2}
DeclareMathSymbol{3}{mathalpha}{eu@DigitsArabic@symfont}{`3}
DeclareMathSymbol{4}{mathalpha}{eu@DigitsArabic@symfont}{`4}
DeclareMathSymbol{5}{mathalpha}{eu@DigitsArabic@symfont}{`5}
DeclareMathSymbol{6}{mathalpha}{eu@DigitsArabic@symfont}{`6}
DeclareMathSymbol{7}{mathalpha}{eu@DigitsArabic@symfont}{`7}
DeclareMathSymbol{8}{mathalpha}{eu@DigitsArabic@symfont}{`8}
DeclareMathSymbol{9}{mathalpha}{eu@DigitsArabic@symfont}{`9}
makeatother
usepackage[hidelinks]{hyperref}
begin{document}
Some text. Some figures: 123456789\
url{http://some.urlwithnumbers/123456789}
[Some text in math mode. Some figures in math mode: 12345789]
end{document}

answered Dec 3 at 16:37
user176037
1009
1009
add a comment |
add a comment |