What was previously accomplished by wrapCitation is now customizable in the
layout files. What we provide by default here corresponds roughly to the
LyX 2.0 behavior.
- !cite {%label%[[%label%]][[#%key%]]}%!nextcite%
+ !startlink {!<a href='#LyXCite-%key%'>!}
+ !endlink {!</a>!}
+
+ !cite %!startlink%{%label%[[%label%]][[#%key%]]}%!endlink%%!nextcite%
!nextcite {%next%[[%!sep% %!cite%]]}
!nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
!nextcite {%next%[[%!sep% %!cite%]]}
!nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
- !cite %!shortauthor%%!textbefore2%%!textafter2%%!nextcite%
- !citetitle %!shortauthor%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
- !citet %!textbefore%%!shortauthor% %!open%%!year%%!textafter%%!close%%!nextcitet%
+ !startlink {!<a href='#LyXCite-%key%'>!}
+ !endlink {!</a>!}
+
+ !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
+ !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
+ !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
!citep %!open%%!citealp%%!close%
!citep %!open%%!citealp%%!close%
- !citealt %!textbefore%%!shortauthor% %!year%%!textafter%%!nextcitealt%
- !citealp %!textbefore%%!shortauthor%, %!year%%!textafter%%!nextcitealp%
- !citeauthor %!textbefore%%!shortauthor%%!textafter%%!nextauthor%
- !citeyear %!textbefore%%!year%%!textafter%%!nextyear%
- !citeyearpar %!textbefore%%!open%%!year%%!close%%!textafter%%!nextyearpar%
+ !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
+ !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
+ !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
+ !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
+ !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
- !nextcite {%next%[[%!sep% %!shortauthor%%!textafter2%%!nextcite%]]}
- !nextcitetitle {%next%[[%!sep% %!shortauthor%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
+ !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
+ !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
!nextcitet {%next%[[%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nextcitealp {%next%[[%!sep% %!citealp%]]}
!nextcitet {%next%[[%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nextcitealp {%next%[[%!sep% %!citealp%]]}
- !nextauthor {%next%[[%!sep% %!abbrvauthor%%!nextauthor%]]}
+ !startlink {!<a href='#LyXCite-%key%'>!}
+ !endlink {!</a>!}
+
+ !nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
- !nextyear {%next%[[%!sep% %!year%%!nextyear%]]}
+ !nextyear {%next%[[%!sep% %!startlink%%!year%%!endlink%%!nextyear%]]}
!abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
!textbefore {%textbefore%[[%textbefore% ]]}
!abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
!textbefore {%textbefore%[[%textbefore% ]]}
# cite styles
citet %!citet%%!textafter%%!close%
citealt %!citealt%%!textafter%
# cite styles
citet %!citet%%!textafter%%!close%
citealt %!citealt%%!textafter%
- citeyearpar %!open%%!textbefore%%!year%%!nextyear%%!textafter%%!close%
+ citeyearpar %!open%%!textbefore%%!startlink%%!year%%!endlink%%!nextyear%%!textafter%%!close%
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
End
CiteFormat authoryear
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
End
CiteFormat authoryear
- !citet %!abbrvauthor% %!open%%!textbefore%%!year%%!nextcitet%
- !citealt %!abbrvauthor% %!textbefore%%!year%%!nextcitealt%
- !citealp %!abbrvauthor%, %!year%%!nextcitealp%
+ !citet %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!year%%!nextcitet%
+ !citealt %!startlink%%!abbrvauthor% %!textbefore%%!year%%!endlink%%!nextcitealt%
+ !citealp %!startlink%%!abbrvauthor%, %!year%%!endlink%%!nextcitealp%
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
cite %!citet%%!textafter%%!close%
citep %!open%%!textbefore%%!citealp%%!textafter%%!close%
citealp %!textbefore%%!citealp%%!textafter%
cite %!citet%%!textafter%%!close%
citep %!open%%!textbefore%%!citealp%%!textafter%%!close%
citealp %!textbefore%%!citealp%%!textafter%
- citeauthor %!abbrvauthor%%!nextauthor%%!textafter%
- citeyear %!year%%!nextyear%%!textafter%
+ citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%%!textafter%
+ citeyear %!startlink%%!year%%!endlink%%!nextyear%%!textafter%
- !citet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[#%key%]]}%!nextcitet%
- !citealt %!abbrvauthor% %!textbefore%{%dialog%[[#ID]][[#%key%]]}%!nextcitealt%
+ !citet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%#%key%%!endlink%]]}%!nextcitet%
+ !citealt %!abbrvauthor% %!textbefore%{%dialog%[[#ID]][[%!startlink%#%key%%!endlink%]]}%!nextcitealt%
- !hashkey {%dialog%[[#ID]][[#%key%%!nexthashkey%]]}
+ !hashkey {%dialog%[[#ID]][[%!startlink%#%key%%!endlink%%!nexthashkey%]]}
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nexthashid {%next%[[%!sep% #ID%!nexthashid%]]}
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nexthashid {%next%[[%!sep% #ID%!nexthashid%]]}
- !nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
+ !nexthashkey {%next%[[%!sep% %!startlink%#%key%%!endlink%%!nexthashkey%]]}
cite %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citep %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citealp %!textbefore%%!hashkey%%!textafter%
cite %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citep %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citealp %!textbefore%%!hashkey%%!textafter%
- citeauthor %!abbrvauthor%%!nextauthor%
- citeyear %!year%%!nextyear%
+ citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%
+ citeyear %!startlink%%!year%%!endlink%%!nextyear%
} else {
docstring const val =
getValueForKey(key, before, after, dialog, xref, lang);
} else {
docstring const val =
getValueForKey(key, before, after, dialog, xref, lang);
- ret += from_ascii("{!<span class=\"bib-" + key + "\">!}");
+ if (!scanning_rich)
+ ret += from_ascii("{!<span class=\"bib-" + key + "\">!}");
- ret += from_ascii("{!</span>!}");
+ if (!scanning_rich)
+ ret += from_ascii("{!</span>!}");
}
} else {
// beginning of key
}
} else {
// beginning of key
return content;
// we have to do the escaping here, because we will ultimately
// write this as a raw string, so as not to escape the tags.
return content;
// we have to do the escaping here, because we will ultimately
// write this as a raw string, so as not to escape the tags.
- return "<a href='#" + key + "'>" +
+ return "<a href='#LyXCite-" + key + "'>" +
html::htmlize(content, XHTMLStream::ESCAPE_ALL) + "</a>";
}
html::htmlize(content, XHTMLStream::ESCAPE_ALL) + "</a>";
}