6

Question:

How do I get the Armenian language to print out in a mixed language document?

Minimal Working Example (MWE):

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french,armenian]{babel}

\begin{document}

Plus ça change, plus c'est la même chose!

\selectlanguage{english}

And an English paragraph, with a short text in

% Does not work (selectlanguage does not help either)
\foreignlanguage{armenian}{զրո}.

\end{document}

Desired output:

To get the Armenian characters to print out. French and English seems to work, but not Armenian.

6

There is no babel support for Armenian.

However, TeX Live and MiKTeX provide font support.

\documentclass{article}

\usepackage[OT6,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}

\newcommand{\armenian}{\fontencoding{OT6}\fontfamily{cmr}\selectfont}
\DeclareTextFontCommand{\textarmenian}{\armenian}

\begin{document}

Plus ça change, plus c'est la même chose!

\selectlanguage{english}

And an English paragraph, with a short text in
\textarmenian{զրո}.

\end{document}

enter image description here

As an addition, here's a set of macros for printing Armenian traditional numerals (up to 99999999). The input to \armeniannumeral can be an explicit number but also a counter, see example.

\documentclass{article}
\usepackage[OT6,T1]{fontenc}
\usepackage{xparse,etoolbox}

\NewDocumentCommand{\armenian}{}{\fontencoding{OT6}\fontfamily{cmr}\selectfont}
\DeclareTextFontCommand{\textarmenian}{\armenian}
\robustify\textarmenian

\ExplSyntaxOn
\NewDocumentCommand{\armeniannumeral}{m}
 {% #1 = an integer denotation (less than 10^8)
  \textarmenian
   {
    \kexx_armenian_numeral:n { #1 }
   }
 }

\cs_new_protected:Nn \kexx_armenian_numeral:n
 {
  \int_compare:nTF { #1 > 9999 }
   {
    $\overline{\kexx_armenian_numeral_print:f { \int_div_truncate:nn { #1 } { 10000 } } }$
    \kexx_armenian_numeral_print:f { \int_mod:nn { #1 } { 10000 } }
   }
   {
    \kexx_armenian_numeral_print:f { \int_eval:n { #1 } }
   }
 }

\cs_new_protected:Nn \kexx_armenian_numeral_print:n
 {
  \kexx_armenian_numeral_print_aux:f { \prg_replicate:nn { 4 - \tl_count:n { #1 } } { 0 } #1 }
 }
\cs_generate_variant:Nn \kexx_armenian_numeral_print:n { f }

\cs_new_protected:Nn \kexx_armenian_numeral_print_aux:n
 {
  \mbox { \kexx_armenian_numeral_print_final:nnnn #1 }
 }
\cs_generate_variant:Nn \kexx_armenian_numeral_print_aux:n { f }

\cs_new_protected:Nn \kexx_armenian_numeral_print_final:nnnn
 {
  \int_case:nn { #1 } % thousands
   {
    {1}{Ռ}
    {2}{Ս}
    {3}{Վ}
    {4}{Տ}
    {5}{Ր}
    {6}{Ց}
    {7}{Ւ}
    {8}{Փ}
    {9}{Ք}
   }
  \int_case:nn { #2 } % hundreds
   {
    {1}{Ճ}
    {2}{Մ}
    {3}{Յ}
    {4}{Ն}
    {5}{Շ}
    {6}{Ո}
    {7}{Չ}
    {8}{Պ}
    {9}{Ջ}
   }
  \int_case:nn { #3 } % tens
   {
    {1}{Ժ}
    {2}{Ի}
    {3}{Լ}
    {4}{Խ}
    {5}{Ծ}
    {6}{Կ}
    {7}{Հ}
    {8}{Ձ}
    {9}{Ղ}
   }
  \int_case:nn { #4 } % units
   {
    {1}{Ա}
    {2}{Բ}
    {3}{Գ}
    {4}{Դ}
    {5}{Ե}
    {6}{Զ}
    {7}{Է}
    {8}{Ը}
    {9}{Թ}
   }
 }
\ExplSyntaxOff

\begin{document}

\armeniannumeral{1}
\armeniannumeral{2}
\armeniannumeral{3}
\armeniannumeral{4}
\armeniannumeral{5}
\armeniannumeral{6}
\armeniannumeral{7}
\armeniannumeral{8}
\armeniannumeral{9}
\armeniannumeral{10}
\armeniannumeral{11}
\armeniannumeral{23}
\armeniannumeral{55}
\armeniannumeral{1034}
\armeniannumeral{8212}
\armeniannumeral{10000}
\armeniannumeral{99999999}

\setcounter{section}{123}

\armeniannumeral{\value{section}}

\end{document}

enter image description here

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.