I am trying to type yen (¥) symbol in LateX. I am using UTF8 encoding:


I tried to type this directly as ¥. When I try to compile file with pdflatex I get this error:

Package inputenc Error: Unicode char \u8:¥ not set up for use with LaTeX.

When I try to use \textyen command instead of actual character I get:

LaTeX Error: Command \textyen unavailable in encoding OT1.

My question is this:

  1. What is proper encoding for yen symbol?
  2. Can I use multiple encodings in one file? I want to use UTF8 encoding for all text instead of this yen symbol. Is it possible?

I found one way to do this without changing encoding by using:


in text, while defining following in preamble:

\def\yen{{\setbox0=\hbox{Y}Y\kern-.97\wd0\vbox{\hrule height.1ex
width.98\wd0\kern.33ex\hrule height.1ex width.98\wd0\kern.45ex}}}

However, I am still curious about doing this with proper encoding.

  • 1
    Check that you have the line \usepackage[T1]{fontenc} in your code. If this is not working, provide a MWE in your question.
    – Sveinung
    Commented Feb 8, 2014 at 10:14
  • 1
    LuaLaTeX and XeLaTeX provide proper Unicode support, not the kind of emulation inputenc does. My i18n texing life definitely became easier after I made the switch.
    – Crissov
    Commented Feb 8, 2014 at 10:37
  • 2
    In addition to @Sveinung's suggestion, add \usepackage{textcomp} to enable a fuller range of \text... symbols. Note that using the T1 encoding with fontenc is perfectly consistent with using utf8. The inputenc option specifies the input encoding of the document. The fontenc option specifies the font encoding to use for the output. Two different things. I use T1 with fontenc with utf8 input via inputenc as standard.
    – cfr
    Commented Feb 8, 2014 at 11:31

2 Answers 2


I find the Yen symbol provided by the textcomp package with Computer Modern fonts untolerably awful:

enter image description here

Here's a different approach



     \hrule height.1ex width.4em
     \hrule height.1ex width.4em


You see that you can input the character directly or with \textyen.

enter image description here


This is very easy to construct with a stack. The parameters that you can adjust are the width of the strokes (1.3ex), the thickness of the strokes (.1ex), and the vertical elevation of the bottom (.4ex) and top (.65ex) strokes. By using dimensions in ex's rather than pt's, it scales appropriately to different font sizes.


enter image description here

You must log in to answer this question.

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