BookWarrior
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору если кому-нибудь интересно (а я подозреваю, что очень даже должно быть), то почти ответ на мои вопросы, во всяком случае полноценная игра с библиографией, которая меня впечатлила: ссылка. Интересно то, что кому-то захотелось практически такой же спектр качеств от библиографии - я лично руководствовался чисто функциональным удобством. Код: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{csquotes} \usepackage[american]{babel} \usepackage[style=verbose,backref=true]{biblatex} \usepackage[colorlinks]{hyperref} \usepackage{xpatch} % Define new format to apply hypertext references \DeclareFieldFormat{linked}{% \ifhyperref {\iffieldundef{url} {\iffieldundef{doi} {\iffieldundef{isbn} {\iffieldundef{issn} {\iffieldundef{eprint} {#1} {\mkhrefeprint{#1}}} {\href{\worldcatsearch\thefield{issn}}{#1}}} {\href{\worldcatsearch\thefield{isbn}}{#1}}} {\href{http://dx.doi.org/\thefield{doi}}{#1}}} {\href{\thefield{url}}{#1}}} {#1}} \def\worldcatsearch{http://www.worldcat.org/search?qt=worldcat_org_all&q=} \makeatletter \newrobustcmd*{\mkhrefeprint}[1]{% \iffieldequalstr{eprinttype}{arxiv} {\href{http://arxiv.org/\abx@arxivpath/\thefield{eprint}}{#1}} {\iffieldequalstr{eprinttype}{hdl} {\href{http://hdl.handle.net/\thefield{eprint}}{#1}} {\iffieldequalstr{eprinttype}{jstor} {\href{http://www.jstor.org/stable/\thefield{eprint}}{#1}} {\iffieldequalstr{eprinttype}{pubmed} {\href{http://www.ncbi.nlm.nih.gov/pubmed/\thefield{eprint}}{#1}} {\iffieldequalstr{eprinttype}{googlebooks} {\href{http://books.google.com/books?id=\thefield{eprint}}{#1}} {#1}}}}}} % Add missing space in arXiv format \DeclareFieldFormat{eprint:arxiv}{% arXiv\addcolon\space \ifhyperref {\href{http://arxiv.org/\abx@arxivpath/#1}{% \nolinkurl{#1}% \iffieldundef{eprintclass} {}{\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}} {\nolinkurl{#1} \iffieldundef{eprintclass} {}{\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}} \makeatother % Use new format in titles \renewbibmacro*{title}{% Based on generic definition from biblatex.def \ifboolexpr{ test {\iffieldundef{title}} and test {\iffieldundef{subtitle}} } {} {\printtext[title]{\printtext[linked]{% \printfield[titlecase]{title}% \setunit{\subtitlepunct}% \printfield[titlecase]{subtitle}}}% \newunit}% \printfield{titleaddon}% \usebibmacro{clearlinks}} \renewbibmacro*{periodical}{% Based on generic definition from biblatex.def \iffieldundef{title} {} {\printtext[title]{\printtext[linked]{% \printfield[titlecase]{title}% \setunit{\subtitlepunct}% \printfield[titlecase]{subtitle}}}} \usebibmacro{clearlinks}} % Suppress url everywhere, suppress URLs/identifiers in citations \newbibmacro*{clearlinks}{% \clearfield{url}\clearfield{urlyear}% \ifcitation {\clearfield{doi}\clearfield{eprint}\clearfield{isbn}\clearfield{issn}} {}} % Suppress \finentrypunct after linebreaking URLs/identifiers \newtoggle{bbx:urlbreak} \xpretobibmacro{finentry} {\iftoggle{bbx:urlbreak}{\nopunct}{}% \global\togglefalse{bbx:urlbreak}}{}{} % Print URLs/identifiers at end of entry, after a linebreak \newbibmacro*{addendum+pubstate+pageref}{% \usebibmacro{addendum+pubstate}% \clearfield{addendum}% \clearfield{pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \clearlist{pageref}% \setunit{% \finentrypunct\par\nobreak% \global\toggletrue{bbx:urlbreak}}} \xpretobibmacro{doi+eprint+url}{\usebibmacro{addendum+pubstate+pageref}}{}{} \xpretobibmacro{eprint}{\usebibmacro{addendum+pubstate+pageref}}{}{} \xpretobibmacro{url+urldate}{\usebibmacro{addendum+pubstate+pageref}}{}{} \begin{filecontents}{\jobname.bib} @book{wilde, title={The Importance of Being Earnest: A Trivial Comedy for Serious People}, author={Wilde, Oscar}, series={English and American drama of the nineteenth century}, eprint={4HIWAAAAYAAJ}, eprinttype={googlebooks}, year={1899}, publisher={Leonard Smithers and Company}} @Periodical{jcg, title = {Computers and Graphics}, issuetitle = {Semantic {3D} Media and Content}, volume = {35}, number = {4}, year = {2011}, issn = {0097-8493}} @Manual{cmso, label = {CMS Online}, title = {The Chicago Manual of Style Online}, edition = {16}, publisher = {University of Chicago}, date = {2010}, url = {http://www.chicagomanualofstyle.org}} \end{filecontents} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \begin{document} \null\vfill Filler text.\footnote{Filler text \smartcite{kastenholz,itzhaki}.} Filler text.\footcites[e.g][]{companion}[section 5]{cms}[10--15]{jcg}{ctan} Filler text.\footcites[e.g][]{companion}[section 5]{cms}[10--15]{jcg}{ctan} Filler text.\footcites[e.g.][10--15]{itzhaki}[cf.][10]{wilde} \printbibliography \end{document} |
|