summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gitlog/gitlog.bbx
blob: 87e24ec281436f4b4a939f87f009ffddf718c80a (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\ProvidesFile{gitlog.bbx}[2015/11/22 0.0.beta]

\defbibenvironment{bibliography}
  {\list
     {\printfield{entrykey}}%
     {\setlength{\leftmargin}{5em}%
      \setlength{\labelwidth}{0em}%
      \setlength{\itemindent}{-\leftmargin}%
      % \setlength{\itemindent}{0pt}%
      \setlength{\itemsep}{\bibitemsep}%
      % \addtolength{\leftmargin}{\labelsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{%
	  \makebox[5em]{\ttfamily##1}}}}
  {\endlist}
  {\item}

\newbibmacro*{begentry}{}
\newbibmacro*{finentry}{\finentry}

\DeclareBibliographyDriver{gitcommit}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{title}%
  \newblock%
  \usebibmacro{date+author}%
  \usebibmacro{finentry}}

\newbibmacro*{commithash}{%
  \printfield{commithash}%
}

% \newbibmacro*{entrykey}{%
  % \href{https://github.com/Hightor/gitlog/commit/\thefield{commithash}}{\printfield{entrykey}}%
% }

% \DeclareFieldFormat{entrykey}{%
  % \IfStrEq{}{\gitLog@github}{%
    % #1
  % }{%
    % \href{https://github.com/\gitLog@github/commit/\thefield{commithash}}{#1}  
  % }
% }

\endinput