3

I am trying to translate a text from English to Portuguese and in the acknowledgments of the original text, there is a proper name in Marathi. I am compiling my document in pdflatex and would not like to switch to xelatex or luatex. Is there a way to compile the Marathi text with pdflatex? In this case, just a part of the document, a paragraph, for example. The main language of the document will be Portuguese.

Follow the minimal code:

\documentclass[article]{memoir}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[marathi,english,brazilian]{babel}

\begin{document} \chapter{Introdução} Este documento (...) bla bla bla (...) \section{Sobre o }\label{sec:1.1} Este pacote fornece (....) bla bla (...) este pacote. \section{Licença} Copyright \copyright\ 2006–2012 (...). \section{Comentários (Feedback)} Por favor, use a página do projeto (...). \section{Agradecimentos} O pacote foi originalmente (...) e nos anos seguintes.

Os módulos de linguagem deste pacote são possíveis graças aos% seguintes colaboradores:

Ander Zarketa-Astigarraga (basco); Augusto Ritter Stoffel, % Mateus Araújo, Gustavo Barros (brasileiros); (...); %

; निरंजन, Niranjan (Marata); % here is my problem.

(...); Sergiy M. Ponomarenko (ucraniano). \section{Pré-requisitos} \subsection{Requezitos} \subsubsection{e-\TeX} \paragraph{e-\TeX} \subsection{Pacotes recomendados} \subsection{Pacotes Úteis Adicionais}

\end{document}

lucenalex
  • 317
  • 1
    If it is just one name I would make a standalone document using opentype font and just that name then including it in to pdftex using \includegraphics{nirajan.pdf} The chance of getting the required font shaping set up and working in pdftex is close to zero I would say, even if you arranged an 8bit font that pdftex could read. – David Carlisle Feb 24 '22 at 14:39
  • 2
    (Not related to your question, for that following David's suggestion would be the best), but the name you have provided in Marathi is written in English as Niranjan. You are missing an `n' in your text. (Also just out of curiosity) is Marathi called Marata in Portuguese? – Niranjan Feb 24 '22 at 15:05
  • @Niranjan I will correct the name, thanks for the feedback. As for "Marata", I'm not sure, but researching it, it was the translation I found, so I think so. To be honest, I had never even heard about this language until I came across this problem. – lucenalex Feb 24 '22 at 15:14
  • 1
    No worries. Thanks for the correction. Also this link has an entry for Marathi language in Portuguese which uses Marata, so yes you are correct :) – Niranjan Feb 24 '22 at 15:48
  • 2
    @Niranjan hi I thought you might appear here:-) I'll make that an answer then. – David Carlisle Feb 24 '22 at 16:10

2 Answers2

8

If it is just one name I would make a standalone class document using opentype font and just that name, then including it in to pdftex using

\includegraphics{niranjan.pdf}

In your case, you could use something like:

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont[%
  Script=Devanagari,%
  Renderer=Harfbuzz%
]{Shobhika}% ctan.org/pkg/shobhika

\begin{document} निरंजन \end{document}

The chance of getting the required font shaping set up and working in pdftex is close to zero I would say, even if you arranged an 8bit font that pdftex could read.

Niranjan
  • 3,435
David Carlisle
  • 757,742
5

The following will also produce the same text you want to write, but please if you have access to Xe/LuaLaTeX use David's solution.

\def\DevnagVersion{2.17}
\documentclass{article}
\usepackage{devanagari}
\def\niranjan{{\small\dn Enr\2jn}}

\begin{document} Ander Zarketa-Astigarraga (basco); Augusto Ritter Stoffel, Mateus Araújo, Gustavo Barros (brasileiros); (...); \niranjan, Niranjan (Marata) \end{document}

1

Explanation

There is a package named devanagari which provides a legacy method for typesetting Devanagari. So the user has to write the following with the extension .dn and compile it with a program named devnag which is still a part of TeX Live. Then you get the code I have provided above. Since you just needed one word I did this exercise myself and gave you the {\dn Enr\2jn} which is not at all transparent otherwise. The actual .dn file should look like following:

\documentclass{article}
\usepackage{devanagari}

\begin{document} {\dn nira.mjana} \end{document}

Niranjan
  • 3,435