diff options
author | Karl Berry <karl@freefriends.org> | 2008-02-19 17:05:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-02-19 17:05:28 +0000 |
commit | cf4d2164c6ed64dccbe7d8abdd8b0c95f8509a1c (patch) | |
tree | adbb0d174b4ab3c017b085367d946ad7ba3b417b /Master/texmf-dist/tex/latex/shipunov/altverse.sty | |
parent | f95f16133feaac8dd66077e38d247937f819c815 (diff) |
new latex collection shipunov (18feb08)
git-svn-id: svn://tug.org/texlive/trunk@6680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/shipunov/altverse.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/shipunov/altverse.sty | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/shipunov/altverse.sty b/Master/texmf-dist/tex/latex/shipunov/altverse.sty new file mode 100644 index 00000000000..83b6359b53a --- /dev/null +++ b/Master/texmf-dist/tex/latex/shipunov/altverse.sty @@ -0,0 +1,95 @@ +% Author: Alexey B. Shipunov, plantago@herba.msu.ru + +\ProvidesPackage{altverse} + [2008/02/15 v0.3 Typesetting simple verses with `xtab' package] + +\RequirePackage{array} +\RequirePackage{xtab} + +% Typical environment, stanzas and subverses separated by `\\' +\newenvironment{Verse}[1][\relax]% + {\tablehead{}% + \tablefirsthead{}% + \tabletail{}% + \tablelasttail{}% + \begin{center}% + \global\def\V@TMP{#1}% + \let\_\Vindent + \begin{xtabular}{@{}>{\V@TMP}l@{}}}% + {\end{xtabular}% + \end{center}} + +% Same, ragged left +\newenvironment{VERSE}[1][\relax]% + {\tablehead{}% + \tablefirsthead{}% + \tabletail{}% + \tablelasttail{}% + \global\def\V@TMP{#1}% + \let\_\Vindent + \begin{xtabular}{@{}>{\V@TMP}l@{}}}% + {\end{xtabular}} + +% Same, with footnotes +\newenvironment{Verse*}[1][\relax]% + {\tablehead{}% + \tablefirsthead{}% + \tabletail{}% + \tablelasttail{}% + \begin{center}% + \global\def\V@TMP{#1}% + \let\_\Vindent + \renewcommand{\thempfootnote}{\fnsymbol{mpfootnote}}% + \begin{mpxtabular}{@{}>{\V@TMP}l@{}}}% + {\end{mpxtabular}% + \end{center}} + +% If you need to manually break one of these environments: +% Example: `\Vbreak{VERSE}' +\newcommand*{\Vbreak}[1]{\end{#1}\newpage\begin{#1}} + +% For indents, abbreviations inside environments `\_' +% One may set indent for whole verse: \begin{Verse}[\Vindent{2}] +\newcommand*{\Vindent}[1][.5]{\hspace*{#1in}} + +% Header CONTENTS, needs to be set BEFORE the environment +\newcommand*{\Vhead}[2][\Vhead@TMP]{\def\Vhead@TMP{#2}\V@TOC{#1}\V@MARK{#1}} +% Put information to the table of contents and headers +\newcommand*{\V@TOC}[1]{\markright{#1}} +\newcommand*{\V@MARK}[1]{\addcontentsline{toc}{subsection}{#1}} + +% Actual header, centered, should be without `\\' +\newcommand{\VCtitle}{% + \multicolumn{1}{@{}>{\V@TMP\centering\hspace{0pt}}p{\VheadSize}@{}}% + {\VheadFormat\Vhead@TMP\par}\\*} +% Alternate header, with less space after +\newcommand{\Vctitle}{% + \multicolumn{1}{@{}>{\V@TMP\centering\hspace{0pt}}p{\VheadSize}@{}}% + {\VheadFormat\Vhead@TMP}\\*} +% Alternate header, ragged left, should be without `\\' +\newcommand{\VLtitle}{% + \multicolumn{1}{@{}>{\V@TMP\raggedright\hspace{0pt}}p{\VheadSize}@{}}% + {\VheadFormat\Vhead@TMP\par}\\*} +% Heading stars before verse +\newcommand{\Vstars}{\multicolumn{1}{@{}>{\V@TMP}c@{}}% + {${*}\quad{*}\quad{*}$}\\*[\bigskipamount]} + +% Subheader, should be without `\\' +\newcommand{\Vsub}[1]{% + \multicolumn{1}{@{}>{\centering\hspace{0pt}}p{\VheadSize}@{}}% + {#1}\\*} + +% Dedication, should be _with_ `\\' +\newcommand*{\Vto}[1]{\multicolumn{1}{@{}>{\V@TMP}r@{}}% + {\VtoFormat#1}} + +% Annotation +\newcommand*{\Vat}[1]{\V@TMP\VatFormat#1} + +% Hooks for redefinitions +\newcommand*{\VheadFormat}{\reset@font\large\bfseries} +\newcommand*{\VheadSize}{.4\columnwidth} +\newcommand*{\VtoFormat}{\reset@font\itshape} +\newcommand*{\VatFormat}{\reset@font\itshape} + +\endinput |