1

I am using the concmath package (ultimately I only need the concrete font in the math environments but lets do it globally for now).

My issue is: In the math environment I get a pixelated font. See this picture enter image description here

This is the mini example I do for the result:

\documentclass[english]{article}

\usepackage[latin9]{inputenc} \usepackage{concmath} \usepackage[T1]{fontenc}

\makeatletter

\makeatother

\usepackage{babel} \begin{document} Hey!$\lambda\beta\gamma\langle\psi\rangle$ \end{document}

Any idea how to fix this? Thanks a lot in advance!

sani
  • 21
  • 1
    Welcome to the TeX.SE community. What do you use: TeXLive or MikTeX? Here there is a my old question: https://tex.stackexchange.com/questions/538806/pixel-zoom-of-an-integral-using-amsart-and-esint I think that can help you. – Sebastiano Jan 15 '21 at 16:42
  • 4
    imho there are only the metafont sources on ctan (which gives bitmaps), if you want a type1 (vektor) font you will have to buy it from micropress. – Ulrike Fischer Jan 15 '21 at 16:45
  • I am on texlive i suppose – sani Jan 15 '21 at 16:58
  • I am currently not on my computer. But this seems like a fair fix. I will try that in a bit! – sani Jan 15 '21 at 17:05
  • Okay, cool. It seems al you right is true. The package is a bitmap. and to get T1 is comercial. Then rendering would work in principle. However I just realized I am scaling. So I actually do need a T1 font. haha. At least I learned a lot today :D – sani Jan 15 '21 at 21:11

1 Answers1

2

The math fonts for Concrete are in the old-fashioned METAFONT format. Today, these compile to Type 3 bitmap fonts, which look pixelated. This is true even if you use the most up-to-date Concrete package for PDFTeX, ccfonts. (The concmath package has not been updated since last century.)

One solution is to use the same fonts Donald Knuth himself did. The Concrete font was originally designed for his textbook Concrete Mathematics: A Foundation for Computer Science. The math font he originally used with it in that book was Hermann Zapf’s Euler. (Back then, he was using rasterized fonts for a laser printer, but people have since turned them into into outline fonts that look better on a modern screen.)

\documentclass[english]{article}

\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} % The default since 2018 \usepackage[exscale]{ccfonts} \usepackage{eulervm,eufrak,eucal} \usepackage{babel}

\begin{document} Hey!$\lambda\beta\gamma\langle\psi\rangle$ \end{document}

Concrete + Euler

If you can convert your source files to UTF-8 and compile in LuaLaTeX or XeLaTeX, you can use the Greek letters from the OpenType CMU Concrete in math mode. Here, I use GFS Neohellenic Math, another slab-serif font, for all other math symbols.

\documentclass[english]{article}
\usepackage{unicode-math}
\usepackage{babel}

\defaultfontfeatures{Scale=MatchLowercase} \setmainfont{CMU Concrete}[Scale=1.0] \setmathfont{GFS Neohellenic Math} \setmathfont{CMU Concrete Italic}[range=it] \setmathfont{CMU Concrete}[range=up]

\begin{document} Hey!$\lambda\beta\gamma\langle\psi\rangle$ \end{document}

CMU Concrete + GFS Neohellenic Math sample

There is also an OpenType version of Neo Euler available, and someone turned an example I wrote here about how to duplicate the layout of Concrete Mathematics into \usepackage[neoeuler]{fontsetup}. You must have this free font to use it.

Finally, Microtype still apparently sells a commercial Type-1 version of the Concrete math fonts. I haven’t used it, but it’s supposedly an outline font that won’t pixelate and works in PDFTeX. (However, publishers that don’t let you use LuaLaTeX or XeLaTeX usually don’t let you upload commercial fonts either.)

Davislor
  • 44,045
  • Oh wow, I just implemented the other issues to realize that in my actual project I am scaling things which doesnt work with the high resolution solution. This what you post here seems very nice! I will implement this, this looks really like a very satisfactory solution! – sani Jan 15 '21 at 21:08
  • Yip, this option using luatex does work very nicely! Plus this gives me the freedom to use any open font. Thanks!! – sani Jan 18 '21 at 09:46