2

enter image description here

I want to write bengali in the place where text Helal is written. Related question How to write Bengali in LaTeX? Code of the image is -

\documentclass{scrartcl} 
%\usepackage[banglamainfont=Kalpurush,banglattfont=Siyam Rupali]{latexbangla}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[dvipsnames]{xcolor}
\usepackage{tikzrput}
\usepackage[object=vectorian]{pgfornament} 
\begin{document}  
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
                                  fill = SpringGreen}}   
\unitlength=1cm   

\begin{center}   
\begin{picture}(10,10)%
  \color{Blue}%
   \put(0,0){\framebox(10,10){%
   \rput[tl](-3,5){\pgfornament[width=6cm]{71}}%
   \rput[bl](-3,-5){\pgfornament[width=6cm,,symmetry=h]{71}}%
   \rput[tl](-5,5){\pgfornament[width=2cm]{63}}%
   \rput[tr](5,5){\pgfornament[width=2cm,,symmetry=v]{63}}%
   \rput[bl](-5,-5){\pgfornament[width=2cm,,symmetry=h]{63}}%
   \rput[br](5,-5){\pgfornament[width=2cm,,symmetry=c]{63}}%
   \rput[bl]{-90}(-5,3){\pgfornament[width=6cm]{46}}%
   \rput[bl]{90}(5,-3){\pgfornament[width=6cm]{46}}%
   \rput(0,0){\Huge \color{Maroon}\textbf{Helal}}%
   \rput[b](0,0.5){\pgfornament[width=5cm]{69}}%
   \rput[t](0,-0.5){\pgfornament[width=5cm,symmetry=c]{69}}%
%   \rput[tr]{-30}(-1,2.5){\pgfornament[width=2cm]{57}}%
%   \rput[tl]{30}(1,2.5){\pgfornament[width=2cm,symmetry=v]{57}}}}% 
 }}
\end{picture} 
\end{center}
\end{document} 

1 Answer 1

4

Looks like there are a couple of things causing problems:

  • The latexbangla package requires xelatex, it doesn't seem to work with lualatex.
  • But tikzrput doesn't seem to work with xelatex.

So you have a couple of options I think:

  1. Use normal TikZ code (as demonstrated in the pgfornament manual) instead of \rput from tikzrput.

  2. Use something like Alan Munn's code from How to write Bengali in LaTeX? instead of the latexbangla package, and compile with lualatex.

Option 1

Here is a code example for option 1, compile with xelatex. I used a different font as you can see in the options to latexbangla, so you might want to change that back. (The text used is Google's translation of the word "something" into Bengali.)

As you can see the code is actually quite similar, compare these two corresponding lines:

\rput[bl]{-90}(-5,3){\pgfornament[width=6cm]{46}}%

and

\node [anchor=south west,rotate=-90] at (-5,3) {\pgfornament[width=6cm]{46}};
  • Use \node instead of \rput
  • Instead of bl for bottom left, write anchor=south west. Similarly north east instead of tr, etc.
  • For rotation, add rotation=<angle> inside the brackets after the anchor setting, instead of the extra argument used for \rput.
  • Write at before the coordinate.
  • End the line with a semicolon.

output from xelatex

\documentclass{scrartcl}
\usepackage[banglamainfont=Akaash,banglattfont=Akaash]{latexbangla}

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[dvipsnames]{xcolor}
\usepackage[object=vectorian]{pgfornament} % also loads tikz
\begin{document}  
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
                                  fill = SpringGreen}}   

\begin{center}   
\begin{tikzpicture}[every node/.append style={inner sep=0}]
   \draw [Blue] (-5,-5) rectangle +(10,10);
   \node [anchor=north west] at (-3,5) {\pgfornament[width=6cm]{71}};
   \node [anchor=south west] at (-3,-5) {\pgfornament[width=6cm,,symmetry=h]{71}};
   \node [anchor=north west] at (-5,5) {\pgfornament[width=2cm]{63}};
   \node [anchor=north east] at (5,5) {\pgfornament[width=2cm,,symmetry=v]{63}};
   \node [anchor=south west] at (-5,-5) {\pgfornament[width=2cm,,symmetry=h]{63}};
   \node [anchor=south east] at (5,-5) {\pgfornament[width=2cm,,symmetry=c]{63}};
   \node [anchor=south west,rotate=-90] at (-5,3) {\pgfornament[width=6cm]{46}};
   \node [anchor=south west,rotate=90] at (5,-3) {\pgfornament[width=6cm]{46}};
   \node [Maroon,font=\Huge\bfseries] at (0,0) {কিছু};
   \node [anchor=south] at (0,0.5) {\pgfornament[width=5cm]{69}};
   \node [anchor=north] at (0,-0.5) {\pgfornament[width=5cm,symmetry=c]{69}};
%   \node [anchor=north east,rotate=-30] at (-1,2.5) {\pgfornament[width=2cm]{57}};
%   \node [anchor=north west,rotate=30] at (1,2.5) {\pgfornament[width=2cm,symmetry=v]{57}};

\end{tikzpicture} 
\end{center}
\end{document} 

Option 2

Compile with lualatex.

output from lualatex

\documentclass{scrartcl}
%%%%%%%%
% from https://tex.stackexchange.com/a/99659/586 
\usepackage{polyglossia}
\setmainlanguage[numerals=Devanagari]{bengali}
\setotherlanguage{english}
\newfontfamily\englishfont[Scale=MatchLowercase]{Linux Biolinum O}
\newfontfamily\bengalifont[Script=Bengali]{Akaash}
%%%%%%%%

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[dvipsnames]{xcolor}
\usepackage{tikzrput}
\usepackage[object=vectorian]{pgfornament} 
\begin{document}  
\tikzset{pgfornamentstyle/.style={draw = Periwinkle,
                                  fill = SpringGreen}}   
\unitlength=1cm   

\begin{center}   
\begin{picture}(10,10)%
  \color{Blue}%
   \put(0,0){\framebox(10,10){%
   \rput[tl](-3,5){\pgfornament[width=6cm]{71}}%
   \rput[bl](-3,-5){\pgfornament[width=6cm,,symmetry=h]{71}}%
   \rput[tl](-5,5){\pgfornament[width=2cm]{63}}%
   \rput[tr](5,5){\pgfornament[width=2cm,,symmetry=v]{63}}%
   \rput[bl](-5,-5){\pgfornament[width=2cm,,symmetry=h]{63}}%
   \rput[br](5,-5){\pgfornament[width=2cm,,symmetry=c]{63}}%
   \rput[bl]{-90}(-5,3){\pgfornament[width=6cm]{46}}%
   \rput[bl]{90}(5,-3){\pgfornament[width=6cm]{46}}%
   \rput(0,0){\Huge \color{Maroon}\textbf{কিছু}}%
   \rput[b](0,0.5){\pgfornament[width=5cm]{69}}%
   \rput[t](0,-0.5){\pgfornament[width=5cm,symmetry=c]{69}}%
%   \rput[tr]{-30}(-1,2.5){\pgfornament[width=2cm]{57}}%
%   \rput[tl]{30}(1,2.5){\pgfornament[width=2cm,symmetry=v]{57}}% 
 }}
\end{picture} 
\end{center}
\end{document} 
2
  • For your 2nd option output bengali text is different from the input?
    – alhelal
    Commented Mar 8, 2018 at 8:38
  • @alhelal Ehm, no idea why that would be the case. But use the first one then, if that is correct. Commented Mar 8, 2018 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .