4

I'm autogenerating pdfs via pdflatex and perl and I am having problems in getting these characters to print in pdflatex: Љ Б Д И П و △ ★ ✚ ✠ ✤ ✶ ✸ ❀ ❃

Here is a template of the statments I use with for instance ❃ inserted:

\documentclass[10pt]{scrartcl}
\usepackage[german,english,greek]{babel}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{graphicx}
\usepackage[utf8x]{inputenc}
\usepackage[
pdftex,
bookmarks=true,
bookmarksopen=true,
bookmarksnumbered=true,
pdfstartpage=1
]
{hyperref}
\usepackage{footnote}
\usepackage{rotating}
\usepackage{tablefootnote}
\usepackage{nonfloat}
\usepackage{ctable}
\usepackage{lipsum}
\usepackage{bibentry}
\usepackage{color}
\usepackage{array}
\usepackage[margin=3cm]{geometry}


\title{\bfseries Test}
\date{}
\begin{document}

\section*{1}

❃ 

\end{document}

I have installed the language packs on Ubuntu via

sudo apt-get install texlive-lang-european texlive-lang-cyrillic texlive-lang-german texlive-lang-greek 

I think Љ Б Д И П are cyrillic but if I use

\usepackage[german,english,greek,russian]{babel}

Then the greek Α Γ Δ Ε Η Ι Λ Μ Ν Ο Ρ Σ Τ Υ Χ Ω (that are also included in my character set) will fail while Љ Б Д И П will succeed. So it seems that "greek and russia" are incompatible ? Is there a easy way out of this? Is it possible to get "Љ Б Д И П و △ ★ ✚ ✠ ✤ ✶ ✸ ❀ ❃" encoded by some means without adding "russia" to babel? And where are the other symbols defined? ❀ for instance is U+2740. I think I have to use:

\DeclareUnicodeCharacter{2740}{ ... }

However then I have to know the latex version of ❀.

  • 1
    What's the default language of your document? – egreg Jan 7 '17 at 20:27
  • The default language is german – Konrad Eisele Jan 7 '17 at 20:30
  • 1
    Are you able to use LuaTeX or XeTeX? With LuaTeX, you would use the fontspec package instead of fontenc, polyglossia instead of babel, and always utf-8 encoding. Then you could simply paste the characters from a character map, as long as you have them in a font. Or you could call them by Unicode. It does not matter which language(s) you specify, since this method is inherently multi-lingual. Dingbats OK too. – user103221 Jan 7 '17 at 22:54
  • Do you need all those packages to reproduce not printing something? Please make your code minimal. Also, you probably want to include all the characters you need so that people have a proper test case to work with. – cfr Jan 8 '17 at 0:25
  • Off-topic: hyperref should be loaded late. – cfr Jan 8 '17 at 0:25
3

Here is what I had to do:

  • Packages

Code:

\documentclass[a4paper,12pt,landscape,enabledeprecatedfontcommands]{scrartcl}
\usepackage[utf8x]{inputenc}
\usepackage[T1,T2A]{fontenc}     
\usepackage[russian,arabic,farsi,greek,german]{babel}
\usepackage{arabtex}

Code:

\usepackage{pifont}
\DeclareUnicodeCharacter{10048}{ \ding{95} }
\DeclareUnicodeCharacter{10051}{ \ding{93} }
...
  • For the cyrillic characters Љ Б Д И П and greek character Α..Ω :

Code:

\textcyrillic{П}
\textgreek{Ω}

Code:

   \RL{w}

Conculsion:

  1. german, english are handled by babel
  2. cyrillic symbols are handled by \textcyrillic{}
  3. greek symbols are handled by \textgreek{}
  4. arabic symbols are handled by \RL{}
  5. wingding entries are handled by pifont, \ding and \DeclareUnicodeCharacter

Notes:

  1. Languages in the babel usepackage statement seem to override each other. Therefore \textcyrillic and \textgreek is used.
  2. I use utf8x for inputenc
  3. When using arabtex I also have to add enabledeprecatedfontcommands

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.