Re: longtable環境全体を左に寄せたい

名前: ut
日時: 2007-11-26 14:51:33
IPアドレス: 157.118.27.*

>>50306 # 乗りかかった船ということで、相変わらずの稚拙な解決法(しかも # 半分だけ)です。 list の定義の中に \@totalleftmargin を真似した\@totalrightmargin を忍び込ませれば、とりあえず右揃えは可能かと: \documentclass{article} \usepackage{longtable} \makeatletter \newdimen\@totalrightmargin %%% \totalleftmargin の \@totalrightmargin=\z@ %%% 真似 \def\list#1#2{% \ifnum \@listdepth >5\relax \@toodeep \else \global\advance\@listdepth\@ne \fi \rightmargin\z@ \listparindent\z@ \itemindent\z@ \csname @list\romannumeral\the\@listdepth\endcsname \def\@itemlabel{#1}% \let\makelabel\@mklab \@nmbrlistfalse #2\relax \@trivlist \parskip\parsep \parindent\listparindent \advance\linewidth -\rightmargin \advance\linewidth -\leftmargin \advance\@totalleftmargin \leftmargin \advance\@totalrightmargin \rightmargin %%% \@totalleftmargin の真似 \parshape \@ne \@totalleftmargin \linewidth \ignorespaces} \makeatother \begin{document} GENTLE READER: This is a handbook about \TeX{}, a new typesetting system intended for the creation of beautiful books---and especially for books that contain a lot of mathematics. \makeatletter \begin{itemize} \item GENTLE READER: This is a handbook about \TeX{}, a new typesetting system intended for the creation of beautiful books---and especially for books that contain a lot of mathematics. \setlength{\LTleft}{\fill} \setlength{\LTright}{\@totalrightmargin} \begin{longtable}{|l|l|} a & b \end{longtable} \begin{quote} GENTLE READER: This is a handbook about \TeX{}, a new typesetting system intended for the creation of beautiful books---and especially for books that contain a lot of mathematics. \setlength{\LTright}{\@totalrightmargin} \begin{longtable}{|l|l|} c & d \end{longtable} \begin{quote} \item GENTLE READER: This is a handbook about \TeX{}, a new typesetting system intended for the creation of beautiful books---and especially for books that contain a lot of mathematics. \setlength{\LTright}{\@totalrightmargin} \begin{longtable}{|l|l|} e & f \end{longtable} \end{quote} \end{quote} \end{itemize} \makeatother GENTLE READER: This is a handbook about \TeX{}, a new typesetting system intended for the creation of beautiful books---and especially for books that contain a lot of mathematics. \end{document} もっとスマートな解決法や、更には中央揃えの方法については、上 級者の皆さんにお任せしますです。すいません。

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます。適宜改行を入れてください)