我正在尝试在页面上呈现一些 IPA 字体。
% Headers\RequirePackage{silence} % :-\
\WarningFilter{scrreprt}{Usage of package `titlesec'}
%\WarningFilter{scrreprt}{Activating an ugly workaround}
\WarningFilter{titlesec}{Non standard sectioning command detected}
\documentclass[ twoside,openright,titlepage,numbers=noenddot,%1headlines,
headinclude,footinclude,cleardoublepage=empty,abstract=on,
BCOR=5mm,paper=a5,fontsize=9pt,svgnames
]{scrreprt}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{scrextend}
\usepackage{pifont}
\usepackage{longtable}
\usepackage{scrextend}
\setlength{\columnsep}{0.5cm}
\usepackage{tcolorbox}
\usepackage{fontawesome}
\newfontfamily\hindifont{Noto Sans Devanagari}[Script=Devanagari] % Use any Devanagari font on your system
% --- Sample Script
Consonants
\resizebox{\textwidth}{!}{%
\begin{tabular}{ccccccccccc}
{[}p{]} & pig & {[}pig{]} & & {[}θ{]} & think & {[}θiŋk{]} & & {[}h{]} & hand & {[}hænd{]} \\
{[}b{]} & box & {[}bɑks{]} & & {[}ð{]} & this & {[}ðis{]} & & {[}m{]} & man & {[}mæn{]} \\
{[}t{]} & time & {[}taim{]} & & {[}s{]} & sun & {[}sʌn{]} & & {[}n{]} & nose & {[}nouz{]} \\
{[}d{]} & dog & {[}dɔg{]} & & {[}z{]} & zoo & {[}zu:{]} & & {[}ŋ{]} & wing & {[}wiŋ{]} \\
{[}k{]} & cat & {[}kæt{]} & & {[}ʃ{]} & shoe & {[}ʃuː{]} & & {[}r{]} & run & {[}rʌn{]} \\
{[}g{]} & go & {[}gou{]} & & {[}Ʒ{]} & treasure & {[}tréʒǝr{]} & & {[}l{]} & light & {[}lait{]} \\
{[}f{]} & face & {[}feis{]} & & {[}tʃ{]} & chair & {[}tʃεǝr{]} & & {[}j{]} & year & {[}jiǝr{]} \\
{[}v{]} & vase & {[}veis{]} & & {[}dƷ{]} & juice & {[}dʒuːs{]} & & {[}w{]} & west & {[}west{]}
\end{tabular}%
}\\
Vowel
\resizebox{\textwidth}{!}{%
\begin{tabular}{ccccccccccc}
\multicolumn{7}{c}{\begin{tabular}[c]{@{}c@{}}Monophthongs \\ (single, pure vowel sound)\end{tabular}} &
&
\multicolumn{3}{c}{\begin{tabular}[c]{@{}c@{}}Diphthongs\\ (two vowel sounds \\ joined in one syllable)\end{tabular}} \\
{[}i:{]} & feet & {[}fi:t{]} & & {[}ǝ{]} & bird & {[}bǝrd{]} & & {[}ai{]} & eye & {[}ai{]} \\
{[}i{]} & fish & {[}fiʃ{]}{]} & & {[}u:{]} & two & {[}tu:{]} & & {[}au{]} & mouse & {[}maus{]} \\
{[}e{]} & bed & {[}bed{]} & & {[}u{]} & book & {[}buk{]} & & {[}ɔi{]} & toy & {[}tɔi{]} \\
{[}æ{]} & apple & {[}æpl{]} & & {[}ɔ{]} & ball & {[}bɔl{]} & & {[}ju{]} & you & {[}ju{]} \\
{[}ʌ{]} & sun & {[}sʌn{]} & & {[}ɑ{]} & mama & {[}m'ɑmɑ{]} & & {[}ei{]} & cake & {[}keik{]} \\
{[}ǝ{]} & alive & {[}ǝl'aiv{]} & & & & & & {[}ou{]} & go & {[}gou{]}
\end{tabular}%
}
现在,有些字体正在被渲染,但有些字体没有被渲染,例如注意shoe
符号ʃ
。
我是否缺少任何包或者存在逻辑错误?
答案1
这只是选择具有字符的字体的问题。
如果你使用 xelatex 的默认计算机现代,日志文件将显示多个
Missing character: There is no ʃ in font [lmroman10-regular]:mapping=tex-text;!
如果我切换到 Arial,则不会出现这样的警告并且所有字符都会出现,许多其他字体也会可用,但没有字体可以覆盖所有 Unicode,因此您需要选择一种可以覆盖您需要的范围的字体。
我删除了\resizebox
。
\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
\centering
Consonants
\begin{tabular}{@{}ccccccccccc@{}}
[p] & pig & [pig] & & [θ] & think & [θiŋk] & & [h] & hand & [hænd] \\\relax
[b] & box & [bɑks] & & [ð] & this & [ðis] & & [m] & man & [mæn] \\\relax
[t] & time & [taim] & & [s] & sun & [sʌn] & & [n] & nose & [nouz] \\\relax
[d] & dog & [dɔg] & & [z] & zoo & [zu:] & & [ŋ] & wing & [wiŋ] \\\relax
[k] & cat & [kæt] & & [ʃ] & shoe & [ʃuː] & & [r] & run & [rʌn] \\\relax
[g] & go & [gou] & & [Ʒ] & treasure & [tréʒǝr] & & [l] & light & [lait] \\\relax
[f] & face & [feis] & & [tʃ] & chair & [tʃεǝr] & & [j] & year & [jiǝr] \\\relax
[v] & vase & [veis] & & [dƷ] & juice & [dʒuːs] & & [w] & west & [west]
\end{tabular}
Vowel
\begin{tabular}{@{}ccccccccccc@{}}
\multicolumn{7}{c}{\begin{tabular}[c]{@{}c@{}}Monophthongs \\ (single, pure vowel sound)\end{tabular}} &
&
\multicolumn{3}{c}{\begin{tabular}[c]{@{}c@{}}Diphthongs\\\relax (two vowel sounds \\\relax joined in one syllable)\end{tabular}} \\\relax
[i:] & feet & [fi:t] & & [ǝ] & bird & [bǝrd] & & [ai] & eye & [ai] \\\relax
[i] & fish & [fiʃ]] & & [u:] & two & [tu:] & & [au] & mouse & [maus] \\\relax
[e] & bed & [bed] & & [u] & book & [buk] & & [ɔi] & toy & [tɔi] \\\relax
[æ] & apple & [æpl] & & [ɔ] & ball & [bɔl] & & [ju] & you & [ju] \\\relax
[ʌ] & sun & [sʌn] & & [ɑ] & mama & [m'ɑmɑ] & & [ei] & cake & [keik] \\\relax
[ǝ] & alive & [ǝl'aiv] & & & & & & [ou] & go & [gou{]}
\end{tabular}%
\end{document}