4

A continuation to a previous question I had with an unclaimed account.

How to italicize the letters (k, kh, etc. all the way to o) without wrapping each letter with \textit{}? Is there a way to declare italics for designated rows/columns?

\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}
8
  • 1
    Off-topic, but please don't scale elements which contain text. Either choose a suitable font size instead or change the layout of your table Apr 15 at 10:21
  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Apr 15 at 10:21
  • 1
    Okay I edited the code above. What part of the code is scaling elements and what issues does scaling potentially cause? Apr 15 at 10:33
  • 1
    You can ask stackexchange to merge your accounts Apr 15 at 10:40
  • 2
    Never do \resizebox{\textwidth}{!}{% to tables: it removes any chance of consistent font sizes. Apr 15 at 10:41

1 Answer 1

4

This can be achieved with the option cell{6-Z}{2-11}={font=\itshape}. Here Z denotes the last row.

\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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .