Skip to content
Browse files

Fix issues with `\linktopoem'

linktopoem no longer adds spaces before the text
and no longer defines useless commands inside of
itself that conflict if it's called multiple times.
  • Loading branch information...
1 parent c83c2ec commit 6e7898c6cbcde1698490d39e7d4ed8827398722a @SamWhited committed
Showing with 7 additions and 7 deletions.
  1. +7 −7 poetrytex.dtx
View
14 poetrytex.dtx
@@ -706,14 +706,14 @@
% matter for instance).
%
% \begin{macro}{\linktopoem}
-% We can link to poems easily enough by providing \code{linktopoem} with the
-% number of the poem and the text for the link. If only one argument is given
-% it is used as both the link destination and text.
+% \changes{1.1}{2012/07/24}{Fix spacing and multiple use issues}
+% We can \emph{\linktopoem[1]{link}} \emph{\linktopoem[2]{to}}%
+% \emph{\linktopoem[3]{poems}} easily enough by providing \code{linktopoem} with
+% the text for the link and, optionally, the number of the poem to link to. If
+% only one argument is given it is used as both the link destination and text.
% \begin{macrocode}
-\newcommand*{\linktopoem}[2][false]{%
- \newcommand*{\@ptfirstarg}{#1}
- \newcommand*{\@ptfalse}{false}
- \ifx \@ptfirstarg \@ptfalse
+\newcommand*{\linktopoem}[2][ptnull]{%
+ \ifx{#1}{ptnull}
\hyperref[\@ptpoemlabeltext#2]{#2}\relax
\else
\hyperref[\@ptpoemlabeltext#1]{#2}\relax

0 comments on commit 6e7898c

Please sign in to comment.
Something went wrong with that request. Please try again.