Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I get the 'real number' sign (something like \mathbb{R} with the amssymb package in LaTeX) in XeTeX?

share|improve this question
1  
Can you add the essential part of your preamble, particularly the font setting? –  egreg Mar 25 '13 at 21:24
    
well I have no preamble since I'm on XeTeX ;-) –  lvaneesbeeck Mar 25 '13 at 21:48
    
@ivaneesbeeck, i don't understand your answer. –  jpayansomet Mar 25 '13 at 21:51
2  
@Ivaneesbeeck Please add the username in your comment to respond properly (as I did here), otherwise the person will not be notified of your message. It would still be interesting to see your font setup. \font\1="Linux Libertine O"\1 ℝ\bye works great for me. –  Qrrbrbirlbel Mar 25 '13 at 22:36
2  
I see; nothing prevents you from using the msbm10 font with XeTeX. In any case, if you don't set fonts, you're basically using the same setting as normal TeX. –  egreg Mar 25 '13 at 22:39
show 5 more comments

5 Answers

There's a couple of ways to go about this:

  1. Using the default Computer Modern -font (which, as you've already found out, can be extended with the amssym to have access to BlackBoardBold.)
  2. Using Unicode OpenType math fonts. Now this is a bit tricky because the glyph locations need to be (re-)told to TeX. This step can further be split into two different approaches, depending on how to use the limited number of \families:
    1. Use just one family and change the active range by re-telling TeX the glyph positions every time the style changes (i.e. script, fraktur, etc. This is the way I've understood the unicode-math -package does it, please correct me if I have misunderstood!) I am not aware of anyone having done this for plain-xetex.
    2. Fix the styles to their own \families using mapping-files created with teckit_compile from SIL. This is a bit hackish overall, see: Changing math font to OTF in XeTeX using plaintex-format. If memory serves, someone told me in a comment somewhere that this was the "old" way, so I wouldn't recommend this approach.
share|improve this answer
add comment

How about this?

\documentclass{article}
\usepackage{amssymb}
\begin{document}
\begin{tabular}{ll}
Plain-\TeX{}:   & ${\rm I\!R}$\\
amssymb:        & $\mathbb{R}$
\end{tabular}
\end{document}

enter image description here

share|improve this answer
    
In a mathematical view (if you mean the symbol for real numbers) the second symbol is wrong ... –  Kurt Mar 26 '13 at 3:30
2  
@Kurt Please explain what you mean by "wrong". It's a matter of convention, isn't it? This Wikipedia article reports the Blackboard-Bold R as acceptable for denoting the set of real numbers. What symbol do you usually use for that set? –  Jubobs Mar 26 '13 at 11:45
    
My English is not so good, but in the exact correct way you have only one doubled rule, usual the longest one, if there are two longest one only the first. So the letter R should be IR ... You can try \usepackage{txfonts} and then ` $\varmathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$`. In my opinion they fit better the usual writing by hand. (Or you use a mathematical trick: I define that IIR is set of real numbers or something else ...) BTW: which symbol has D.E. Knuth used? –  Kurt Mar 26 '13 at 14:37
1  
@Kurt I agree that \varmathbb{R} is closer to what I use in handwriting than \mathbb{R} and I'm actually considering using it instead in the future. However, saying that \mathbb{R} is "wrong" seems excessive to me. It's just a matter of taste, eh? –  Jubobs Mar 26 '13 at 14:43
    
Well, perhaps is wrong a little bit too hard, but "in a mathematial view wrong" was ment to say, that there are usually special signs for the sets of real numbers, all numbers, numbers like 1, 2, 3 (German ganze Zahlen, don't know in English), irrational numbers: I,N,Q,R,Z. They should only used for this purpose. The typographical view is with which font can I set the mathematical sign needed here? Which font does fit best what is needed? Now it is a matter of taste ... Or a matter of definition, for example in a section "typhographical remarks". Too excact? Remember - I'm a German :-) –  Kurt Mar 26 '13 at 15:40
add comment

You should put your symbol format definitions in another TeX file; publications tend to have their own styles, and some may use bold Roman for fields like R instead of blackboard bold. You can swap nams.tex with aom.tex. I know, this is more common with LaTeX, but the principle still applies.

For example:

% paper.tex
\input nams.tex
$\realnumbers$ is connected.

% nams.tex
\def\realnumbers{\mathbb{R}}
% more definitions for the Notices.

% aom.tex
\def\realnumbers{\mathbf{R}}
% more definitions for the Annals.

Just change one line in paper.tex to submit to the Annals instead of the Notices.

share|improve this answer
2  
Welcome to TeX.sx!. May be an example/illustration would help to support the answer. –  texenthusiast Mar 26 '13 at 3:07
add comment

With lualatex

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\begin{document}
$ℝ$
\end{document}

real symbol

(not sure how to make it work with XeLaTeX or XeTeX)

share|improve this answer
add comment
up vote 0 down vote accepted

Auto-answer:

    \input amssym.tex
    ${\Bbb R}$
    \bye

works fine

share|improve this answer
    
Did you mean \input amssymb.tex? –  Jubobs Apr 21 '13 at 16:37
    
@Jubobs Nope, amssym. On my computer this code snippet does the job –  lvaneesbeeck Apr 26 '13 at 12:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.