1

When i include the package \usepackage{polyglossia} the abstract disappears.I want to write Urdu language in-between English lines. Urdu appears fine but the abstarct is gone. This is my code.

   \documentclass[format=acmsmall, review=false, screen=true]{acmart}
    \usepackage{booktabs}
    \usepackage[ruled]{algorithm2e}

    \usepackage{xltxtra}
    \usepackage{fontspec}
    \usepackage{polyglossia}
    \setmainlanguage{english}
    \setotherlanguage{urdu}
    \newfontfamily\urdufont[Script=Arabic,Language=Urdu,Scale=1.5]{Jameel Noori Nastaleeq} %for writing Urdu language

    \renewcommand{\algorithmcfname}{ALGORITHM}

    \begin{document}
   \title{Some title}
   \begin{abstract}
    Abstract goes here..
   \end{abstract}
   \keywords{Some keywords}

   \maketitle

   \section{Introduction}
    Some text here \texturdu{اردو الفاظ} Some more text.

   \end{document}
  • Can you explain how this question relates to your earlier question (tex.stackexchange.com/questions/413398/…)? What did you try, what kind of Urdu text do you need (single words or paragraphs), which (combinations of) language-related packages do you want to use? – Marijn Jun 11 '18 at 9:23
  • That methods writes the word in opposite direction like if i give an example of English language it writes the sentence "this is a book" as "book a is this". It is ok in case of single words but incorrect for sentences. (and i am talking about Urdu language) – tayyaba Jun 11 '18 at 11:54
3

The problem is that bidi.sty seizes the initiative and changes \maketitle to mean a completely different thing.

You can save the meaning before bidi enters the scene and restore it after the package has done its job.

\documentclass[
  format=acmsmall,
  review=false,
  screen=true,
]{acmart}

\let\acmmaketitle\maketitle

\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{urdu}

\newfontfamily\urdufont{Scheherazade}[
  Script=Arabic,
  Language=Urdu,
  %Scale=1.5,
]

\AtBeginDocument{\let\maketitle\acmmaketitle}

\begin{document}

\author{A. Uthor}
\title{Some title}

\begin{abstract}
Abstract goes here..
\end{abstract}
\keywords{Some keywords}

\maketitle

\section{Introduction}
Some text here \texturdu{اردو الفاظ} Some more text.

\end{document}

For producing the example I used Scheherazade because I don't have your font for Urdu. Just use the font you prefer.

enter image description here

  • Yes this solved the problem. Thank you very much. – tayyaba Jun 11 '18 at 11:58

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.