From 7f2c4c60c9c9ad47c413032092373faebeba3d71 Mon Sep 17 00:00:00 2001
From: Sebastian Kuhnert
Date: Fri, 19 Feb 2010 12:36:32 +0000
Subject: exercisesheets.sty: improve PDF title logic for single-sheet
 documents

---
 exercisesheets.sty | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'exercisesheets.sty')

diff --git a/exercisesheets.sty b/exercisesheets.sty
index 2a967c9..a3b4d6b 100644
--- a/exercisesheets.sty
+++ b/exercisesheets.sty
@@ -227,7 +227,16 @@
   \exsh@isinrangefalse
   \exsh@singularrangetrue
   \pgfkeysgetvalue{/exsh/only}{\exsh@temp}%
-  \expandafter\exsh@range@parsestart\exsh@temp\exsh@range@end
+  \ifthenelse{\equal{-}{\exsh@temp}}{%
+    \exsh@isinrangetrue
+    \ifnumequal{\exsh@lastsheet}{1}{%
+      \exsh@singularrangetrue
+    }{%
+      \exsh@singularrangefalse
+    }%
+  }{%
+    \expandafter\exsh@range@parsestart\exsh@temp\exsh@range@end
+  }%
 }
 \def\exsh@range@parsestart#1{%
   \ifstrequal{#1}{,}{%
-- 
cgit v1.2.3

