\let\eachwordone=\it
我在使用Times New Roman 字体时遇到斜体问题\usepackage{times}
。这是我的 tex 文档:
\documentclass[10pt]{article}
\ExpandArgs{c}\newcommand{new@fontshape}{anything}
\usepackage{linguex}
\usepackage[russian,indonesian]{babel}
\usepackage[none]{hyphenat}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{gb4e}
\usepackage{times}
\primebars
\let\emptyset\varnothing
\geometry{
a4paper,
left=3cm,
right=3cm,
top=3cm,
bottom=3cm
}
\newcommand{\?}[1]{\foreignlanguage{russian}{#1}}
\begin{document}
\begin{exe}
\let\eachwordone=\it
\noautomath
\setlength{\glossglue}{2pt plus 2pt minus 1pt}
\renewcommand{\eachwordthree}{\rule[-10pt]{0pt}{0pt}}
\ex % Glosa 1
{\bf(Strategi praanggapan = \textnormal{\textsc{pgp}})}
\glll \?{Геи} \?{всë} \?{равно} \?{пришли} — \?{вопреки} \?{запрету} \\
gei vsë ravno prišli — vopreki zapretu \\
gay semua dengan.sama\textsc{.pgp} pergi\textsc{.pgp} — meskipun larangan\textsc{.pgp} \\
\trans “Para kelompok gay, bagaimanapun, tetap pergi, meskipun terdapat larangan” \\
\end{exe}
\end{document}
从排版图可以看出,它没有将注释的第一行(俄语西里尔文文本)设为斜体。使用以下代码也无法将字体设为斜体:
\texit{\?{Геи} \?{всë} \?{равно} \?{пришли} — \?{вопреки} \?{запрету}}
然而,当使用默认字体时,斜体仍然有效:
\documentclass[10pt]{article}
\ExpandArgs{c}\newcommand{new@fontshape}{anything}
\usepackage{linguex}
\usepackage[russian,indonesian]{babel}
\usepackage[none]{hyphenat}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{gb4e}
\primebars
\let\emptyset\varnothing
\geometry{
a4paper,
left=3cm,
right=3cm,
top=3cm,
bottom=3cm
}
\newcommand{\?}[1]{\foreignlanguage{russian}{#1}}
\begin{document}
\begin{exe}
\let\eachwordone=\it
\noautomath
\setlength{\glossglue}{2pt plus 2pt minus 1pt}
\renewcommand{\eachwordthree}{\rule[-10pt]{0pt}{0pt}}
\ex % Glosa 1
{\bf(Strategi praanggapan = \textnormal{\textsc{pgp}})}
\glll \?{Геи} \?{всë} \?{равно} \?{пришли} — \?{вопреки} \?{запрету} \\
gei vsë ravno prišli — vopreki zapretu \\
gay semua dengan.sama\textsc{.pgp} pergi\textsc{.pgp} — meskipun larangan\textsc{.pgp} \\
\trans “Para kelompok gay, bagaimanapun, tetap pergi, meskipun terdapat larangan” \\
\end{exe}
\end{document}
我如何改进我的 tex 文档以便它\usepackage{times}
使用斜体 Times New Roman 字体\let\eachwordone=\it
?
答案1
该times
软件包不支持西里尔文。
我建议使用\usepackage{newtx}
Tempora 字体系列来替代西里尔文,它支持西里尔文并且也基于 Times。
请注意,\it
和\bf
已被弃用了大约三十年。
\documentclass[10pt]{article}
\ExpandArgs{c}\providecommand{new@fontshape}{}
\usepackage[russian,indonesian]{babel}
\usepackage{newtx}
\usepackage{linguex}
\usepackage[none]{hyphenat}
\usepackage{geometry}
\usepackage{setspace}
%\usepackage{amssymb}% not with newtx
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{gb4e}
\AtBeginDocument{%
\DeclareFontFamilySubstitution{T2A}{\familydefault}{Tempora-TLF}%
}
\primebars
\let\emptyset\varnothing
\geometry{
a4paper,
left=3cm,
right=3cm,
top=3cm,
bottom=3cm
}
\newcommand{\?}[1]{\foreignlanguage{russian}{#1}}
\noautomath
\begin{document}
\begin{exe}
\RenewCommandCopy{\eachwordone}{\itshape}
\setlength{\glossglue}{2pt plus 2pt minus 1pt}
\renewcommand{\eachwordthree}{\rule[-10pt]{0pt}{0pt}}
\ex % Glosa 1
{\bfseries(Strategi praanggapan = \textnormal{\textsc{pgp}})}
\glll \?{Геи} \?{всë} \?{равно} \?{пришли} — \?{вопреки} \?{запрету} \\
gei vsë ravno prišli — vopreki zapretu \\
gay semua dengan.sama\textsc{.pgp} pergi\textsc{.pgp} — meskipun larangan\textsc{.pgp} \\
\trans “Para kelompok gay, bagaimanapun, tetap pergi, meskipun terdapat larangan” \\
\end{exe}
\end{document}