From aec1c1b77ee51b9359530d61cc7b8df2a37c7685 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 12 Jan 2006 23:51:33 +0000
Subject: arabtex

git-svn-id: svn://tug.org/texlive/trunk@673 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/arabtex/verses.sty | 76 ++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/arabtex/verses.sty

(limited to 'Master/texmf-dist/tex/latex/arabtex/verses.sty')

diff --git a/Master/texmf-dist/tex/latex/arabtex/verses.sty b/Master/texmf-dist/tex/latex/arabtex/verses.sty
new file mode 100644
index 00000000000..629257bce6f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/arabtex/verses.sty
@@ -0,0 +1,76 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%% verses.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% verses.sty
+% utility for ArabTeX
+% macros for typesetting Arabic verses in two columns
+% usage: load as a package or after loading ArabTeX
+% provides:
+% \def \setversedim #1#2{% set length of half-verse, separation
+% \def \halfverses #1#2{% first half-verse, second half-verse
+% \def \connverses #1#2#3{% first half-verse, connection, second half-verse
+% use within an Arabic environment
+% 28.03.1998
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% (c) Klaus Lagally
+%     Institut fuer Informatik
+%     Universitaet Stuttgart
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\ifx \verseatcode \undefined \else \expandafter \endinput
+\fi % load only once
+
+\chardef \verseatcode = \catcode`\@  \catcode`\@ = 11
+
+\a@ident {verses.sty} {3.00 verses in two columns} {28.03.1998}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newdimen \a@hvlen
+\newdimen \a@hvsep
+\newdimen \a@hvind
+
+% define some verse dimensions, verses will be centered
+\def \setversedim #1#2{% set length of half-verse, separation
+\a@hvlen #1\relax \a@hvsep #2\relax 
+\a@hvind \hsize \advance \a@hvind -\a@hvsep
+\divide \a@hvind 2 \advance \a@hvind -\a@hvlen }
+
+% macro for a verse with a connection
+\def \connverses #1#2#3{% first half-verse, connection, second half-verse
+\noindent \hspace \a@hvind
+\spreadbox \a@hvlen {#1}% first block
+\spreadbox \a@hvsep {#2}% separator
+\spreadbox \a@hvlen {#3}% second block
+\par }
+
+% macro for two half verses
+\def \halfverses #1#2{% normal case
+\connverses {#1}{\hfill}{#2}}
+
+% make macros known to ArabTeX
+\allowarab \halfverses
+\allowarab \connverses
+\all@wtw@ \setversedim
+\all@w@ne \setspace
+
+% define formatting of poetry, defaults
+% do this within a group!
+
+%\setversedim {2.0in}{0.3in}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% the following are patches for ArabTeX 3.06, otherwise harmless
+
+\def \a@spreadbox #1{% {width}{text} get the text
+\ifarab \putwordb@x {\spreadtrue \setspace {.3em plus .3fil}%
+\a@sequence {#1}\setbox0 \lastbox \hbox to \a@bwidth {\unhbox0 }}%
+\fi \a@spacefalse \a@showinput {#1}\test@token }
+
+\def \a@fntext {% common part for footnote text
+\footnotesize \hsize \columnwidth \@parboxrestore \clubpenalty 5000
+\@makefntext {\rule {\z@ }{\footnotesep }}\futurelet \next \fo@t }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\catcode `\@ = \verseatcode
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
-- 
cgit v1.2.3

