summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sasnrdisplay
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-01 22:20:57 +0000
committerKarl Berry <karl@freefriends.org>2017-12-01 22:20:57 +0000
commitd83f7d0c41e0dd7d39867577281bc4473963d1ee (patch)
tree3deb68dc71a815fd24da54fb7d504ac648dfcba1 /Master/texmf-dist/tex/latex/sasnrdisplay
parent5d9d71427c7d5bfd5bfaa7f55a8e63fb677a55eb (diff)
sasnrdisplay (1dec17)
git-svn-id: svn://tug.org/texlive/trunk@45963 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sasnrdisplay')
-rw-r--r--Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.sty62
2 files changed, 42 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.cfg b/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.cfg
index 8bf14571ee0..3749c8f3a15 100644
--- a/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.cfg
+++ b/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.cfg
@@ -10,8 +10,8 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% The Current Maintainer of this work is Lars Madsen (daleif@imf.au.dk)
-%% Data supplied by J\o rgen Granfeldt (jqrgen@imf.au.dk)
+%% The Current Maintainer of this work is Lars Madsen (daleif@math.au.dk)
+%% Data supplied by J\o rgen Granfeldt (jqrgen@math.au.dk)
%%
% how to use:
%
diff --git a/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.sty b/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.sty
index 7fd8d1bc48b..d3a26dab11a 100644
--- a/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.sty
+++ b/Master/texmf-dist/tex/latex/sasnrdisplay/SASnRdisplay.sty
@@ -1,10 +1,10 @@
-\ProvidesPackage{SASnRdisplay}[2014/03/07 v0.93 by daleif]
+\ProvidesPackage{SASnRdisplay}[2017/12/01 v0.95 by daleif]
-\newcommand\SnRversion{v0.93 2014/03/07}
+\newcommand\SnRversion{v0.95 2017/12/01}
-%% $LastChangedDate: 2012-10-15 16:01:29 +0200 (Mon, 15 Oct 2012) $
-%% $LastChangedRevision: 1552 $
-%% $LastChangedBy: daleif $
+%% $LastChangedDate: 2017-12-01 15:09:40 +0100 (Fri, 01 Dec 2017) $
+%% $LastChangedRevision: 1924 $
+%% $LastChangedBy: daleif@math.au.dk $
%%
%% This package can be distributed and/or modified under the
@@ -17,12 +17,12 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% The Current Maintainer of this work is Lars Madsen (daleif@imf.au.dk).
+%% The Current Maintainer of this work is Lars Madsen (daleif@math.au.dk).
%%
-\RequirePackage{listings}
+\RequirePackage{listings}[2015/06/04]
\RequirePackage{xkeyval,xcolor,etoolbox,caption,needspace}
@@ -100,6 +100,7 @@
\newtoggle{SnRcountbysection}
\newtoggle{SnRcountbychapter}
\newtoggle{SnRcountconsecutive}
+\newtoggle{SnRcountbylistings}
\DeclareOptionX{consecutive}{\toggletrue{SnRcountconsecutive}}
\DeclareOptionX{countbysection}{\toggletrue{SnRcountbysection}}
\DeclareOptionX{countbychapter}{%
@@ -111,6 +112,12 @@
}
}
+
+% added 2017/12/01 in response to
+% https://tex.stackexchange.com/q/181110/3929
+\DeclareOptionX{countbylistings}{\toggletrue{SnRcountbylistings}}
+
+
\let\SnRneedspaceCommand\@gobble
\newlength\SnRneedspace
\let\SnRneedspaceSAScode \SnRneedspace
@@ -225,26 +232,33 @@
\dolistloop\SnRtypes
}
+% added 2017/12/01, if option given, then don't create or mess with counters
+\iftoggle{SnRcountbylistings}{}{
-\iftoggle{SnRcountconsecutive}{
- \SnRsetupcounters{}% no dominant counter
-}{
- \iftoggle{SnRcountbysection}{
- \SnRsetupcounters{section}
- }{ % must be after chapter
- \SnRsetupcounters{chapter}
+ \iftoggle{SnRcountconsecutive}{
+ \SnRsetupcounters{}% no dominant counter
+ }{
+ \iftoggle{SnRcountbysection}{
+ \SnRsetupcounters{section}
+ }{ % must be after chapter
+ \SnRsetupcounters{chapter}
+ }
}
-}
+}
% This is inspired from the memoir class, it enables us to alias the
% listings counter such that we can have different series
% It will locally make one counter behave like another counter
% it also handles the \the<counter>
-\newcommand*{\SnRletcountercounter}[2]{%
- \csletcs{c@#1}{c@#2}
- \csletcs{the#1}{the#2}
- \SnRHrefNumber{#2}
+\iftoggle{SnRcountbylistings}{
+ \let\SnRletcountercounter\@gobbletwo
+}{
+ \newcommand*{\SnRletcountercounter}[2]{%
+ \csletcs{c@#1}{c@#2}
+ \csletcs{the#1}{the#2}
+ \SnRHrefNumber{#2}
+ }
}
@@ -345,7 +359,8 @@
% this is for basic configuration of the inline version
% rinline
\lstdefinestyle{r-inline}{
- basicstyle = \ttfamily
+ basicstyle = \ttfamily,
+ language = R, % R lang added 2017/12/01
}
% end rinline
% Spaces above and after, plus caption and internal lineskip (note
@@ -380,9 +395,12 @@
extendedchars = true, % special chars allowed, be aware of utf8
}
% end rcharsandbreaks
+
+ %morecomment = [s]{\#}{\^^M}, % comment from # to the end of the line
+
% rmarkup
-\lstdefinestyle{r-markup}{ % this only make sense for code
- morecomment = [s]{\#}{\^^M}, % comment from # to the end of the line
+\lstdefinestyle{r-markup}{ % this only make sense for code
+ language = R, % R lang added 2017/12/01
commentstyle = \normalfont\slshape\ttfamily\footnotesize,
}
% end rmarkup