4

Partly as a challenge and partly because I wanted an electronic copy, I sat down last night to try to LaTeX the following complicated table:

enter image description here

The first problems I encountered were the size and the complex nature of the cells. I managed to overcome the size problem by using a \small type size declaration. However, the heavy (sometimes nested) use of \multirow and multicolumn makes for intensely messy code and I was first wondering if there were any packages that would be better suited to a table such as this.

My next problem is with the internal braces. I haven't yet reached the vertical braces, but I managed the horizontal one you can see just under "WHITE" like this:

\newlength{\bracewidth}
\newcommand{\underoverbrace}[1]{%
   \settowidth{\bracewidth}{#1}%
   \raisebox{-3.4ex}[1ex][1.5ex]{%
     \makebox[0pt][c]{\hspace{\bracewidth}$\overbrace{\quad\phantom{#1}\quad}$}%
       }%
   #1}%

%Optional arguments of \raisebox are tweaked in final version

{\small

  \begin{tabular}{cc}

    \multicolumn{2}{c}{\underoverbrace{\textit{V\={a}jasaneyins}}} \\

    \textit{M\={a}dhyandinas} & \textit{K\={a}\d{n}vas} \\

  \end{tabular}

}

I was quite pleased with this, and the final result (after various tweaks which needed to be applied) looks like this:

enter image description here

After almost completing the first two rows, this is what I had:

\documentclass[10pt,landscape]{article}
\pagestyle{empty}
\usepackage[margin=0.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{graphicx}

\newlength{\bracewidth}
\newcommand{\underoverbrace}[1]{%
   \settowidth{\bracewidth}{#1}%
   \raisebox{-3.4ex}[1ex][0ex]{%
     \makebox[0pt][c]{\hspace{\bracewidth}$\overbrace{\quad\phantom{#1}\quad}$}%
       }%
   #1}%

\begin{document}

  \title{Conspectus of the Main Works of Vedic Literature}
  \date{}
  \author{}
  \maketitle

  \begin{table}[!ht]

    \begin{center}

      {\small

        \begin{tabular}{c|cc|ccc|cccc|cc|cc}

          & \multicolumn{2}{c|}{\multirow{2}{*}{\textsc{\d{R}g-Veda}}} &
          \multicolumn{3}{c|}{\multirow{2}{*}{\textsc{S\={a}ma-Veda}}} &
          \multicolumn{6}{c|}{\textsc{Yajur-Veda}} &
          \multicolumn{2}{c}{\multirow{2}{*}{\textsc{Atharva-Veda}}} \\

          & & & & & & \multicolumn{4}{c|}{``Black''} &
          \multicolumn{2}{c|}{``White''} & & \\ \hline

          & & & & & & & & & &
          \multicolumn{2}{c|}{\underoverbrace{\textit{V\={a}jasaneyins}}}
          & & \\

          & \textit{\'{S}\={a}kalas} & \textit{V\={a}\d{s}kalas} &
          \textit{R\={a}\d{n}\={a}yan\={\i}yas} & \textit{Kauthumas} &
          \textit{Jaimin\={\i}yas} &
          \parbox[c]{17mm}{\centering\textit{Kapi\d{s}\d{t}hala Ka\d{t}has}} &
          \parbox[c]{11mm}{\centering\textit{Caraka Ka\d{t}has}} &
          \textit{Maitr\={a}ya\d{n}\={\i}yas} &
          \textit{Taittir\={\i}yakas} &
          \rule{0cm}{-2ex}\textit{M\={a}dhyandinas} &
          \textit{K\={a}\d{n}vas} & \textit{\'{S}aunakas} &
          \textit{Paippal\={a}das} \\

          & \'{S}\={a}kala-S. & V\={a}\d{s}kala-S. &
          R\={a}\d{n}\={a}yan\={\i}ya-S. & Kauthuma-S. &
          Jaimin\={\i}ya-S. & & & & & M\={a}dhyandina-S. &
          K\={a}\d{n}va-S. & \'{S}aunaka-S. & Paippal\={a}da-S. \\

        \end{tabular}

      }

    \end{center}

  \end{table}

\end{document}

enter image description here

I thought everything was going really well. But then I tried to add the rotated entry in the first column (it's necessary to rotate this, or it won't fit on the page. I could hyphenate, but it'd start getting silly). I used the answer to this question to generate the following:

Full MWE

\documentclass[10pt,landscape]{article}
\pagestyle{empty}
\usepackage[margin=0.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{graphicx}

\newlength{\bracewidth}
\newcommand{\underoverbrace}[1]{%
   \settowidth{\bracewidth}{#1}%
   \raisebox{-3.4ex}[1ex][0ex]{%
     \makebox[0pt][c]{\hspace{\bracewidth}$\overbrace{\quad\phantom{#1}\quad}$}%
       }%
   #1}%

\begin{document}

  \title{Conspectus of the Main Works of Vedic Literature}
  \date{}
  \author{}
  \maketitle

  \begin{table}[!ht]

    \begin{center}

      {\small

        \begin{tabular}{c|cc|ccc|cccc|cc|cc}

          & \multicolumn{2}{c|}{\multirow{2}{*}{\textsc{\d{R}g-Veda}}} &
          \multicolumn{3}{c|}{\multirow{2}{*}{\textsc{S\={a}ma-Veda}}} &
          \multicolumn{6}{c|}{\textsc{Yajur-Veda}} &
          \multicolumn{2}{c}{\multirow{2}{*}{\textsc{Atharva-Veda}}} \\

          & & & & & & \multicolumn{4}{c|}{``Black''} &
          \multicolumn{2}{c|}{``White''} & & \\ \hline

          \parbox[t]{3mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{Sa\d{m}hit\={a}}}}
          & & & & & & & & & &
          \multicolumn{2}{c|}{\underoverbrace{\textit{V\={a}jasaneyins}}}
          & & \\

          & \textit{\'{S}\={a}kalas} & \textit{V\={a}\d{s}kalas} &
          \textit{R\={a}\d{n}\={a}yan\={\i}yas} & \textit{Kauthumas} &
          \textit{Jaimin\={\i}yas} &
          \parbox[c]{17mm}{\centering\textit{Kapi\d{s}\d{t}hala Ka\d{t}has}} &
          \parbox[c]{11mm}{\centering\textit{Caraka Ka\d{t}has}} &
          \textit{Maitr\={a}ya\d{n}\={\i}yas} &
          \textit{Taittir\={\i}yakas} &
          \rule{0cm}{-2ex}\textit{M\={a}dhyandinas} &
          \textit{K\={a}\d{n}vas} & \textit{\'{S}aunakas} &
          \textit{Paippal\={a}das} \\

          & \'{S}\={a}kala-S. & V\={a}\d{s}kala-S. &
          R\={a}\d{n}\={a}yan\={\i}ya-S. & Kauthuma-S. &
          Jaimin\={\i}ya-S. & & & & & M\={a}dhyandina-S. &
          K\={a}\d{n}va-S. & \'{S}aunaka-S. & Paippal\={a}da-S. \\

        \end{tabular}

      }

    \end{center}

  \end{table}

\end{document}

But this does not produce good results:

enter image description here

A little experimentation suggests that my various spacing commands for the "\underoverbrace" are (at least partly) responsible for breaking this solution.

So, at this point, I decided to throw in the towel.

The TL;DR

Can I have my cake and eat it? I'd like to find a way to achieve all of the following:

  • Internal braces in the table
  • Rotated cell entries
  • Cells which span columns and/or rows

Additionally, if anybody has any advice on ways to improve either the code, or the output, I'd gladly receive it.

As you can imagine, part of me wants to write a "do it for me" question. But, apart from the fact that that's not really kosher, I'd actually really appreciate it if you didn't do the whole table for me, because I want to have the experience of completing the table myself. However, it is beyond me how to achieve the various effects in the first three rows. It's fairly easy after that. So I'd like to know how to achieve all three of the above in one table.

2
  • I like use \rule for braces with 0pt for one of the dimensions. Another trick is to use \fbox with \fboxrule=0pt. – John Kormylo Aug 6 '15 at 15:44
  • @LaRiFaRi Thanks! Sorry, dunno how I missed that, I've fixed it now. – Au101 Aug 12 '15 at 13:29
3
+50

Don't use a \parbox - I'm pretty sure multirow already uses one. Because you are rotating the text upwards, so to speak, you need to start the rotation below the uppermost point. To facilitate this, multirow lets you specify the number of rows as a negative integer, rather than a positive one.

So move the rotated cell to a later row in the table (the last one involved) and delete the \parbox from around it.

In addition, note that you almost certainly should use \centering rather than the center environment within a table (or figure) to avoid the introduction of spurious additional vertical spacing. Also, you don't need an additional group to constrain the scope of \small since you want it to apply to everything in the table environment anyway.

mathtools loads amsmath with a few fixes/enhancements. graphicx was not needed for your MWE. I've also passed a4paper as a class option in case the information is useful to the class or other packages, which also allows you to dispense with the \geometry{} line.

Close-up of modified table:

rotated cell with negative row specification

Complete code:

\documentclass[10pt,landscape,a4paper]{article}
\pagestyle{empty}
\usepackage[margin=0.8cm]{geometry}
\usepackage[parfill]{parskip}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{multirow}

\newlength{\bracewidth}
\newcommand{\underoverbrace}[1]{%
  \settowidth{\bracewidth}{#1}%
  \raisebox{-3.4ex}[1ex][0ex]{%
    \makebox[0pt][c]{\hspace{\bracewidth}$\overbrace{\quad\phantom{#1}\quad}$}%
  }%
  #1}%

\begin{document}

\title{Conspectus of the Main Works of Vedic Literature}
\date{}
\author{}
\maketitle
\begin{table}[!ht]
  \centering
  \small
  \begin{tabular}{c|cc|*{3}{c}|*{4}{c}|cc|cc}

      & \multicolumn{2}{c|}{\multirow{2}{*}{\textsc{\d{R}g-Veda}}} &
      \multicolumn{3}{c|}{\multirow{2}{*}{\textsc{S\={a}ma-Veda}}} &
      \multicolumn{6}{c|}{\textsc{Yajur-Veda}} &
      \multicolumn{2}{c}{\multirow{2}{*}{\textsc{Atharva-Veda}}} \\

      & & & & & & \multicolumn{4}{c|}{``Black''} &
      \multicolumn{2}{c|}{``White''} & & \\ \hline
      & & & & & & & & & &
      \multicolumn{2}{c|}{\underoverbrace{\textit{V\={a}jasaneyins}}}
      & & \\

      & \textit{\'{S}\={a}kalas} & \textit{V\={a}\d{s}kalas} &
      \textit{R\={a}\d{n}\={a}yan\={\i}yas} & \textit{Kauthumas} &
      \textit{Jaimin\={\i}yas} &
      \parbox[c]{17mm}{\centering\textit{Kapi\d{s}\d{t}hala Ka\d{t}has}} &
      \parbox[c]{11mm}{\centering\textit{Caraka Ka\d{t}has}} &
      \textit{Maitr\={a}ya\d{n}\={\i}yas} &
      \textit{Taittir\={\i}yakas} &
      \rule{0cm}{-2ex}\textit{M\={a}dhyandinas} &
      \textit{K\={a}\d{n}vas} & \textit{\'{S}aunakas} &
      \textit{Paippal\={a}das} \\

      \multirow{-3}{*}{\rotatebox[origin=c]{90}{Sa\d{m}hit\={a}}}& \'{S}\={a}kala-S. & V\={a}\d{s}kala-S. &
      R\={a}\d{n}\={a}yan\={\i}ya-S. & Kauthuma-S. &
      Jaimin\={\i}ya-S. & & & & & M\={a}dhyandina-S. &
      K\={a}\d{n}va-S. & \'{S}aunaka-S. & Paippal\={a}da-S. \\

    \end{tabular}
\end{table}
\end{document}
1

Well, whoever said making tables in LaTeX was difficult ... had - had tried to make tables in LaTeX - and - and knew what they were talking about ...

Below is my complete code for this table:

\documentclass[10pt,landscape]{article}
\pagestyle{empty}
\usepackage[margin=0.5cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{graphicx}

\newcommand{\underoverbrace}[1]{%
  \raisebox{-3.4ex}[1ex][0ex]{%
    \makebox[0pt][l]{$\overbrace{\phantom{#1}}$}%
      }%
  #1}    

\newcommand{\mybrace}{\mbox{%
  \hspace{-14pt}%
  $\left.
  \begin{array}{l}
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
  \end{array}
  \right\}$%
  }}

\begin{document}

\title{Conspectus of the Main Works of Vedic Literature}
\date{}
\author{}
\maketitle

\begin{table}[!ht]\setlength{\tabcolsep}{0.13em}

  \centering\small

  \begin{tabular}{c|cc|ccc|cccc|cc|cc}

    &
    \multicolumn{2}{c|}{%
      \multirow{2}{*}{%
        \textsc{\d{R}g-Veda}%
    }} &
    \multicolumn{3}{c|}{%
      \multirow{2}{*}{%
        \textsc{S\={a}ma-Veda}%
    }} &
    \multicolumn{6}{c|}{%
      \textsc{Yajur-Veda}%
    } &
    \multicolumn{2}{c}{%
      \multirow{2}{*}{%
        \textsc{Atharva-Veda}%
    }} \\

    & & & & & &
    \multicolumn{4}{c|}{%
      ``Black''%
    } &
    \multicolumn{2}{c|}{%
      ``White''%
    } & & \\ \hline

    & & & & & & & & & &
    \multicolumn{2}{c|}{%
      \underoverbrace{\textit{V\={a}jasaneyins}}%
    } & & \\

    & \textit{\'{S}\={a}kalas} & \textit{V\={a}\d{s}kalas} &
    \textit{R\={a}\d{n}\={a}yan\={\i}yas} & \textit{Kauthumas} &
    \textit{Jaimin\={\i}yas} &
    \parbox[c]{17mm}{\centering\textit{Kapi\d{s}\d{t}hala Ka\d{t}has}} &
    \parbox[c]{11mm}{\centering\textit{Caraka Ka\d{t}has}} &
    \textit{Maitr\={a}ya\d{n}\={\i}yas} & \textit{Taittir\={\i}yakas} &
    \rule{0cm}{-2ex}\textit{M\={a}dhyandinas} & \textit{K\={a}\d{n}vas} &
    \textit{\'{S}aunakas} & \textit{Paippal\={a}das} \\

    \multirow{-4}{*}{%
      \rotatebox[origin=c]{90}{Sa\d{m}hit\={a}}%
    } & \'{S}\={a}kala-S. & V\={a}\d{s}kala-S. &
    R\={a}\d{n}\={a}yan\={\i}ya-S. & Kauthuma-S. & Jaimin\={\i}ya-S. &
    \multirow{5}{19mm}{%
      \mybrace\parbox[c]{17mm}{\centering{}Kapi\d{s}\d{t}hala-\\Ka\d{t}ha-S.}%
    } &
    \multirow{5}{18mm}{%
      \mybrace{}K\={a}\d{t}haka-S.%
    } &
    \multirow{5}{22mm}{%
      \mybrace{}Maitr\={a}ya\d{n}\={\i}-S.%
    } &
    \multirow{5}{19mm}{%
      \hspace{-6pt}\mybrace\parbox[c]{17mm}{\centering\hspace{6pt}%
      Taittir\={\i}ya-\\\hspace{6pt}S. \& B.}%
    } & M\={a}dhyandina-S. & K\={a}\d{n}va-S. & \'{S}aunaka-S. &
    Paippal\={a}da-S. \\ \cline{1-6}\cline{11-14}

    &
    \multirow{2}{*}{%
      \textit{Aitareyins}%
    } &
    \multirow{2}{*}{%
      \parbox[c]{21mm}{\centering\textit{Kau\d{s}\={\i}takins
      (\'{S}\={a}\.{n}kh\={a}yanas)}}%
    } &
    \multicolumn{2}{c}{%
      \rule{0cm}{2.3ex}T\={a}\d{n}\d{d}ya-B. (Pa\~{n}cavi\d{m}\'{s}a-B.)%
    } &
    \multirow{4}{*}{%
      \parbox[c]{19mm}{\centering{}Jaimin\={\i}ya-B. \={A}r\d{s}eya-B.}%
    } & & & & &
    \multirow{4}{*}{%
      \'{S}atapatha-B.%
    } &
    \multirow{4}{*}{%
      \'{S}atapatha-B.%
    } & &
    \multirow{4}{*}{%
      Gopatha-B. (?)%
    } \\

    & & &
    \multicolumn{2}{c}{%
      \d{S}a\d{d}vi\d{m}\'{s}a-B.%
    } & & & & & & & & & \\

    &
    \multirow{2}{*}{%
      Aitareya-B.%
    } &
    \multirow{2}{*}{%
      Kau\d{s}\={\i}taki-B.%
    } &
    \multicolumn{2}{c}{%
      Ch\={a}ndogya-B.%
    } & & & & & & & & & \\

    \multirow{-4}{*}{%
      \rotatebox[origin=c]{90}{Br\={a}hma\d{n}a}%
    } & & &
    \multicolumn{2}{c}{%
      \={A}r\d{s}eya-B.%
    } & & & & & & & & & \\ \hline

    \parbox[c]{9mm}{\centering\rule{0cm}{2.3ex}%
    \={A}ra\d{n}-yaka%
    \rule[-1ex]{0cm}{0ex}} & \rule{0cm}{2.3ex}Aitareya-\={A}. &
    Kau\d{s}\={\i}taki-\={A}. & & & & & & & Taittir\={\i}ya-\={A}. &
    B\d{r}had-\={A}. & B\d{r}had-\={A}. & & \\ \hline

    \rotatebox[origin=c]{90}{Upani\d{s}ad} & Aitareya-U. &
    Kau\d{s}\={\i}taki-U. &
    \multicolumn{2}{c}{%
      Ch\={a}ndogya-U.%
    } &
    \parbox[c]{18mm}{\centering{}Kena-U.\\Upani\d{s}ad-B.} & & Ka\d{t}ha-U. &
    Maitr\={a}ya\d{n}a-U. &
    \parbox[c]{23mm}{\centering\rule{0cm}{2.3ex}%
    Taittir\={\i}ya-U.\\Mah\={a}n\={a}r\={a}-ya\d{n}a-U.\\%
    \rule[-1ex]{0cm}{0ex}\'{S}vet\={a}\'{s}vatara-U.} &
    \parbox[c]{19mm}{\centering{}B\d{r}had-\={A}ra\d{n}-\\yaka-U.\\%
    \={I}\'{s}a-U.} &
    \parbox[c]{19mm}{\centering{}B\d{r}had-\={A}ra\d{n}-\\yaka-U.\\%
    \={I}\'{s}a-U.} &
    \multicolumn{2}{c}{%
      \parbox[c]{28mm}{\centering{}Mu\d{n}\d{d}aka-U.\\Pra\'{s}na-U.\\%
      M\={a}\d{n}\d{d}\={u}kya-U. (i.a.)}%
    } \\ \hline

    &
    \multirow{6}{*}{%
      \parbox[c]{19mm}{\centering\={A}\'{s}val\={a}yana-\'{S}.}%
    } &
    \multirow{6}{*}{%
      \parbox[c]{18mm}{\centering\'{S}\={a}\.{n}kh\={a}yana-\'{S}.}%
    } &
    \multicolumn{2}{c}{%
      \multirow{3}{*}{%
        Ma\'{s}aka-\'{S}. (\={A}r\d{s}eyakalpa)%
    }} &
    \multirow{6}{*}{%
      Jaimin\={\i}ya-\'{S}.%
    } & &
    \multirow{6}{*}{%
      Yaj\~{n}a-\'{S}.%
    } &
    \multirow{6}{*}{%
      M\={a}nava-\'{S}.%
    } &
    \rule{0cm}{2.5ex}Baudh\={a}yana-\'{S}. &
    \multicolumn{2}{c|}{%
      \multirow{6}{*}{%
        K\={a}ty\={a}yana-\'{S}.%
    }} &
    \multirow{6}{*}{%
       Vait\={a}na-\'{S}.%
    } & \\

    & & & & & & & & & Bh\={a}radv\={a}ja-\'{S}. & & & & \\

    & & & & & & & & & \={A}pastamba-G. & & & & \\

    & & &
    \multirow{3}{*}{%
      \parbox[c]{19mm}{\centering{}Drahy\={a}ya\d{n}a-\'{S}.}%
    } &
    \multirow{3}{*}{%
      \parbox[c]{16mm}{\centering{}L\={a}\d{t}y\={a}yana-\'{S}.}%
    } & & & & & Hira\d{n}yake\'{s}i-\'{S}. & & & & \\

    & & & & & & & & & V\={a}dh\={u}la-\'{S}. & & & & \\

    \multirow{-6}{*}{%
      \rotatebox[origin=c]{90}{\'{S}rauta-S\={u}tra}%
    } & & & & & & & & & Vaikh\={a}nasa-\'{S}. & & & & \\ \hline

    \rotatebox[origin=c]{90}{G\d{r}hya-S\={u}tra} &
    \parbox[c]{19mm}{\centering\={A}\'{s}val\={a}yana-\'{S}.} & 
    \parbox[c]{18mm}{\centering\'{S}\={a}\.{n}kh\={a}yana-\'{S}.} &
    Kh\={a}dira-G. & Gobhila-G. & Jaimini-G. & & Laug\={a}k\d{s}i-G. &
    \parbox[c]{20mm}{\centering{}M\={a}nava-G.\\V\={a}r\={a}ha-G. (?)} &
    \parbox[c]{23mm}{\centering{}\rule{0cm}{2ex}Baudh\={a}yana-G.\\%
    Bh\={a}radv\={a}ja-G.\\\={A}pastamba-G.\\Hira\d{n}yake\'{s}i-G.\\%
    V\={a}dh\={u}la-G.\\Vaikh\={a}nasa-G.\rule[-1ex]{0cm}{0ex}} &
    \multicolumn{2}{c|}{%
      P\={a}raskara-G.
    } & Kau\'{s}ika-G. & \\ \hline

    \parbox[c]{9mm}{\centering\rule{0cm}{2.4ex}%
    \'{S}ulva-S\={u}tra%
    \rule[-1ex]{0cm}{0ex}} & & & & & & & Laug\={a}k\d{s}i-\'{S}. &
    M\={a}nava-\'{S}. &
    \parbox[c]{23mm}{\centering{}\rule{0cm}{2ex}Baudh\={a}yana-\'{S}.\\%
    \={A}pastamba-\'{S}.} &
    \multicolumn{2}{c|}{%
     K\={a}ty\={a}yana-\'{S}.
    } & & \\ \hline

    \parbox[c]{13mm}{\centering{}\rule{0cm}{2.2ex}%
    Dharma-S\={u}tra%
    \rule[-1ex]{0cm}{0ex}} &
    \multicolumn{2}{c|}{%
      V\={a}si\d{s}\d{t}ha-Dh.
    } &
    \multicolumn{3}{c|}{%
      Gautam\={\i}ya-Dh.\ (?)
    } & & \parbox[c]{14mm}{\centering{}Vai\d{s}\d{n}ava-Dh.} &
    H\={a}r\={\i}ta-Dh. & \rule{0cm}{6ex}\parbox[c]{24mm}{\centering%
    Baudh\={a}yana-Dh.\\\={A}pastamba-Dh.\\Hira\d{n}yake\'{s}i-Dh.\\%
    Vaikh\={a}nasa-Dh.}\rule[-5ex]{0cm}{0ex} &
    \multicolumn{2}{c|}{%
      (Y\={a}j\~{n}avalkya-Sm\d{r}ti)
    } & & \\

  \end{tabular}

\end{table}

\end{document}

enter image description here

Producing this table required a lot of visual formatting and tweaking. Many entries are enclosed in parboxs, e.g.:

\parbox[c]{17mm}{\centering\textit{Kapi\d{s}\d{t}hala Ka\d{t}has}}

The \parbox command produces a box with a width which must be specified. It allows us to define the exact width of a cell - so that it doesn't take up too much space - and to break lines within a cell. I decided upon the width of each parbox by starting with a simple guess. I then worked my way up - 1 mm at a time - until the box was wide enough and there were no Overfull \hbox warnings. At the same time, it was necessary to ensure that the value was the lowest possible value so that too much space wasn't taken up and, sometimes, so that lines were broken in the correct places. Sometimes, of course, my initial guess would be too high. I would then work my way down until I got an Overfull \hbox warning, and then add 1 mm.

I was also forced to make extensive use of "struts", e.g.

\rule{0cm}{2.3ex}T\={a}\d{n}\d{d}ya-B. (Pa\~{n}cavi\d{m}\'{s}a-B.)

These are vertical rules of no width, but which have a height. They thus produce absolutely no visible mark, however, they essentially trick LaTeX into adding extra height to a cell, because it has to leave room for the invisible line.

Other manual adjustment of widths and heights - particularly around the internal braces - was also necessary for visually pleasing output.

Another measure I had to take to squeeze the whole thing onto a page was to use a \small font size declaration and skinny margins, and to alter the width between columns, thus:

\setlength{\tabcolsep}{0.13em}

This gives a space of just 0.13 times the width of an m. This is actually a bit narrower than would be absolutely ideal - especially with few vertical lines - but it's all I could do without making the font size ridiculous (and that would have thrown out all of my manual spacing and caused me to have a small breakdown). Initially it was even narrower, so I adjusted the width of a few cells where possible by dropping lines where I had not initially done so.

I solved the problem of the horizontal, column-spanning brace:

enter image description here

By defining my own \underoverbrace command:

\newcommand{\underoverbrace}[1]{%
  \raisebox{-3.4ex}[1ex][0ex]{%
    \makebox[0pt][l]{$\overbrace{\phantom{#1}}$}%
      }%
  #1}

What I do here is make myself a box which is lowered by 3.4 times the height of an x. Within this box, I make myself another box of no width at all. I then print an \overbrace of the width of the word I'm putting the brace under. This is the argument of my command and, in this case, it is Vājasaneyins. I do this by simply using a \phantom command, so that LaTeX prints the brace over the word, except the word doesn't actually make its way to the output in any form. I now have a brace of the right width. I have lowered it so that it will appear under the word (using \raisebox) and positioned it horizontally with a \makebox. Because the box I made has no width, the contents of it extend outside of the box. But because they belong properly within this box, LaTeX leaves no space for them and so they do not shunt anything else along the line. Thus, the brace appears directly under the argument. Putting it in a box means the brace does not push the argument along the line when its printed. Instead, I position the brace relative to the argument. I have a box of no width positioned horizontally exactly where the argument starts. (Vertically, it is beneath the argument). I then print the brace of the right width. Finally, I print the argument, the word itself. This is all put on its own row and an optional argument passed to \raisebox sets the height appropriately.

& & & & & & & & & &
\multicolumn{2}{c|}{%
  \underoverbrace{\textit{V\={a}jasaneyins}}%
} & & \\

Meanwhile, the vertical, row spanning braces:

enter image description here

Are produced with this command:

\newcommand{\mybrace}{\mbox{%
  \hspace{-14pt}%
  $\left.
  \begin{array}{l}
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
    \hspace{0pt}\\
  \end{array}
  \right\}$%
  }}

Some additional horizontal space needed to be removed in the fourth column. This basically builds a five row heigh brace. I have an array with five empty rows (I wanted to put something there, it just felt more right) and a right brace to the right of it which scales. I then shunt the whole lot over with an \hspace{} command.

I simply issued this command and then added the rest of the contents, e.g.:

\multirow{5}{22mm}{%
  \mybrace{}Maitr\={a}ya\d{n}\={\i}-S.%
}

Finally, cfr solved my rotated cell entries problem, like so:

Because you are rotating the text upwards, so to speak, you need to start the rotation below the uppermost point. To facilitate this, multirow lets you specify the number of rows as a negative integer, rather than a positive one.

So move the rotated cell to a later row in the table (the last one involved) and delete the \parbox from around it.

Hence, for example:

\multirow{-4}{*}{%
  \rotatebox[origin=c]{90}{Sa\d{m}hit\={a}}%
}

To me, it seems that some entries sit a little low in their cells and it doesn't seem easily possible to adjust them. But, for me, that will do at this stage.

And the rest was just intense use of \multirow and \multicolumn.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.