7

I have a little problem, when I'm writing, my inline math (marked with $...$) the font size seems to be smaller than the text font size. How can I make it the same size.?

    \documentclass[a4paper,11pt]{extarticle}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{graphicx}
    \usepackage{xcolor}
    \usepackage{tikz}
    \usepackage{pgf}
    \usepackage[left=2cm,top=1cm,right=2cm,nohead,nofoot]{geometry}
    \usetikzlibrary{arrows,tikzmark}
    \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
        decorations.pathreplacing,decorations.pathmorphing,shapes,%
        matrix,shapes.symbols}
    \usepackage{multirow}
    \usepackage{amsmath,amssymb,textcomp}
    \everymath{\displaystyle}

    \usepackage{times}
    \renewcommand\familydefault{\sfdefault}
    \usepackage{tgheros}
    \usepackage[defaultmono,scale=0.85]{droidmono}

    \usepackage{multicol}
    \setlength{\columnseprule}{0pt}
    \setlength{\columnsep}{20.0pt}
    \usepackage{geometry}
    \geometry{
    a4paper,
    total={210mm,297mm},
    left=10mm,right=10mm,top=10mm,bottom=15mm}

    \linespread{1.3}
    \usepackage{tcolorbox}

\begin{document}

Vi har altså at både $a$ og $b$ er positive tal og $a$ er forskellig fra $1$.\\
Konstanten $a$ kaldes for 
\textcolor{blue!75!black}{\textbf{fremskrivningsfaktoren}}(eller grundtallet), 
mens konstanten $b$ kaldes for \textcolor{blue!75!black}{\textbf{begyndelsesværdien}} 
fordi grafen for den ekspoenetielle funktion skærer y-aksen i punktet $(0,b)$, 
dette kan vi vise på følgende måde ved at indsætte $x=0$ i forskriften.
\[
f(0)=b\cdot a^0=b\cdot 1=b
\]
\end{document}

The outcome is like this where you can see that a and b is smaller than the text around it.

My problem

Hope someone can help me.!

Mico
  • 506,678
Jakob Kruse
  • 229
  • 1
  • 10

2 Answers2

11

The x-height of the sans-serif font you're working with -- tgheros, an Helvetica clone -- is much larger than the x-height of your math font, which is Computer Modern. As far as I know, the tgheros package doesn't provide a scaling option. However, if you replace

\usepackage{tgheros}

with

\usepackage[scaled=0.78]{helvet}

and change the document font size from 11pt to 14pt, the scaling mismatch will have been alleviated significantly. (As you can probably guess, the helvet package provides another Helvetica clone.)

enter image description here

Mico
  • 506,678
  • Hi, dear friend. I vote +1 your answer. For my opinion the combination helvetica+cm is very ugly. – Sebastiano Feb 10 '18 at 20:42
  • @Sebastiano - I fully agree with you on the proposition that Helvetica and Computer Modern don't mix. However, that determination isn't for us to make, is it? All we can help with, realistically, is with eliminating the sizing mismatch... – Mico Feb 10 '18 at 20:46
  • It is true but for my opinion I have suggested to change the font. My is nice. :-). I also like aesthetics as well as answering questions. – Sebastiano Feb 10 '18 at 20:50
  • 1
    @Sebastiano - I've already upvoted your answer. :-) Let's see if the OP weighs in and provides a bit more information about why he/she is using a combination of a sans-serif text font and a serif math font. – Mico Feb 10 '18 at 20:57
  • 1
    If you find the upvotes you remember that there are also mine. :-) – Sebastiano Feb 10 '18 at 20:59
  • 1
    The 10th upvote on this answer made me earn the 997th and 998th badge on this site. Many thanks!! – Mico Feb 11 '18 at 10:28
  • 1
    For friends, I do this and more. Always in the leg. You're very excellent user. :-) – Sebastiano Feb 12 '18 at 21:25
  • @Sebastiano - Thanks!! I'll let you know when I make to 1000. :-) – Mico Feb 12 '18 at 21:50
4

For my opinion this font Antykwa Półtawskiego for the text is better than helvetica.

enter image description here

   \documentclass[a4paper,11pt]{extarticle}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{graphicx}
    \usepackage{xcolor}
    \usepackage{tikz}
    \usepackage{pgf}
    \usepackage[left=2cm,top=1cm,right=2cm,nohead,nofoot]{geometry}
    \usetikzlibrary{arrows,tikzmark}
    \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
        decorations.pathreplacing,decorations.pathmorphing,shapes,%
        matrix,shapes.symbols}
    \usepackage{multirow}
    \usepackage{amsmath,amssymb,textcomp}
    \everymath{\displaystyle}

    \usepackage{times}
    \renewcommand{\familydefault}{\sfdefault}
    \usepackage{antpolt}
    \usepackage[defaultmono,scale=0.85]{droidmono}

    \usepackage{multicol}
    \setlength{\columnseprule}{0pt}
    \setlength{\columnsep}{20.0pt}
    \usepackage{geometry}
    \geometry{
    a4paper,
    total={210mm,297mm},
    left=10mm,right=10mm,top=10mm,bottom=15mm}

    \linespread{1.3}
    \usepackage{tcolorbox}

\begin{document}

Vi har altså at både $a$ og $b$ er positive tal og $a$ er forskellig fra $1$.\\
Konstanten $a$ kaldes for \textcolor{blue!75!black}{\textbf{fremskrivningsfaktoren}}(eller grundtallet), mens konstanten $b$ kaldes for \textcolor{blue!75!black}{\textbf{begyndelsesværdien}} fordi grafen for den ekspoenetielle funktion skærer y-aksen i punktet $(0,b)$, dette kan vi vise på følgende måde ved at indsætte $x=0$ i forskriften.
\begin{center}
$f(0)=b\cdot a^0=b\cdot 1=b$
\end{center}
\end{document}
Sebastiano
  • 54,118
  • 2
    IMO they still does not look good together, too much contrast in "color" (I keep forgetting the technical term) – daleif Feb 10 '18 at 20:50
  • @daleif The color is the original of the OP. You are authorized to edit my answer. – Sebastiano Feb 10 '18 at 20:52
  • The op probably did not know any better. – daleif Feb 10 '18 at 20:53
  • @Sebastiano in this case "color" does not refer to blue/red/whatever, it refers to the intensity of the black strokes in term of black/white ratio on the page. Computer Modern has a different color than the font you suggest. See also: http://facweb.cs.depaul.edu/sgrais/typographic_color.htm – Andrea Lazzarotto Feb 11 '18 at 15:12
  • @Andrea Lazzarotto: Surely as I wrote in a previous comment the font font used contrasts totally with the default CM character. Even Helvet Helvet clone ill-suited, despite the talented Mico, has reduced the size of the character. Personally the combination, and I write truthfully, I did not the best, but at least the visual impact is less poor. – Sebastiano Feb 12 '18 at 21:40