Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r
Created September 26, 2012 17:22
Show Gist options
  • Save zr-tex8r/3789322 to your computer and use it in GitHub Desktop.
Save zr-tex8r/3789322 to your computer and use it in GitHub Desktop.
okumacroの\rubyを縦書きで使う
\documentclass[a4paper]{jsarticle}
\usepackage{plext}
\usepackage{okumacro}
%% \ruby の設定を縦書き用にする. (現在グループで有効)
\newcommand{\taterubysetup}{%
\renewcommand*{\kanjistrut}{\rule[-0.5zw]{0pt}{1zw}}%
}
\newcommand{\SampleText}{%
\ruby{夜食}{やしょく}\\
\ruby{就寝}{しゅうしん}
}
\begin{document}
\begin{center}
\begin{minipage}{4zw}% 横
\SampleText
\end{minipage}\quad
\begin{minipage}<t>{4zw}% 縦(失敗)
\SampleText
\end{minipage}\quad
\begin{minipage}<t>{4zw}% 縦
\taterubysetup
\SampleText
\end{minipage}
\end{center}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment