Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plext.sty: 横組時の \rensuji #26

Closed
aminophen opened this issue Nov 2, 2016 · 1 comment
Closed

plext.sty: 横組時の \rensuji #26

aminophen opened this issue Nov 2, 2016 · 1 comment
Labels

Comments

@aminophen
Copy link
Member

aminophen commented Nov 2, 2016

plext パッケージで定義されている \rensuji をみると、縦組・横組両方で使うことを想定していそうに見えますが、横組では \leavevmode で始まっていません。このため

\documentclass{jsarticle}
\usepackage{plext}
\begin{document}
\rensuji{123}あいうえお
\end{document}

の結果が私にとっては期待はずれなのですが、意図的でしょうか?

直してよければ、以下のコードを入れればよいはずです:

\def\@@rensuji[#1]#2{%
  \ifvmode\leavevmode\fi
  \ifydir\hbox{#2}\else
  \hskip\rensujiskip
  \ifnot@advanceline\not@advancelinefalse\else
    \setbox\z@\hbox{\yoko#2}%
    \@tempdima\ht\z@ \advance\@tempdima\dp\z@
    \if #1c\relax\vrule\@width\z@ \@height.5\@tempdima \@depth.5\@tempdima
    \else\if #1r\relax\vrule\@width\z@\@height\z@ \@depth\@tempdima
    \else\vrule\@width\z@ \@height\@tempdima \@depth\z@
    \fi\fi
  \fi
  \if #1c\relax\hbox to1zw{\yoko\hss#2\hss}%
  \else\if #1r\relax\vbox{\hbox to1zw{\yoko\hss#2}}%
  \else\vtop{\hbox to1zw{\yoko#2\hss}}%
  \fi\fi
  \hskip\rensujiskip
\fi}
@aminophen
Copy link
Member Author

2f009e9 で \rensuji の \leavevmode が横組にも効くようにしました。 #24 の検討がなされている plext_test のほうにも同様のコミットをしました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant