![為某些行和列聲明斜體](https://rvso.com/image/475718/%E7%82%BA%E6%9F%90%E4%BA%9B%E8%A1%8C%E5%92%8C%E5%88%97%E8%81%B2%E6%98%8E%E6%96%9C%E9%AB%94.png)
繼續上一個問題我有一個無人認領的帳戶。
如何將字母(k、kh 等一直到 o)斜體化而不用 \textit{} 包裹每個字母?有沒有辦法為指定的行/列聲明斜體?
\documentclass{article}
\usepackage[margin=2.4cm]{geometry}
\usepackage{rotating}
\usepackage{makecell}
\settowidth\rotheadsize{{\small Compound}}
\newcommand{\NA}{---}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\begin{table}[ht]
\centering
\resizebox{\textwidth}{!}{%
\begin{tblr}{
colspec={l *{11}{c}},
hlines, vlines,
row{1-5}={font=\small},
}
\SetCell[r=5]{c,h} {Place of \\ Articulation} & \SetCell[c=11]{c} Manner of Articulation \\
& \SetCell[c=7]{c} Consonants &&&&&&& \SetCell[c=3]{c} Vowels &&& \SetCell[r=4]{c,h} {Pure \\ Nasal} \\
& \SetCell[c=5]{c} Stops &&&&
& \SetCell[r=3]{c,h} {Semi \\ vowel \\ (voiced)}
& \SetCell[r=3]{c,h} {Sibilant \\ (voiceless)}
& \SetCell[r=3]{c} \rotcell{Short}
& \SetCell[r=3]{c} \rotcell{Long}
& \SetCell[r=3]{c} \rotcell{Compound} & \\
& \SetCell[c=2]{c} Voiceless && \SetCell[c=3]{c} Voiced \\
& {non- \\ aspirate} & aspirate & {non- \\ aspirate} & aspirate & nasal \\
Gutturals & k & kh & g & gh & ṅ & h & & a & ā & e & \\
Palatals & c & ch & j & jh & ñ & y & & i & ī & \SetCell[r=3]{} & \\
Cerebrals & ṭ & ṭh & ḍ & ḍh & ṇ & r\,/\,l\,/\,ḷh & & \SetCell[r=2]{} & \SetCell[r=2]{} & & ṁ \\
Dentals & t & th & d & dh & n & l & s & & & & \\
Labials & p & ph & b & bh & m & v & & u & ū & o & \\
\end{tblr}}
\end{table}
\end{document}
答案1
這可以透過選項來實現cell{6-Z}{2-11}={font=\itshape}
。這裡Z
表示最後一行。
\documentclass[border=6pt]{standalone}
\usepackage{graphicx}
\usepackage{tabularray}
\newcommand{\rotcell}[1]{#1}
\begin{document}
%\begin{table}[ht]
% \centering
% \resizebox{\textwidth}{!}{%
\begin{tblr}{
colspec={l *{11}{c}},
hlines, vlines,
row{1-5}={font=\small},
cell{6-Z}{2-11}={font=\itshape}
}
\SetCell[r=5]{c,h} {Place of \\ Articulation} & \SetCell[c=11]{c} Manner of Articulation \\
& \SetCell[c=7]{c} Consonants &&&&&&& \SetCell[c=3]{c} Vowels &&& \SetCell[r=4]{c,h} {Pure \\ Nasal} \\
& \SetCell[c=5]{c} Stops &&&&
& \SetCell[r=3]{c,h} {Semi \\ vowel \\ (voiced)}
& \SetCell[r=3]{c,h} {Sibilant \\ (voiceless)}
& \SetCell[r=3]{c} \rotcell{Short}
& \SetCell[r=3]{c} \rotcell{Long}
& \SetCell[r=3]{c} \rotcell{Compound} & \\
& \SetCell[c=2]{c} Voiceless && \SetCell[c=3]{c} Voiced \\
& {non- \\ aspirate} & aspirate & {non- \\ aspirate} & aspirate & nasal \\
Gutturals & k & kh & g & gh & ṅ & h & & a & ā & e & \\
Palatals & c & ch & j & jh & ñ & y & & i & ī & \SetCell[r=3]{} & \\
Cerebrals & ṭ & ṭh & ḍ & ḍh & ṇ & r\,/\,l\,/\,ḷh & & \SetCell[r=2]{} & \SetCell[r=2]{} & & ṁ \\
Dentals & t & th & d & dh & n & l & s & & & & \\
Labials & p & ph & b & bh & m & v & & u & ū & o & \\
\end{tblr}%}
%\end{table}
\end{document}