Discussion:
[OS X TeX] carriage return character
e***@math.unicaen.fr
2009-09-09 13:02:15 UTC
Permalink
Hello all,

I need to put the "return carriage" character (U+21B5 in Unicode) in my
text.

Question 1 : Is it possible to write it directly, without using the ucs
package ?

I tried to use the ucs package, so I put
\usepackage{ucs}
\usepackage[utf8]{inputenc}

in my preamble.

It does not work, however ; I got the following error message :

! Package ucs Error : Unknown Unicode character 8629=U+21B5,
(ucs) possibly declared in uni-33.def
(ucs) Type H to see if it is available with
options.

I obediently typed "H" :

Unicode character 8629= U+21B5;
DOWNWARDS ARROW WITH CORNER LEFTWARDS
DOWN ARROW WITH CORNER LEFT
Character available with following options:
postscipt.
Enter I!<RET> to define the glyph

I obediently typed "I!", then "return" :

Please enter definition for unicode character 8629

Not knowing what to put, I just pressed the "return" key. Then the
compilation
finishes, but the .pdf file displays
"GenericError LaTeX Error: Can be used only in preambleSee the LaTeX
manual or LaTeX Companion "

How may I fix this ?

Ewan
Peter Dyballa
2009-09-09 13:54:23 UTC
Permalink
Post by e***@math.unicaen.fr
How may I fix this ?
Use XeTeX/XeLaTeX! The UCS encoding for LaTeX is not complete, it has
big holes of undefined characters. XeTeX just relies on the
completeness of a font.

Could be there is a "symbol" font for LaTeX around which has this
arrow (U+21B5 or ↵ is DOWNWARDS ARROW WITH CORNER LEFTWARDS, the
RETURN SYMBOL key of a keyboard is U+23CE or ⏎). I think Scott Pakin
made a survey of symbol fonts for (La)TeX some years ago...

texdoc symbols-letter.pdf
texdoc symbols-a4.pdf

--
Greetings

Pete

Bake pizza not war!
e***@math.unicaen.fr
2009-09-09 14:31:27 UTC
Permalink
Post by Peter Dyballa
Post by e***@math.unicaen.fr
How may I fix this ?
Use XeTeX/XeLaTeX!
I changed LaTeX to XeLaTeX, and this time I did not get any error
messages, but
the character remained undisplayed.
Upon reading the .log file however, I found a piece of advice reading
"You must be using
an old version of ucs. Please replace \usepackage[utf8]{inputenc} with
\usepackage[utf8x]{inputenc} in your preamble".

This I did, but the return symbol still won't appear on the PDF.

Ewan
Peter Dyballa
2009-09-09 17:29:21 UTC
Permalink
Post by e***@math.unicaen.fr
"You must be using
an old version of ucs. Please replace \usepackage[utf8]{inputenc} with
\usepackage[utf8x]{inputenc} in your preamble".
XeLaTeX works with a LaTeX document like this:

\documentclass[12pt]{report}
\usepackage{fontspec}%, xunicode, xltxtra}
\setromanfont{Unicode Symbols}
\setromanfont{FreeSerif}
\setromanfont{DejaVu Sans}
\begin{document}

U+21B5 or ↵ is DOWNWARDS ARROW WITH CORNER LEFTWARDS, LEFTWARDS ARROW
WITH HOOK at U+21A9 is ↩, and the RETURN SYMBOL key of a keyboard is
U+23CE or ⏎?

\end{document}

It is UTF-8 encoded "by nature," an input or a font encoding usually
don't need to be given because the fonts used are usually Unicode
encoded. The fonts mentioned have these three characters.

--
Greetings

Pete

Be careful of reading health books, you might die of a misprint.
– Mark Twain
Jonathan Kew
2009-09-09 17:48:36 UTC
Permalink
Post by Peter Dyballa
Post by e***@math.unicaen.fr
"You must be using
an old version of ucs. Please replace \usepackage[utf8]{inputenc} with
\usepackage[utf8x]{inputenc} in your preamble".
\documentclass[12pt]{report}
\usepackage{fontspec}%, xunicode, xltxtra}
\setromanfont{Unicode Symbols}
\setromanfont{FreeSerif}
\setromanfont{DejaVu Sans}
\begin{document}
U+21B5 or ↵ is DOWNWARDS ARROW WITH CORNER LEFTWARDS, LEFTWARDS ARROW
WITH HOOK at U+21A9 is ↩, and the RETURN SYMBOL key of a keyboard is
U+23CE or ⏎?
\end{document}
It is UTF-8 encoded "by nature," an input or a font encoding usually
don't need to be given because the fonts used are usually Unicode
encoded. The fonts mentioned have these three characters.
As do some fonts that ship with OS X, such as Apple Symbols and Lucida
Grande (the latter doesn't have U+23CE). So it's not necessary to
install any extra fonts in order to print them.

JK

Loading...