Skip to content

Commit

Permalink
Drop problematic usage of the environ package, fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jun 25, 2016
1 parent e77e302 commit 26185a9
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions grid-system.sty
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\RequirePackage{calc}
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{environ,forloop}
\RequirePackage{forloop}

\newlength{\gridsystem@rowwidth}
\setlength{\gridsystem@rowwidth}{\linewidth}
Expand Down Expand Up @@ -49,14 +49,19 @@
\gridsystem@finishrow%
}

\NewEnviron{Cell}[1]{%
%\global\@namedef{gridsystem@cellcontent\arabic{gridsystem@cellcount}}{\BODY}%
%\edef\@celltemp{\BODY}%
%\global\@namedef{gridsystem@cellcontent\arabic{gridsystem@cellcount}}{\@celltemp}%
\expandafter\global\expandafter\let\csname gridsystem@cellcontent\arabic{gridsystem@cellcount}\endcsname\BODY%
\global\@namedef{gridsystem@cellwidth\arabic{gridsystem@cellcount}}{#1}%
\stepcounter{gridsystem@cellcount}%
\addtocounter{gridsystem@stripecount}{#1}%
\newenvironment{Cell}[1]{%
%\global\@namedef{gridsystem@cellcontent\arabic{gridsystem@cellcount}}{\BODY}%
%\edef\@celltemp{\BODY}%
%\global\@namedef{gridsystem@cellcontent\arabic{gridsystem@cellcount}}{\@celltemp}%
\xdef\gridsystem@cellstripes{#1}%
\expandafter\global\expandafter\let\csname gridsystem@cellcontent\arabic{gridsystem@cellcount}\endcsname%
\ignorespaces%
}
{%
\global\@namedef{gridsystem@cellwidth\arabic{gridsystem@cellcount}}{\gridsystem@cellstripes}%
\stepcounter{gridsystem@cellcount}%
\addtocounter{gridsystem@stripecount}{\gridsystem@cellstripes}%
\ignorespacesafterend%
}

%%%%
Expand All @@ -71,6 +76,7 @@
\setcounter{gridsystem@cellinrow}{0}%
\setcounter{gridsystem@stripecount}{0}%
\noindent%
\ignorespaces%
}{%
\setlength{\gridsystem@one@cellwidth}{(\gridsystem@rowwidth-\gridsystem@cellsep*(\value{gridsystem@cellcount}-1))/\value{gridsystem@stripecount}}%
% For each 1..gridsystem@cellcount
Expand All @@ -88,4 +94,5 @@
\setcounter{gridsystem@cellcount}{0}%
\setcounter{gridsystem@stripecount}{0}%
%\gridsystem@finishrow%
\ignorespacesafterend%
}

0 comments on commit 26185a9

Please sign in to comment.