I am a new TeX user and was wondering if there is any way to keep my main font (Day Roman) while typing mathematical expressions inbetween dollar signs. Here is an example, I would like my font to look like the bottom three points A, B and C, rather than the first row. I found a paper with the style I would like to use, see the bottom picture.

First example

Second example

Is there any way I can stop the dollar signs from altering the font? Here is my preamble (I apologize if it's messy, if things are not needed and/or are overlapping):



\textbf{1. }\text{Test 2}\\
$$A = (1, 1, 1), B = (2, 2, 2), C = (3, 3, 3)$$.

\centerline{$A =$ $($1, 1, 1$)$, $B =$ $($2, 2, 2$)$, $C =$ $($3, 3, 3$)$.}

As you can see, I have to avoid using dollar signs around numbers as it changes their font.

I have downloaded the Day Roman font and attached it to my file. I use XeLaTeX as compiler.

Thanks in advance.


1 Answer 1


You can declare the font as a math font and declare digits use it:

enter image description here

% not in xetex \usepackage[utf8]{inputenc}
% not in xetex \usepackage[T1]{fontenc}
\setmainfont[NFSSFamily=dayrom]{Comic Sans MS}% I don't have this \setmainfont{Dayrom.ttf}


\textbf{1. }\text{Test 2}% never before a math display\\
\[A = (1, 1, 1), B = (2, 2, 2), C = (3, 3, 3) \text{.}\]


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .