Skip to content

Instantly share code, notes, and snippets.

@Epictetus
Forked from zr-tex8r/test-okum-ruby.tex
Created September 27, 2012 12:46
Show Gist options
  • Save Epictetus/3793820 to your computer and use it in GitHub Desktop.
Save Epictetus/3793820 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