12

So, is there a font in LaTeX that will reproduce decent looking d with stroke (đ)?

I'm writing a report, on Croatian, and it just looks ugly : mwe:

\documentclass[onecolumn,11pt]{revtex4-1}
\usepackage[croatian]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{txfonts}


\begin{document}

Random text random text random text with đ in it: đđđđđđđ ĐĐĐ

Oslobađajući, dođu, Đakovo    

\end{document}

enter image description here

Any decent looking substitute? Garamond is nice, but the formulas seem too 'stylish' for a lab report...

1

2 Answers 2

12

the đs from the TeX Gyre fonts seem to look a lot better than those in your example:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tgtermes}
%\usepackage{tgschola}
%\usepackage{tgpagella}

\begin{document}

Random text random text random text with đ in it: đđđđđđđ ĐĐĐ

Oslobađajući, dođu, Đakovo    

\end{document}

The tgtermes package, by the way, is the contemporary version of the txfonts you're using, which seem to haven't been updated for more than four years.

Adobe's Minion might be a good choice as well.

enter image description here

4
  • 1
    There is also the newer newtx (\usepackage{newtxtext,newtxmath}), which descends directly from txfonts.
    – mafp
    Mar 6, 2013 at 9:16
  • newtx is principally a reworking of the metrics for use in maths -- i would not expect it to help here; newtx with tex-gyre-termes for the text might be better (and if the dbar character is bad there, the authors are in principle available, since it's a user-group-sponsored project). Mar 6, 2013 at 10:03
  • @wasteofspace I know. I just wanted to address the "contemporary version of the txfonts" in the answer.
    – mafp
    Mar 6, 2013 at 10:11
  • @wasteofspace, @mafp I didn't mean to say tgtermes is txfonts's daughter, or, for that matter, that it's the only decent version of TNR currently available for *TeX. It is, of course, newtx's sister or cousin, their common ancestor being URW's Nimbus fonts. I don't know how newtx compares to tgtermes; I just like the entire TeX Gyre project and find their fonts to be among the most advanced in their field (i.e., the open-source and *TeX world).
    – Nils L
    Mar 6, 2013 at 10:54
16

The main problem is in the usage of the OT1 encoding, instead of T1; in the former, the đ and Đ characters are constructed and the construction doesn't work well with the TX fonts.

Switching to T1 has also the benefit that words containing letters with diacritics will be hyphenated properly, which doesn't happen with OT1.

\documentclass[onecolumn,11pt]{revtex4-1}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[croatian]{babel}
\usepackage{txfonts}

(I don't recommend utf8x, but that's a matter of opinion, mostly).

You can also consider using the newTX fonts:

\documentclass[onecolumn,11pt]{revtex4-1}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[croatian]{babel}
\usepackage{newtxtext,newtxmath}

that correct several glitches in the TX fonts. You may also prefer the TeX Gyre Termes fonts for text:

\documentclass[onecolumn,11pt]{revtex4-1}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[croatian]{babel}
\usepackage{tgtermes,newtxmath}

Here's a comparison (using TX fonts but there's practically no difference with newTX as far as the glyph shape is concerned).

enter image description here

1
  • The both answers are great, the tgtermes looks the best :) Thanks guys :)
    – dingo_d
    Mar 6, 2013 at 10:55

You must log in to answer this question.

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