6

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.!

  • 1
    Welcome to TeX.SE. Sincerely your default font does not fit with mathematical computer modern font. Modern computer fonts are not small but it is the text font that is not beautiful. – Sebastiano Feb 10 '18 at 20:22
  • Can you help me what to do, to make it the same size!? – Jakob Kruse Feb 10 '18 at 20:26
  • 2
    You might want to visit TUG.dk/FontCatalogue, – daleif Feb 10 '18 at 20:36
  • 1
    Have you considered getting rid of the three directives \usepackage{times}, \renewcommand\familydefault{\sfdefault}, and \usepackage{tgheros} and, in their stead, writing \usepackage{arev}? Doing so will give you matched sans-serif text and math fonts. – Mico Feb 10 '18 at 21:01
  • line 94: Option clash for package textcomp. ...textcomp\RequirePackage[full]{textcomp}\fi : Over-specification in h'-direction. : Over-specification in v'-direction. – Jakob Kruse Feb 10 '18 at 21:08
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

  • 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
  • 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
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}
  • 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: 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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