9

I'm writing a document which requires the helvet font and, in order to get access to the euro symbol, I am now trying to load the textcomp package.

However this package has the strange side effect of making the symbol produced by \textbullet, e.g. as used by an itemize environment, a bit smaller. I could live with that, but I sort of prefer the slightly larger bullet, so I'm wondering if there is an easy way to load textcomp but without changing the size of the bullet?

A small example showing the problem

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}
% Uncomment the following line to see the problem 
%\usepackage{textcomp}

\begin{document}
\begin{itemize}
\item One
\item Two
\end{itemize}
\end{document}

2 Answers 2

9

First, if you really want the origin \textbullet:

\DeclareTextSymbolDefault{\textbullet}{OMS}

Second, which is better? I know it is subjective, but I just want to explain what textcomp do.

With textcomp package, the text symbols are redeclared in new TS1 encoding, instead of Knuth's OMS encoding (designed for origin CM fonts). It is suitable for 8 bits fonts (256 glyphs).

If you use OMS encoding for \textbullet, then \textbullet is the same as

{\usefont{OMS}{phv}{m}{n}\symbol{15}}

And check omsphv.fd you'll find

\DeclareFontShape{OMS}{phv}{m}{n}
   {<-> ssub * cmsy/m/n}{}

i.e. Computer Modern Symbol font (cmsy) is used. In fact, it is not very suitable for Adobe Helvetica font (phv family).

If textcomp is used, \textbullet is in TS1 encoding, the result is the same as

{\usefont{TS1}{phv}{m}{n}\symbol{136}}

And check ts1phv.fd you'll find

\DeclareFontShape{TS1}{phv}{m}{n}{
   <-> \Hv@@scale phvr8c
}{}

That's real Helvetica. (Actully Nimbus Sans in most TeX distributions)

1
  • Just to let you know, I was sold by your argument that I should use the smaller bullet. Still, I am leaning to the euro symbol from eurosymb. I wish I could accept both answers, as learned a lot really from both! Jul 7, 2011 at 17:07
6

Don't use textcomp for the Euro symbol. There's eurosym, which provides the official symbol.

If you want to input the Euro symbol directly with the Unicode character and the utf8 option to inputenc, you can write

\usepackage{eurosym,newunicodechar}
\newunicodechar{€}{\officialeuro}

You won't be able to find in the PDF, though. For that you need to add some magic:

\immediate\pdfobj stream {
  /CIDInit /ProcSet findresource begin
  12 dict begin
  begincmap
  /CIDSystemInfo
  << /Registry (TeX)
  /Ordering (Euro)
  /Supplement 0
  >> def
  /CMapName /TeX-Euro-0 def
  /CMapType 2 def
  1 begincodespacerange
  <00> <FF>
  endcodespacerange
  1 beginbfchar
  <65> <20AC>
  endbfchar
  endcmap
  CMapName currentdict /CMap defineresource pop
  end
  end
}
\begingroup
\edef\next#1#2{%
  \noexpand\fontseries{#1}\noexpand\fontshape{#2}\noexpand\selectfont
  \pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}}
\fontencoding{U}\fontfamily{eurosym}%
\next{m}{n}\next{m}{sl}\next{m}{ol}
\next{bx}{n}\next{bx}{sl}\next{bx}{sl}
\endgroup

Basically this adds a CMAP resource and maps all eurosym fonts to it.

11
  • 2
    It depends. For CM fonts, eurosym may be better (since the Euro symbol in CM super is ugly); but for those fonts that have Euro symbol, it is better to use textcomp to get the glyph in the font.
    – Leo Liu
    Jul 7, 2011 at 16:29
  • Actually the euro symbol from eurosym does look rather nice. I probably should ask another question but, is it possible to make the symbol itself € work in my document if I'm using \usepackage[utf8]{inputenc} ? Jul 7, 2011 at 16:30
  • @Juan: You'd have seen my answer in Latest advice on the euro symbol. Use \usepackage[utf8x]{inputenc} instead.
    – Leo Liu
    Jul 7, 2011 at 16:33
  • Hmm.. I did saw that.. but it didn't work.. I now seem to find that the utf8x option and biblatex are incompatible. Biblatex complains about an incompatible package ucs. Jul 7, 2011 at 16:39
  • 1
    @doncherry I really don't like Euro symbols "matching" the current font. It's ugly anyway, so I prefer the official one. :)
    – egreg
    Apr 10, 2012 at 23:17

You must log in to answer this question.

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