希腊文部分未加粗

希腊文部分未加粗

我正在尝试用希腊语写一些练习的答案,但如果使用希腊字母,我无法使该部分加粗并加下划线。可能值得注意的是:

  1. 如果我使用它就可以正常工作\textlatin{Ex 1}
  2. 使用\section*{\pmb{\underline{Άσκηση 1}}}给了我我所寻找的东西

下面是我使用的所有软件包的代码:

% Set the font (output) encoding
\usepackage[LGR]{fontenc}
% Greek-specific commands
\usepackage[greek]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage{alphabeta}
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{mathpazo} % Palatino font
\usepackage{tgtermes}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage{geometry}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsthm}
\newtheorem{theorem}{Θεώρημα}[section]
\newtheorem{lemma}[theorem]{Λήμμα}
\usepackage{etoolbox}
\usepackage[tableaux]{prooftrees}
\renewcommand*\linenumberstyle[1]{(#1)}
\usepackage{hyperref}

\begin{document}
\section*{Άσκηση 1}}
Καλημέρα
\end{document}

答案1

我听从了用户@miltos 的建议:我已经放了\usepackage[T1,LGR]{fontenc},我根本不应该加载 inputenc。问题是 mathpazo 和 tgtermes 字体包的 sovrapposition 导致了这个问题。

\documentclass[a4paper,12pt]{book}
\usepackage[LGR,T1]{fontenc}
% Greek-specific commands
\usepackage[greek]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{alphabeta}
\usepackage{indentfirst}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsthm}
\newtheorem{theorem}{Θεώρημα}[section]
\newtheorem{lemma}[theorem]{Λήμμα}
\usepackage{etoolbox}
\usepackage[tableaux]{prooftrees}
\renewcommand*\linenumberstyle[1]{(#1)}
\usepackage{hyperref}

\begin{document}
\section*{Άσκηση 1}
Καλημέρα \textbf{Καλημέρα}
\end{document}

在此处输入图片描述

答案2

您需要使用支持希腊字母的字体系列,但mathpazo不支持,也不支持tgtermes

顺便说一句,使用 Times(tgtermes提供 的克隆版)处理文本而使用 Palatino(由 提供mathpazo)处理数学运算,这很奇怪。

如果您不知道某个包的作用,就不要加载它。

如果你查看日志文件,你会发现

LaTeX Font Warning: Font shape `LGR/qtm/m/n' undefined
(Font)              using `LGR/cmr/m/n' instead on input line 18.

LaTeX Font Warning: Font shape `LGR/qtm/b/n' undefined
(Font)              using `LGR/qtm/m/n' instead on input line 25.

第一个警告是最重要的:它告诉您字体系列qtm(来自tgtermes)不支持 LGR(希腊语)编码,因此它用默认值替换它,在本例中是 LaTeX 所知的cmrLGR 的 Beccari 字体。

下一个警告类似:当 LaTeX 想要设置章节标题时,它会尝试使用粗体,但意识到该系列中没有粗体 LGR 字体qtm,因此它会用在第一次警告时临时创建的别名替换它。没有粗体。

如果您的文档使用数学,则需要选择同时支持希腊文和数学的字体系列。如果您想要 Times(的克隆版),则可以将 Tempora 用于文本,将 NewTX 用于数学。

我不得不改变包加载的顺序,因为amsmathamssymb(由 加载prooftrees)必须在 之前newtxmath

我离开了geometry,但是0.5英寸的边距的设置相当奇怪。

\documentclass[a4paper]{article}
\usepackage[margin=0.5in]{geometry}
%\usepackage[LGR]{fontenc}
\usepackage[greek]{babel}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage[tableaux]{prooftrees}
\usepackage{tempora,newtxmath}

\usepackage{graphicx}
\usepackage{indentfirst}
\usepackage{etoolbox}
\usepackage{hyperref}

\newtheorem{theorem}{Θεώρημα}[section]
\newtheorem{lemma}[theorem]{Λήμμα}
\renewcommand*\linenumberstyle[1]{(#1)}

\begin{document}

\section*{Άσκηση 1}

Καλημέρα $a+b=c$

\end{document}

在此处输入图片描述

相关内容