This minimal example, following your description, shows that it can be compiled without that error message complaining about \citet
being undefined:
\documentclass{article}
\usepackage[natbib=true,style=alphabetic-verb,sorting=nty,hyperref,backend=bibtex8]{biblatex}
\begin{document}
al trabajo de \citet{Fernandez2007}.
\end{document}
However, I can confirm, that the error
! Undefined control sequence.
l.4 al trabajo de \citet
{Fernandez2007}.
would occur if no options to biblatex are used, i.e. if I just write \usepackage{biblatex}
. This doesn't depend on the listings
package.
I'm not sure if this will help exactly with the problem above - but I'll try to jot down my debugging steps. I was using a customized bibliography sorting in biblatex
, which then requires biber
- and, all being good in the PDF - as soon as I wanted to build this using htlatex
, biber
, htlatex
- I got the above error (only when the .aux
file is present)..
So first I get something like:
! LaTeX Error: Missing \begin{document} in `'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.29 ...backref{1}{myfirstcite}{0}{4}{4}
I search with grep
through files to find this ...backref{1}{myfirstcite}
- and it turns out it is in the .aux
file; contents around that line look like this:
...
\select@language{american}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\select@language{american}}
\@writefile{lof}{\defcounter {refsection}{0}\relax }\@writefile{lof}{\select@language{american}}
\@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}{\select@language{american}}
\abx@aux@backref{1}{myfirstcite}{0}{4}{4}
\abx@aux@page{1}{4}
...
So I go back, run htlatex
again - and now when it stops at error, I press 'I
' in the shell to insert, and then just type \show
and ENTER (ENTER maybe twice) - this spits an additional error message:
?
! Extra }, or forgotten \endgroup.
\abx@aux@backref ...{#2}}{#4}}\blx@addpagesum {#1}
{#5}
l.29 ...backref{1}{myfirstcite}{0}{4}{4}
Ok, so by now, I'm pretty sure tex4ht
doesn't like \abx@aux@backref
.
So, I search first for the macro \abx@aux@page
- and it turns out it is present in biblatex.4ht
file (from tex4ht
); a snippet looks like:
%biblatex.4ht
%
% ...
\def\abx@aux@page#1#2{\blx@addpagesum{#1}{#2}}%
\def\abx@aux@fnpage#1#2{\blx@addpagesum{#1}{#2}}}
% ...
... but it also appears in biblatex.sty
(from biblatex
).
Then I search for \abx@aux@backref
- and, as suspected - this one is defined in biblatex.sty
, but not in biblatex.4ht
; which is probably the reason why it crashes.
Now, \abx@aux@backref
contains an @
, meaning I'd have to define it in between \makeatletter
/\makeatother
- somewhere in the preamble after both biblatex
and tex4ht
are loaded. However, often times in similar cases I just do \let\abx@aux@backref\relax
- but, that will not work here, because the original command always has five arguments.
So, after another search through biblatex.sty
, I find: "\protected\def\blx@aux@backref#1#2#3#4#5{...
" - and while that is not the same command, it is certainly to related to something @aux@backref
... So, in the end I put this in my preamble:
\makeatletter
\def\abx@aux@backref#1#2#3#4#5{}
\makeatother
... and now the htlatex
, biber
, htlatex
combo seems to pass for me?!
Well, not sure how right I am about all this - but certainly hope it helps,
Cheers!
Best Answer
You can abuse the infrastructure of
ucs
; here's a set of tricks that read the files you need in theucs
distribution, but underutf8
which is compatible withbiblatex
.A different strategy is using
unicode-math-table.tex
:The entries in
unicode-math-table
are of the formso we remap this to
(I used
\ensuremath
because you want it, but I'd personally avoid it). For the Greek letters,\upalpha
and so on are used, so I remap also those commands to the usual ones.