summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/gitlog/gitlog.bbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-23 23:06:21 +0000
committerKarl Berry <karl@freefriends.org>2015-11-23 23:06:21 +0000
commit10e6d3f05da678388e44f25765c633b29fe6e170 (patch)
treef19b08d06029b91dee7ff7393861a0dc4561c098 /Master/texmf-dist/tex/latex/gitlog/gitlog.bbx
parent47e31c7a10c1ad9aabcbd1aefaa35c029eae6a3b (diff)
gitlog (22nov15)
git-svn-id: svn://tug.org/texlive/trunk@38932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gitlog/gitlog.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/gitlog/gitlog.bbx45
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gitlog/gitlog.bbx b/Master/texmf-dist/tex/latex/gitlog/gitlog.bbx
new file mode 100644
index 00000000000..87e24ec2814
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/gitlog/gitlog.bbx
@@ -0,0 +1,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