我正在努力处理一些需要特殊字形的词汇,问题是在我的文档中,我需要用斜体显示所有词汇示例,但我的tipa
文档却没有斜体。由于这是样式要求,我希望有一个解决方案,不需要我将 400 页的词汇文档中的每个词汇示例都改为倾斜的(除了我发现倾斜的单词实际上并没有像斜体那样突出,而且也不好看)。我倾向于找到一些解决方案,math
但我可能会招致正确形式的愤怒。任何想法都值得赞赏。
违法者如下:
下面是一些代码,包括我的设置和我尝试过的内容:
\documentclass{book}
\usepackage{lmodern}
\usepackage[LY1,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tipa}
\usepackage[icelandic]{babel}
\begin{document}
the main offenders with italics:
\begin{itemize}
\item *\textit{\textcrb l\={e}waz} (indo-european)
\item \textit{polv\textsoftsign} (slavic)
\item *\textit{\textyogh allan} (indo-european)
\item *\textit{\textroundcap{g}hel} (indo-european)
\item \textit{khol\textacutemacron{e}} (greek)
\item *\textit{pa\textcrd\textcrd\={o}n} (indo-european)
\end{itemize}
Slanted doesn't work either.
neither using slanted straight up: (the accent ones look a little better but not much):
\begin{itemize}
\item *\textsl{\textcrb l\={e}waz} (indo-european)
\item \textsl{polv\textsoftsign} (slavic)
\item *\textsl{\textyogh allan} (indo-european)
\end{itemize}
nor the \textipa{} command (doesn't even slant)
\begin{itemize}
\item \textipa{*\textsl{\textroundcap{g}hel}} (indo-european)
\item \textsl{\textipa{khol\textacutemacron{e}}} (greek)
\item *\textipa{\textsl{pa\textcrd\textcrd\={o}n}} (indo-european)
\end{itemize}
\end{document}
答案1
Slanted 可以工作,只要你帮助 LaTeX 找到正确的字体即可:
\documentclass{book}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tipa}
\usepackage[icelandic]{babel}
\DeclareFontFamilySubstitution{T3}{lmr}{cmr}
\begin{document}
Slanted works
\begin{itemize}
\item *\textsl{\textcrb l\={e}waz} (indo-european)
\item \textsl{polv\textsoftsign} (slavic)
\item *\textsl{\textyogh allan} (indo-european)
\item *\textsl{\textroundcap{g}hel} (indo-european)
\item \textsl{khol\textacutemacron{e}} (greek)
\item *\textsl{pa\textcrd\textcrd\={o}n} (indo-european)
\end{itemize}
\end{document}
有一种专门的字体可用,呈斜体。
\documentclass{book}
\usepackage[scale=0.9]{linguisticspro}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tipa}
\usepackage[icelandic]{babel}
\newcommand{\tipait}[1]{\textit{\textipa{#1}}}
\begin{document}
Italic works, both with \verb|\textit|
\begin{itemize}
\item *\textit{\textcrb l\={e}waz} (indo-european)
\item \textit{polv\textsoftsign} (slavic)
\item *\textit{\textyogh allan} (indo-european)
\item *\textit{\textroundcap{g}hel} (indo-european)
\item \textit{khol\textacutemacron{e}} (greek)
\item *\textit{pa\textcrd\textcrd\={o}n} (indo-european)
\end{itemize}
and \verb|\tipait|
\begin{itemize}
\item *\tipait{\textcrb l\={e}waz} (indo-european)
\item \tipait{polv\textsoftsign} (slavic)
\item *\tipait{\textyogh allan} (indo-european)
\item *\tipait{\textroundcap{g}hel} (indo-european)
\item \tipait{khol\textacutemacron{e}} (greek)
\item *\tipait{pa\textcrd\textcrd\={o}n} (indo-european)
\end{itemize}
\end{document}
答案2
由于问题已经得到解答,因此这更像是后记。
字体和字符一直都是比较难处理的。
与使用上个世纪的传统字体相比,基于 Unicode 的更现代的解决方案是什么样的?
随机选取六种字体样本,可以显示出字体设计师在字体上投入的工作量,并且在某些情况下和组合中,可能仍需要手工制作特定的字形/组合。
平均能量损失
\documentclass{book}
\usepackage{fontspec}
\newcommand\fnamea{Noto Serif}
\newcommand\fnameb{Junicode}
\newcommand\fnamec{Linguistics Pro}
\newcommand\fnamed{DejaVu Serif}
\newcommand\fnamee{Gentium Plus}
\newcommand\fnamef{Liberation Serif}
\newfontfamily\ffonta{\fnamea}
\newfontfamily\ffontb{\fnameb}
\newfontfamily\ffontc{\fnamec}
\newfontfamily\ffontd{\fnamed}
\newfontfamily\ffonte{\fnamee}
\newfontfamily\ffontf{\fnamef}
\setmainfont{\fnamea}
\newcommand\cdmacuteaccent{\symbol{769}}
\newcommand\cdmmacron{\symbol{772}}
\newcommand\cdminvertedbreve{\symbol{785}}
\newcommand\bwithstroke{\symbol{384}}%ƀ}
\newcommand\dwithstroke{\symbol{273}}%đ}
\newcommand\ewithmacron{\symbol{275}}%ē}
\newcommand\owithmacron{\symbol{333}}%ō}
\newcommand\cyrsoftsign{\symbol{1100}}%ь}
\newcommand\lebyogh{\symbol{541}}%ȝ}
\newcommand\ewithmacronandacute{\symbol{7703}}%ē}
%----------------
\newcommand\mybwithstroke{\textit{b}\kern-0.6em{\raisebox{0.35em}{\textit{-}}}\hspace{0.12em}}
\newcommand\mylebyogh{{\ffontd\textit{\symbol{541}}}}%ȝ}
%----------------
\newcommand\mytexta{\bwithstroke le\cdmmacron waz}
\newcommand\mytextb{polv\cyrsoftsign}
\newcommand\mytextc{\lebyogh allan}
\newcommand\mytextd{g\cdminvertedbreve hel}
\newcommand\mytexte{khole\cdmmacron\cdmacuteaccent} \newcommand\mytextf{pa\dwithstroke\dwithstroke o\cdmmacron n}
\newcommand\doexample{%
\hspace{1.5em}\begin{tabular}{|cccc}
*\mytexta &
*\itshape\mytexta &
*\bfseries\mytexta &
*\itshape\bfseries\mytexta \\
\mytextb &
\itshape\mytextb &
\bfseries\mytextb &
\itshape\bfseries\mytextb \\
\ *\mytextc &
*\itshape\mytextc &
*\bfseries\mytextc &
*\itshape\bfseries\mytextc \\
\ *\mytextd &
*\itshape\mytextd &
*\bfseries\mytextd &
*\itshape\bfseries\mytextd \\
\mytexte &
\itshape\mytexte &
\bfseries\mytexte &
\itshape\bfseries\mytexte \\
\ *\mytextf &
*\itshape\mytextf &
*\bfseries\mytextf &
*\itshape\bfseries\mytextf \\
\end{tabular}
}
\begin{document}
Using font \fnamea
\begin{itemize}
\item *\textit{\mytexta} (indo-european)
:
\ewithmacron e\cdmmacron
\item \textit{\mytextb} (slavic)
\item *\textit{\mytextc} (indo-european)
\item *\textit{\mytextd} (indo-european)
\item \textit{khol\ewithmacronandacute\ \mytexte} (greek)
\item *\textit{\mytextf} (indo-european)
: \textit{\owithmacron o\cdmmacron}
\end{itemize}
\ffonta Using font \fnamea
\bigskip
\doexample
\ffontb Using font \fnameb
\bigskip
\doexample
\ffontc Using font \fnamec
\bigskip
\doexample
\ffontd Using font \fnamed
\bigskip
\doexample
\ffonte Using font \fnamee
\bigskip
\doexample
\ffontf Using font \fnamef
\bigskip
\doexample
\ffontc Using font \fnamec
Original: \textit{\mytexta}
Construction: \textit{b} + \textit{-} = \mybwithstroke\
$\mapsto$
\mybwithstroke\textit{le\cdmmacron waz}
\bigskip
Original: \textit{\mytextc}
Construction: other font \mylebyogh\ + \textit{allan} $\mapsto$
\mylebyogh\textit{allan}
\end{document}
附录
有时可以添加手工制作的表格来填补空白。
例如,对于 Linguistics Pro 中的两个空格,可以将现有的 b + - 连接在一起,并从其他字体中借用 yogh
%----------------
\newcommand\mybwithstroke{\textit{b}\kern-0.6em{\raisebox{0.35em}{\textit{-}}}\hspace{0.12em}}
\newcommand\mylebyogh{{\ffontd\textit{\symbol{541}}}}%ȝ}
%----------------
给予: