# How to get \copyright when mixing T1 fonts and fontspec?

This example:

\documentclass{minimal}

\usepackage{fontspec}
\usepackage[T1]{fontenc}
\usepackage[osf]{mathpazo}

\begin{document}

\copyright 2011
\end{document}


Gives:

! LaTeX Error: Command \copyright unavailable in encoding T1.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.9 \copyright
2011
?


What can I do to get a copyright symbol? Is there another command I should use perhaps?

-
Yey a downvote without a comment. Clearly I have misunderstood something here because I am not supposed to ask this question... I have received a lot of helpfull answers for which I am thankful. However they all give me the distinct feelign that I in fact have not understood what I am doing. Perhaps there is some document around that can explain to me what I am doing and why that is such a bad thing? –  jonalv Sep 30 '11 at 11:32

## 4 Answers

Quick solution:

Use \textcopyright instead of \copyright. Now the copyright sign will be ouput in cmsy font, and there will be a font warning.

This approach is somewhat bad because it produces a font substitution warning, and the use of CM fonts.

The advantage is, you don't need to modify the code much. And the font is exacly Palatino with its mathematical support provided by PSNFSS bundle.

Quick solution 2:

\renewcommand*\copyright{{%
\usefont{EU1}{lmr}{m}{n}\textcopyright}}


It use the sign in Latin Modern fonts.

This prevents the warnings. And use LMR font for this sign. The font command can be changed as you wish. e.g. \fontfamily{lmr}\selectfont.

textcomp package uses an old set of fonts, in TS1 font encoding.

## Suggested solution:

\documentclass{minimal}

\usepackage{unicode-math}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{TeX Gyre Pagella}
\setmathfont{Asana Math}

\begin{document}

Test \copyright 2011
\end{document}


Now all fonts are changed to OpenType ones. The result is somewhat similar with pdfLaTeX + pxfonts package.

-
When you write: "Now all fonts are changed to OpenType ones." I read: "Now all fonts will look different but be OpenType", please tell me I am wrong? –  jonalv Sep 30 '11 at 11:29
@jonalv: Now all fonts will look very few different but be OpenType. –  Leo Liu Sep 30 '11 at 18:17

I'd load mathpazo before fontspec; moreover fontenc isn't needed, since you'll want to set the fonts with fontspec.

\usepackage[osf]{mathpazo}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{TeX Gyre Pagella}

\begin{document}

\copyright 2011
\end{document}

-
Since the OP wanted to load mathpazo with the OSC (oldstyle numbers and small caps) option, it might be helpful to include the option Numbers=OldStyle in the argument of the \setmainfont command. :-) –  Mico Sep 29 '11 at 11:25
@Mico Yes, I'll add it. –  egreg Sep 29 '11 at 11:29
Loading mathpazo before fontspec makes no difference. Setting the main font to TeX Gyre Pagella brakes small caps and microtype it seems in my code I generated the minimalistic example from... :/ –  jonalv Sep 29 '11 at 11:58
Okey scratch the small caps issue that is probably because I have code calling \fontfamily{pplx}\selectfont together with those small caps issues. However I would prefer to not have to rewrite that, also microtype does not work when I load the font in that way it seems... Or do you think it should work and I am doing something wrong? –  jonalv Sep 29 '11 at 12:05
With TeX Gyre Pagella, say, Palatino, you should use unicode-math with Asana Math math font. Note that mathpazo also defines math fonts. –  Leo Liu Sep 29 '11 at 12:08

To answer the question about the copyright symbol: The symbol is in the TS1-encoding so you must either load this encoding or the package textcomp. The following will work with all engines (pdflatex, xelatex, lualatex ...):

\documentclass{minimal}
\usepackage[TS1,T1]{fontenc}
\usepackage[osf]{mathpazo}

\begin{document}

\copyright 2011
\end{document}


But using T1-encoding and the mathpazo textfonts with xelatex is problematic. As you can't use inputenc you will loose the ability to enter non-ascii chars directly. E.g. ß won't work. Hyphenation can be wrong too as the pattern of xelatex are unicode-orientated. It is much better to use as textfonts fonts loaded with fontspec.

-
But you have removed the row: \usepackage{fontspec} if I add that it does not work. I need it for my sans serif font... –  jonalv Sep 29 '11 at 12:40
I have remove fontspec because the way you combined the packages is hilarious. How do you intend to set up your sans serif font and switch between the roman and the sans serif font? Do you really intend to switch the font encodings all the time? –  Ulrike Fischer Sep 29 '11 at 13:30
Well, can I not do that? I want to use the mathpazo together with my Optima that ships with my Mac. Also I am using luatex not xetex. It seems that the order I load packages changes the look of the Palatino font though. Seems like fontspec sometimes takes over and overwrites with some other font. It all seems rather complicated... –  jonalv Sep 29 '11 at 13:53
Yes fontspec will take over if you load it last, and T1+fontenc+mathpazo will take over if you load fontspec before. In theory you can mix the both font system but you need a lot knowledge to do it right. So in practice I advise you not to do it. Avoid mathpazo for text. Use e.g. TeX Gyre Pagella as suggested and solve whatever problems you got with it. –  Ulrike Fischer Sep 29 '11 at 14:01
Hm, it actually seems to work for me right now. TeX Gyre Pagella won't be used for math as default, also it looked very different when fontspec took over and I guess that's was TeX Gyre Pagella? I don't want that look... So I think I will cross all fingers and hope it will continue to work and look as I want it. If not I guess I will be back asking for more help... :) After all, my Mac came with a Palatino as well so maybe I should have used that. Still remains the problem with a math font though... right? –  jonalv Sep 29 '11 at 14:07

I found a question here on the topic of Copyright symbols. And based on that I came up with a solution which at least for now seems to fulfil all my critera:

\documentclass{minimal}
\usepackage{fontspec}
\usepackage[TS1,T1]{fontenc}
\usepackage[osf]{mathpazo}
\usepackage{textcomp}

\begin{document}

\textcopyright \ 2011
\end{document}


Using the \textcopyright command seems to work.

-
I don't understand why you seem to want to mix commands that are appropriate for compilation under pdflatex with others that assume you're going to compile the document under xelatex. Either drop the \usepackage{fontspec} command entirely (and specify the sans-serif family of your choice separately), or follow the answer provided by @egreg, load the unicode-math package in the preamble, and augment his code with something like \setsansfont{Optima} (substitute correct font name) and \setmathfont{Asana Math}. –  Mico Sep 29 '11 at 15:27