如何在 XeLaTeX 中使用带有 LaTeXbangla 的罗马字体包?我想使用“Palatino”,使用我通常添加的标准方式
\usepackage{palatino}
另外,我尝试过
\setmainfont{Palatino}
\font\pala="Palatino" at 12pt
都不起作用。它默认恢复为 Computer Modern。
以下是示例代码:
\documentclass[12pt]{article}
\setlength{\textheight}{9.1in} % \setlength{\columnsep}{0.2in}
\setlength{\textwidth}{6.50in} % \setlength{\footheight}{0.2in}
\setlength{\topmargin}{-.3in} \setlength{\headheight}{0.0in}
\setlength{\headsep}{0.4in} \setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\usepackage{mdframed}
\usepackage[banglamainfont=Kalpurush, banglattfont=Siyam Rupali, feature=0, changecounternumbering=0]{latexbangla}
% \usepackage[top=8em, left=10em, right=10em, bottom=8em]{geometry}
\usepackage{verbatim,spverbatim, hyperref, tcolorbox, hologo, enumerate, amsthm, xpatch, amsfonts, amssymb, amsmath, enumerate, chngcntr, pgffor}
\hypersetup{hidelinks=yes}
\tcbuselibrary{breakable}
\def\fileversion{v0.2}
\def\filedate{31 October, 2016}
\def\latexbangla{\hologo{LaTeX}\texttt{bangla}}
\newcommand{\pkn}[1]{\texttt{#1}}
\addto\captionsbengali{%
\renewcommand{\contentsname}{Table of Contents}%
}
\usepackage{palatino}
\begin{document}
মহা সমস্যা৷
This is a problem.
\end{document}
答案1
该LaTeXbangla
软件包不提供更改拉丁字体的界面。使用 XeLaTeX 进行编译:
\documentclass{article}
\usepackage[
banglamainfont={Kohinoor Bangla},
banglattfont={Kohinoor Bangla},% I have no Bengali monospaced font on my system
feature=0,
changecounternumbering=0
]{latexbangla}
\newfontfamily{\rmlatin}{TeX Gyre Pagella}
\newfontfamily{\ttlatin}{Latin Modern Mono}
\makeatletter
\renewenvironment{latin}
{\ifx\f@family\btt@@name\ttlatin\else\rmlatin\fi}
{}
\makeatother
\begin{document}
মহা সমস্যা৷
This is not a problem.
\end{document}
将字体更改为您喜欢的样式后。