我想写孟加拉在文本的位置希拉勒写得。相关问题如何用 LaTeX 编写孟加拉语? 图片代码为 -
\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
看起来有几件事导致了问题:
- 该
latexbangla
包需要xelatex
,但它似乎不能与之一起工作lualatex
。 - 但
tikzrput
似乎不起作用xelatex
。
所以我认为你有几个选择:
使用普通的 TikZ 代码(如
pgfornament
手册中所示)而不是\rput
来自tikzrput
。使用类似 Alan Munn 的代码如何用 LaTeX 编写孟加拉语?而不是
latexbangla
包,并用 进行编译lualatex
。
选项1
这是选项 1 的代码示例,使用 进行编译xelatex
。我使用了不同的字体,如您在 选项中看到的那样latexbangla
,因此您可能需要将其改回来。(使用的文本是 Google 将单词“something”翻译成孟加拉语。)
正如您所看到的,代码实际上非常相似,比较以下两行相应的代码:
\rput[bl]{-90}(-5,3){\pgfornament[width=6cm]{46}}%
和
\node [anchor=south west,rotate=-90] at (-5,3) {\pgfornament[width=6cm]{46}};
- 使用
\node
而不是\rput
- 不要将
bl
forb
ottoml
eft 写成anchor=south west
。同样,north east
不要将 等写成 。tr
- 对于旋转,在设置
rotation=<angle>
后添加括号内anchor
,而不是使用的额外参数\rput
。 - 写
at
在坐标前。 - 用分号结束该行。
\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}
选项 2
用 编译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}