5

The ruby package provides phonetic guide (really, it's possible to use in any language), however, if to use ruby inside the table, the row height will not increased for ruby: Ruby inside table

I also used the bigstrut package, it wasn't help. Is it possible to increase the row height for ruby?

The MWE is

\documentclass[11pt]{article}      
\usepackage{xeCJK}
\setCJKmainfont{MS PMincho}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{russian}
\newfontfamily\russianfont{Calibri}

\usepackage{array}
\usepackage{bigstrut}

\usepackage{ruby}
\renewcommand{\rubysep}{-0.1ex}

\begin{document}

\begin{tabular}{|m{25mm}|m{57mm}|} \hline
\multicolumn{2}{|l|}{Институт/Руководящая должность} \bigstrut \\ \hline
\ruby{国}{くに}/\ruby{首長}{しゅちょう} & \emph{страна}/\emph{премьер-министр} \bigstrut \\ \hline
\ruby{都道府県}{とどうふけん}/\ruby{知事}{ちじ} & \emph{префектура}/\emph{губернатор} \bigstrut \\ \hline
\ruby{市}{し}/\ruby{市長}{しちょう} & \emph{город}/\emph{мэр} \bigstrut \\ \hline
\ruby{町}{まち}/\ruby{町長}{ちょうちょう} & \emph{район}/\emph{глава района} \bigstrut \\ \hline
\ruby{村}{むら}/\ruby{村長}{そんちょう} & \emph{деревня}/\emph{староста} \bigstrut \\ \hline
\end{tabular}

\end{document}

You will not see the "Bad box" warning in this MWE, however, I saw it in my source document.

1
  • check the array package documentation for \extrarowheight. i think this might help (but i'm not able to check the documentation myself just now to be sure). Jul 16, 2013 at 18:17

2 Answers 2

4

As Barbara Beeton pointed out, the array package provides the parameter (lenght) \extrarowheight which increases (or decreases if you set a negative value) the height of rows in a tabular or array environment.

In your case, adding 5pt to this lenght should be enough. That means adding the line

\setlength\extrarowheight{5pt}

to your document. Also the package bigstrut isn't required.

If you rewrite your MWE as

\documentclass[11pt]{article}      
\usepackage{xeCJK}
\setCJKmainfont{MS PMincho}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{russian}
\newfontfamily\russianfont{Calibri}

\usepackage{array}

\usepackage{ruby}
\renewcommand{\rubysep}{-0.1ex}
\setlength\extrarowheight{5pt}    

\begin{document}

\begin{tabular}{|m{25mm}|m{57mm}|} \hline
\multicolumn{2}{|l|}{Институт/Руководящая должность} \\ \hline
\ruby{国}{くに}/\ruby{首長}{しゅちょう} & \emph{страна}/\emph{премьер-министр} \\ \hline
\ruby{都道府県}{とどうふけん}/\ruby{知事}{ちじ} & \emph{префектура}/\emph{губернатор} \\ \hline
\ruby{市}{し}/\ruby{市長}{しちょう} & \emph{город}/\emph{мэр} \\ \hline
\ruby{町}{まち}/\ruby{町長}{ちょうちょう} & \emph{район}/\emph{глава района} \\ \hline
\ruby{村}{むら}/\ruby{村長}{そんちょう} & \emph{деревня}/\emph{староста} \\ \hline
\end{tabular}

\end{document}

you get:

enter image description here

2

You might find the package cals useful:

enter image description here

\documentclass[11pt]{article}      
\usepackage{xeCJK}
%\setCJKmainfont{MS PMincho}
\setCJKmainfont{[MSMINCHO.TTF]}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{russian}
%\newfontfamily\russianfont{Calibri}
\newfontfamily\russianfont{[Calibri.ttf]}

\usepackage{ruby}
\renewcommand{\rubysep}{-0.1ex}

\usepackage{cals}

\begin{document}

\begin{calstable}
\colwidths{{28mm}{57mm}}
\makeatletter\cals@paddingT=2pt plus 1fill\relax % align bottom
\brow
\nullcell{ltb}
\nullcell{rtb}
\spancontent{Институт/Руководящая должность}
\erow
\brow
\cell{\ruby{国}{くに}/\ruby{首長}{しゅちょう}}
\cell{\emph{страна}/\emph{премьер-министр}}
\erow
\brow
\cell{\ruby{都道府県}{とどうふけん}/\ruby{知事}{ちじ}}
\cell{\emph{префектура}/\emph{губернатор}}
\erow
\brow
\cell{\ruby{市}{し}/\ruby{市長}{しちょう}}
\cell{\emph{город}/\emph{мэр}}
\erow
\brow
\cell{\ruby{町}{まち}/\ruby{町長}{ちょうちょう}}
\cell{\emph{район}/\emph{глава района}}
\erow
\brow
\cell{\ruby{村}{むら}/\ruby{村長}{そんちょう}}
\cell{\emph{деревня}/\emph{староста}}
\erow
\end{calstable}

\end{document}

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.