Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-books.git

Bug fix for citation scopes (problematic e.g. in Notebook theme).

Author liantze <email>
Date 2013-03-10 16:56:31 GMT+0800
Commit 6abfe9905dadb5e9cadb5d8aee99808ab1df28db
Parent aee5457
Delta 25 lines added, 25 lines removed
recipe-book.cls
}
-\def\@recipecredittext{}
-\def\@recipelicensetext{}
-\def\@photocredittext{}
-\def\@photolicensetext{}
-\def\citationtext{}
+\gdef\@recipecredittext{}
+\gdef\@recipelicensetext{}
+\gdef\@photocredittext{}
+\gdef\@photolicensetext{}
+\gdef\citationtext{}
\newcommand{\recipecredit}[2][]{%
- \def\@recipecredittext{%
- \ifblank{#1}{#2}{\href{#1}{#2}}}
+ \global\edef\@recipecredittext{%
+ \ifblank{#1}{#2}{\noexpand\href{#1}{#2}}}
}
\newcommand{\recipelicense}[2][]{%
- \def\@recipelicensetext{, %
- \ifblank{#1}{#2}{\href{#1}{#2}}}
+ \global\edef\@recipelicensetext{, %
+ \ifblank{#1}{#2}{\noexpand\href{#1}{#2}}}
}
\newcommand{\photocredit}[2][]{%
- \def\@photocredittext{%
- \ifblank{#1}{#2}{\href{#1}{#2}}}
+ \global\edef\@photocredittext{%
+ \ifblank{#1}{#2}{\noexpand\href{#1}{#2}}}
}
\newcommand{\photolicense}[2][]{%
- \def\@photolicensetext{, %
- \ifblank{#1}{#2}{\href{#1}{#2}}}
+ \global\edef\@photolicensetext{, %
+ \ifblank{#1}{#2}{\noexpand\href{#1}{#2}}}
}
\newcommand{\parserecipecitation}[1]{%
- \def\r@creditauthor{}
- \def\r@authorurl{}
- \def\r@license{}
- \def\r@licenseurl{}
- \def\@recipecredittext{}
- \def\@recipelicensetext{}
+ \gdef\r@creditauthor{}
+ \gdef\r@authorurl{}
+ \gdef\r@license{}
+ \gdef\r@licenseurl{}
+ \gdef\@recipecredittext{}
+ \gdef\@recipelicensetext{}
\pgfkeys{/recipe, default, #1}
\ifdefempty{\r@creditauthor}{}{%
\recipecredit[\ifdefempty{\r@authorurl}{}{\r@authorurl}]{\r@creditauthor}}
\ifdefempty{\r@license}{}{%
\recipelicense[\ifdefempty{\r@licenseurl}{}{\r@licenseurl}]{\r@license}}
}
\newcommand{\parsephotocitation}[1]{%
- \def\p@creditauthor{}%
- \def\p@authorurl{}%
- \def\p@license{}%
- \def\p@licenseurl{}%
- \def\@photocredittext{}%
- \def\@photolicensetext{}%
+ \gdef\p@creditauthor{}%
+ \gdef\p@authorurl{}%
+ \gdef\p@license{}%
+ \gdef\p@licenseurl{}%
+ \gdef\@photocredittext{}%
+ \gdef\@photolicensetext{}%
\pgfkeys{/photo, default, #1}%
\ifdefempty{\p@creditauthor}{}{%