forked from ccsl-usp/modelo-latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamer-ime.bbx
28 lines (23 loc) · 998 Bytes
/
beamer-ime.bbx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Author: Nelson Lago
% This file is derived from files in the BibLaTeX distribution
% and, therefore, is distributed under the LPPL
\ProvidesFile{beamer-ime.bbx}
[2022/11/17 v1.0 authoryear bibliographies adapted to IME/USP beamer styles]
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\RequirePackage{ragged2e}
\RequireBibliographyStyle{authoryear-comp}
\ExecuteBibliographyOptions{maxbibnames=2,maxcitenames=2}
\AtEndPreamble{\ExecuteBibliographyOptions{backref=false}}
\AtBeginBibliography{\evenRaggedRight}
% standard.bbx utiliza "in:" para artigos em periódicos; os
% estilos mais comuns não usam isso, então vamos removê-lo.
\xpatchbibdriver{article}{\usebibmacro{in:}}{}{}{}
% Add "http://" for URLs that do not include http/https/ftp prefix
\ExplSyntaxOn
\DeclareFieldFormat{url}{%
\regex_match:nnTF{^(ftp|https?|FTP|HTTPS?|Ftp|Https?)://}{#1}
{\mkbibacro{URL}\addcolon\space\url{#1}}
{\mkbibacro{URL}\addcolon\space\href{http\c_colon_str//#1}{#1}}%
}
\ExplSyntaxOff