3

the following

% file testbismon.tex
%% see https://github.com/bstarynk/bismon/ for more about Bismon
\documentclass[11pt,a4paper,svgnames]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{alltt}
% https://tex.stackexchange.com/a/342804/42406
%\usepackage{textcomp}
\usepackage{moreverb}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{epsfig}
\usepackage{makeidx}
\usepackage{float}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{moreverb}
\usepackage{multirow}
\usepackage{boxedminipage}
\usepackage[square]{natbib}
\usepackage{charter}
%\usepackage{inconsolata}
\usepackage{listings}
\usepackage{relsize}
\usepackage{verbatimbox}
\usepackage{filecontents}
\usepackage{catchfile}
\usepackage{lastpage}
\usepackage{stmaryrd}
\usepackage{ucs}
\usepackage{stix}
\usepackage{newunicodechar}
% bigfoot enables \verb in footnotes
\usepackage{bigfoot}
\usepackage[a4paper, margin=2cm]{geometry}

\newcommand{\bmemail}[1]{{\href{mailto:#1}{\texttt{\textbf{#1}}}}}
\newcommand{\bmurl}[1]{{\href{#1}{\texttt{\textbf{#1}}}}}


% see also http://www.sascha-frank.com/Arrow/latex-arrows.html and
% https://ctan.math.illinois.edu/macros/latex/contrib/newunicodechar/newunicodechar.pdf
% and https://tex.stackexchange.com/a/238135/42406
\newunicodechar{↳}{\rotatebox[origin=c]{180}{$\Lsh$}}

\begin{document}
\section{the test}
\begin{alltt}
the U+21B3 character is {\large ↳} \textit{DOWNWARDS ARROW WITH TIP RIGHTWARDS}
\end{alltt}
\end{document}

does not work on my Debian/Sid machine since pdflatex testbismon.tex gets the following error:

...
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-33.def)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uninames.dat)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-33.def)

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

See the ucs package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.50 the U+21B3 character is {\large ↳
                                        } \textit{DOWNWARDS ARROW WITH TIP R...

? 

Why does that error happens? How to get rid of it?

My above LaTeX code was inspired by this answer. I am using:

 pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
 kpathsea version 6.3.1

and typing my LaTeX files using emacs 26.

  • 2
    newunicodechar requires not to use utf8x. Change the option to utf8 (or remove the call to inputenc altogether). Also remove \usepackage{ucs}. – egreg Jul 22 '19 at 14:18
6

You also get

Package newunicodechar Warning: This package only works if the document
(newunicodechar)                encoding is `utf8'.

Remove \usepackage[utf8x]{inputenc} and \usepackage{ucs}.

Unrelated, but important: hyperref should be the last in your long list of packages. Also using charter and stix is a contradiction, remove the former. I wouldn't load stmaryrd along with stix. And epsfig is not to be used in newer documents: just use graphicx and its facilities.

enter image description here

| improve this answer | |
  • Should I replace \usepackage[utf8x]{inputenc} by something else, or should it be entirely removed? – Basile Starynkevitch Jul 22 '19 at 17:35
  • @BasileStarynkevitch With TeX Live 2018 or later, \usepackage[utf8]{inputenc} is implied, so you don't need it. – egreg Jul 22 '19 at 17:43
  • "epsfig not to be used in newer documents" where "newer" means, anything written after 1994:-) – David Carlisle Jul 22 '19 at 17:47
  • I will try that at work in a few hours, it should work, and then I'll accept the answer. A big thanks, I am struggling with such issues since two weeks – Basile Starynkevitch Jul 23 '19 at 4:19
  • BTW, except from experience, how do you know that charter and stix are incompatible packages? Is there anywhere a web page saying that? I am still a bit of LaTeX newbie... (my greatest professional mistake in my life was to not writing my PhD, in 1990, using LaTeX. At that time a LaTeX distro filled the half of the disk of the Sun4/160 workstation I worked on) – Basile Starynkevitch Jul 23 '19 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.