From cb7776b7b205ed1ca821d824dd80f7e6c86dc92e Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 16 Apr 2016 21:20:05 +0000
Subject: lollipop (16apr16)

git-svn-id: svn://tug.org/texlive/trunk@40560 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/lollipop/lollipop-text.tex | 74 ++++++++++++++++++++++--
 1 file changed, 69 insertions(+), 5 deletions(-)

(limited to 'Master/texmf-dist/tex/lollipop/lollipop-text.tex')

diff --git a/Master/texmf-dist/tex/lollipop/lollipop-text.tex b/Master/texmf-dist/tex/lollipop/lollipop-text.tex
index a00bdcb38cf..5cf2f62ee2f 100644
--- a/Master/texmf-dist/tex/lollipop/lollipop-text.tex
+++ b/Master/texmf-dist/tex/lollipop/lollipop-text.tex
@@ -285,28 +285,75 @@
 
 % Push/Pop indentlevels
 %
-\def\PushIndentLevel
-   {\Tmessage[indent]{Old indent: \the\leftskip}%
+\def\PushLeftIndentLevel
+   {\Tmessage[indent]{Old left indent: \the\leftskip}%
     \advance\leftskip\levelindent 
     \previousindent=\levelindent
     \step@counter{indentlevel}\set@level@indent
-    \Tmessage[indent]{New indent: \the\leftskip, 
+    \Tmessage[indent]{New left indent: \the\leftskip, 
                       at level \the\cs@counter@name{indentlevel}}%
     }
+    
+\let\PushIndentLevel\PushLeftIndentLevel % for backwards compatibility
 
 % Popping an indent level requires two pops: one for the \levelindent
 % and one for the \previousindent. This last one then has to be 
 % pushed again.
 %
-\def\PopIndentLevel
+\def\PopLeftIndentLevel
    {\ifnum\cs@counter@name{indentlevel}=\@ne
-        \Emessage{Pop indent level attempted at outer level}
+        \Emessage{Pop left indent level attempted at outer level}
     \else \back@step@counter{indentlevel}%
         \back@step@counter{indentlevel}%
         \set@level@indent \previousindent\levelindent
         \step@counter{indentlevel}%
         \set@level@indent\advance\leftskip-\levelindent
     \fi}
+    
+\let\PopIndentLevel\PopLeftIndentLevel % for backwards compatibility
+  
+\def\PushRightIndentLevel
+   {\Tmessage[indent]{Old right indent: \the\rightskip}%
+    \advance\rightskip\levelindent 
+    \previousindent=\levelindent
+    \step@counter{indentlevel}\set@level@indent
+    \Tmessage[indent]{New right indent: \the\rightskip, 
+                      at level \the\cs@counter@name{indentlevel}}%
+    }
+    
+\def\PopRightIndentLevel
+   {\ifnum\cs@counter@name{indentlevel}=\@ne
+        \Emessage{Pop right indent level attempted at outer level}
+    \else \back@step@counter{indentlevel}%
+        \back@step@counter{indentlevel}%
+        \set@level@indent \previousindent\levelindent
+        \step@counter{indentlevel}%
+        \set@level@indent\advance\rightskip-\levelindent
+    \fi}
+    
+\def\PushLeftRightIndentLevels
+   {\Tmessage[indent]{Old left indent: \the\leftskip}%
+     \Tmessage[indent]{Old right indent: \the\rightskip}%
+    \advance\leftskip\levelindent 
+    \advance\rightskip\levelindent 
+    \previousindent=\levelindent
+    \step@counter{indentlevel}\set@level@indent
+    \Tmessage[indent]{New left indent: \the\leftskip, 
+                      at level \the\cs@counter@name{indentlevel}}%
+    \Tmessage[indent]{New right indent: \the\rightskip, 
+                      at level \the\cs@counter@name{indentlevel}}%
+    }    
+
+\def\PopLeftRightIndentLevels
+   {\ifnum\cs@counter@name{indentlevel}=\@ne
+        \Emessage{Pop left and right indents level attempted at outer level}
+    \else \back@step@counter{indentlevel}%
+        \back@step@counter{indentlevel}%
+        \set@level@indent \previousindent\levelindent
+        \step@counter{indentlevel}%
+        \set@level@indent\advance\rightskip-\levelindent
+                                       \advance\leftskip-\levelindent
+    \fi}
 
 %%%%%%%%%%%%%%%% Paragraph Skip control
 % parskip is stored and set to zero at the start and end
@@ -372,6 +419,7 @@
 %
 \Distance:rightmarginstretch={0pt plus 6cm}
 \Distance:leftmarginstretch={0pt plus 6cm}
+\Distance:leftrightmarginstretch={0pt plus 1fil}
 \def\FlushLeft:#1 {\switch {\if\EqualString{#1}}
     {yes} {\leftskip=1\leftskip}
     {default} {\leftskip=1\leftskip
@@ -385,6 +433,15 @@
     \endswitch \relax}
 \FlushRight:yes
 
+
+\def\FlushCenter:#1 {\switch {\if\EqualString{#1}}
+    {yes} {\leftskip=\leftrightmarginstretch
+              \rightskip=\leftrightmarginstretch
+              \parindent\z@\parfillskip\z@}
+    {no} {}
+    \endswitch \relax}
+
+
 %%%%%%% lijn
 % #1 : hoogte; #2 : lengte; #3 : elevatie
 % parameters kunnen van achter af aan weggelaten worden;
@@ -480,6 +537,13 @@
 
 \endinput
 
+% 2016/04/14 defined \PushLeftIndentLevel, \PopLeftIndentLevel, 
+%                    \PushRightIndentLevel, \PopRightIndentLevel, 
+%                    \PushLeftRightIndentLevels, and \PopLeftRightIndentLevels
+%                    commands. \PushIndentLevel is now a synonym for
+%                    \PushLeftIndentLevel and \PopIndentLevel is a synonym
+%                    for \PopLeftIndentLevel
+%                    defined \FlushCenter
 % 2014/04/13 defined \EveryParagraph, \EveryMath, and \EveryDisplay
 % 2014/04/12 changed "#1 cs to \"#1 cs to be compatible with plain;
 % also we can not make " active since it is used by xetex for font selection
-- 
cgit v1.2.3

