Joseph Wright avatar Joseph Wright committed 5ff5e8e

Further updates to biblatex colour code to avoid extra spaces in some cases

Comments (0)

Files changed (1)

base/beamerbaselocalstructure.sty

         \usebeamertemplate{bibliography entry note}}}}%
   \leavevmode\setbox\beamer@tempbox=\hbox{}\ht\beamer@tempbox=1.5em\box\beamer@tempbox}
 
-% The following code provided by Audrey http://tex.stackexchange.com/q/47540/2693	
+% The following code provided by Audrey http://tex.stackexchange.com/a/57247
 \AtBeginDocument{%
   \@ifpackageloaded{biblatex}
-    {%
-      \apptocmd{\blx@env@bibliography}
-        {\let\makelabel\beamer@biblabeltemplate}{}{}
-      \apptocmd{\abx@macro@begentry}
-        {\usebeamercolor[fg]{bibliography entry author}}{}{}
-      \pretocmd{\abx@macro@title}
-        {%
-          \ifcsundef{abx@name@labelname}{}{\blx@unitpunct\blx@postpunct}%
-          \newblock\usebeamercolor[fg]{bibliography entry title}%
-        }{}{}
-      \apptocmd{\abx@macro@title}
-        {%
-          \ifcsundef{abx@field@title}{}{\blx@unitpunct\blx@postpunct}%
-          \newblock\usebeamercolor[fg]{bibliography entry note}%
-        }{}{}%
-    }
-    {}
-}
+    {\apptocmd{\blx@env@bibliography}
+       {\let\makelabel\beamer@biblabeltemplate}{}{}
+     \apptocmd{\abx@macro@begentry}
+       {\let\bbx@tempa\@empty%
+        \usebeamercolor[fg]{bibliography entry author}}{}{}
+     \pretocmd{\abx@macro@labeltitle}
+       {\ifboolexpr{ test {\ifcsundef{abx@field@label}}
+          and test {\ifcsundef{abx@field@labeltitle}} }{}{\let\bbx@tempa\labelnamepunct}}{}{}
+     \pretocmd{\abx@macro@title}
+       {\ifcsundef{abx@name@labelname}{}{\let\bbx@tempa\labelnamepunct}%
+        \bbx@tempa\newblock\unspace\usebeamercolor[fg]{bibliography entry title}}{}{}
+     \apptocmd{\abx@macro@title}
+       {\ifcsundef{abx@field@title}{}{\newunitpunct}%
+        \newblock\usebeamercolor[fg]{bibliography entry note}}{}{}}
+    {}}
 
 \mode
 <article>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.