Here's a possible solution using biblatex
and tex4ht
(steps shown after the image). The publication lists can be split according to their types. The result looks like this:
While this webpage is not exactly aesthetically "impressive", I suppose there's nothing some really good CSS-fu can't do! ;-)
The Bibliography File
I used a custom biblatex
field, usera
, to hold the local PDF filename. Following is the content of my publications.bib
:
@INPROCEEDINGS{Lim:2009,
author = {Lim, Lian Tze},
title = {Multilingual Lexicons for Machine Translation},
booktitle = {Proceedings of the 11th {I}nternational {C}onference on {I}nformation
{I}ntegration and {W}eb-based {A}pplications \& {S}ervices ({iiWAS}2009)
{M}aster and {D}octoral {C}olloquium ({MDC})},
year = {2009},
pages = {732--736},
address = {Kuala Lumpur, Malaysia},
doi = {10.1145/1806338.1806477},
usera = {LLT-iiWAS09MDC.pdf}
}
@ARTICLE{Lim:Ranaivo:Tang:2011,
author = {Lim, Lian Tze and Ranaivo-Malan\c{c}on, Bali and Tang, Enya Kong},
title = {Low Cost Construction of a Multilingual Lexicon from Bilingual Lists},
journal = {Polibits},
year = {2011},
volume = {43},
pages = {45--51},
url = {http://polibits.gelbukh.com/2011_43/43-06.htm},
usera = {LLT-polibits.pdf}
}
The LaTeX Source File
Next is the portfolio.tex
file, in which I set up a hook at every bibliography item to include the first page of the file pointed to by usera
. I've also added a bibmacro
called string+hyperlink
, to make the publication title link to the url
or doi
field if these are available, as shown in this answer.
\documentclass{article}
\usepackage[backend=biber,bibstyle=authoryear,sorting=ydnt]{biblatex}
\usepackage{graphicx}
\bibliography{publications}
\usepackage{hyperref}
\ExecuteBibliographyOptions{doi=false,url=false}
\newbibmacro{string+hyperlink}[1]{%
\iffieldundef{url}{%
\iffieldundef{doi}{#1}{\href{http://dx.doi.org/\thefield{doi}}{#1}}}
{\href{\thefield{url}}{#1}}}
\DeclareFieldFormat*{title}{\usebibmacro{string+hyperlink}{#1}}
\newbibmacro{usera}{%
\iffieldundef{usera}{}{%
\savefield*{usera}{\filename}%
\usebibmacro{string+hyperlink}{\includegraphics[width=100pt]{\filename}}\\}%
}
\AtEveryBibitem{\usebibmacro{usera}}
\begin{document}
\section{My Academic Portfolio}
\nocite{*}
\printbibliography[title={Articles},type={article}]
\printbibliography[title={Conference Proceedings},type={inproceedings}]
\end{document}
tex4ht Configuration File
I then set up a tex4ht
personal configuration file, called portfolio.cfg
. It contains some simple CSS, and tells tex4ht to convert the first page of the local PDFs into PNGs using ghostscript
. (So you will need to have ghostscript
installed for this to work.)
\Preamble{html}
\begin{document}
\Configure{TITLE+}{My Academic Portfolio}
\Configure{section}
{}{}
{\HCode{<h2>}}
{\HCode{</h2>}}
\Css{
.likesectionHead {
clear: both;
padding-top: 2em; */
}
dd.thebibliography {
clear: both;
padding-bottom: 1em;
}
dd.thebibliography img {
position: relative;
border: solid 1px \#666;
display: block;
float: left;
margin-right: 1em;
box-shadow: 5px 5px 5px \#ccc;
-moz-box-shadow: 5px 5px 5px \#ccc;
-webkit-box-shadow: 5px 5px 5px \#ccc;
}
}
\makeatletter
\Configure{graphics*}
{pdf}
{\Needs{"gs -o\csname Gin@base\endcsname-thumbnail.png -sDEVICE=pngalpha
-dFirstPage=1 -dLastPage=1 -r10
\csname Gin@base\endcsname.pdf"}%
\Picture[pict]{\csname Gin@base\endcsname-thumbnail.png}%
}
\makeatother
\EndPreamble
Running tex4ht
Or rather, the command htlatex
:
$ htlatex portfolio "portfolio"
Don't forget to run
$ biber portfolio
too, to actually get the .bib
file processed.
\nocite{*}
andlatex2html
but the third point might be trickier. I wonder if you can\includegraphics
just the first page of a pdf...\usepackage{pdfpages}
and then\includepdf[pages=1]{file.pdf}
. But how would you get access to the filename of the pdf on your hard disk?