Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The package 'etextools' is not compatible with biblatex

190 views
Skip to first unread message

Dazhi

unread,
Jan 11, 2011, 10:59:23 AM1/11/11
to
Hi all,

I don't know weather it is a problem of 'etextools' or 'biblatex'.
When I tried to load both of the two packages at the same time, I
can't get the final document. For example, ran pdflatex on the below
codes and got an error
"Argument of \ettl@forloop has an extra }."

% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode

\documentclass[11pt]{article}

\usepackage{etextools}
\usepackage{biblatex}

\begin{document}

Some thing.

More text.

\end{document}

I was using biblatex Version 1.1a, etextools Version 3.1415926 and
etoolbox Version 2.1.

Any ideas about this?

Thanks,
DJ

Martin Scharrer

unread,
Jan 11, 2011, 12:03:05 PM1/11/11
to

Same here (same versions, teTeX under Ubuntu Linux 10.10).

The error about \ettl@forloop points to etextools, not to biblatex,
while I'm not saying that is faulty.
I would guess that it might be an issue with the \AfterEndDocument (or
other) hook.
I also encountered problems with the new v2.1 of etoolbox when used
with my tikz-timing package.
The newly introduced environment hooks caused a parsing issue with an
internal macro.
However, etoolbox alone works with biblatex.

I will have a closer look when I found time.
Martin

Martin Scharrer

unread,
Jan 11, 2011, 12:29:23 PM1/11/11
to

Found it:
1) biblatex uses etoolbox (both are from the same author)
2) biblatex uses the \AfterEndDocument hooks to write a "<
\jobname>.run.xml" file to control the required multiple compilations
3) For this it uses \dolistloop which is defined as "\forlistloop\do".
4) \forlistloop is defined by etextools AND etoolbox IN A INCOMPATIBLE
WAY! Biblatex requires the definition of etoolbox.
5) etextools requires etoolbox and then redefs \forlistloop, therefore
it doesn't help to load 'etoolbox' manually before 'etextools'.

Conclusion: This seems to be a general etextools vs. etoolbox issue,
not only realted to biblatex.

"Solution":

\documentclass[11pt]{article}
\usepackage{biblatex} % load etoolbox
\let\myforlistloop\forlistloop
\usepackage{etextools}
\let\forlistloop\myforlistloop
% Save and restore etoolbox's definition of \forlistloop

\listfiles
\begin{document}

Some thing.

More text.

\end{document}


Best Regards,
Martin

GL

unread,
Jan 11, 2011, 6:04:04 PM1/11/11
to
Le 11/01/2011 18:29, Martin Scharrer a écrit :
> On 11 Jan., 17:03, Martin Scharrer<martin.schar...@gmail.com> wrote:
>> On 11 Jan., 15:59, Dazhi<jiang...@gmail.com> wrote:
>>
> 3) For this it uses \dolistloop which is defined as "\forlistloop\do".
> 4) \forlistloop is defined by etextools AND etoolbox IN A INCOMPATIBLE
> WAY! Biblatex requires the definition of etoolbox.
> 5) etextools requires etoolbox and then redefs \forlistloop, therefore
> it doesn't help to load 'etoolbox' manually before 'etextools'.

I defined \forlistloop in etextools before P Lehman adds a \forlistloop
command in etoolbox v2.0

However, I have to say that etextools should be considered as an
experimental package. In particular, it's not a good idea to write
a package that require etextools...

I'll redefine \forlistloop in etextools, naming it \foretblistloop
(etb for etoolbox because this applies to lists in the sense of
etoolbox : (|,3) separated lists.

Thanks.

Dazhi

unread,
Jan 12, 2011, 5:25:10 AM1/12/11
to

Thank Martin for your help. The solution works here. and I look
forward the new version of etextools.

Regards,
DJ

Philipp Lehman

unread,
Jan 12, 2011, 11:08:31 AM1/12/11
to
GL wrote:

> I defined \forlistloop in etextools before P Lehman adds a
> \forlistloop command in etoolbox v2.0

That's right. I hadn't noticed that, sorry. I'm surprised that it took
several months for the conflict to be discovered.

> However, I have to say that etextools should be considered as an
> experimental package. In particular, it's not a good idea to write
> a package that require etextools...

etoolbox is quite the opposite. I'm trying to be rather conservative
as there's a growing number of packages which depend on it, hence...

> I'll redefine \forlistloop in etextools, naming it \foretblistloop

...thanks for resolving the conflict on the more 'dynamic' end.

--
Sender address blackholed, do not reply directly.
You can still reach me by email at: lehman gmx net.

Ahmed Musa

unread,
Jan 14, 2011, 9:05:10 AM1/14/11
to
On Jan 12, 4:08 pm, Philipp Lehman <devnull.1.leh...@spamgourmet.com>
wrote:

Philipp may well consider making the control names in the etoolbox
package unique, perhaps by prepending them with something like 'etb'.
There are many names in that package that can easily lead to clashes.
Imagine \undef, \ifdef, \ifblank, etc, all of which may easily crop up
in other packages (production or release).

GL

unread,
Jan 14, 2011, 9:54:14 AM1/14/11
to

On the other hand, etoolbox is reliable and provides general purpose
macros... which are meaningful (and prettier) without prefix.

I think at \ifcsundef for example, so general that it is far better than
\makeatletter \expandafter \makeatother
\ltx@IfUndefined (inside document)

When writing some code or a package you have to make a choice: I use
etoolbox or not. etextools is mainly an `amusement'. \forlistloop
(in etoolbox) is not interesting at all... while \listloop is because
it is purely expandable... and unfortunately very (very very) slow...

To be honest, the only feature I still (sometimes) use from etextools
is \FE@testopt, for I like optional arguments (rather than two different
commands) and \newcommand[][] produces commands that cannot be filtered
(like \label, \gettitlestring etc.)

However, it's always preferable to give a key=value syntax when
providing commands in a package.

As time matters, \FE@testopt may be a bit quicker than LaTeX's \@testopt
as the following profiler shows:


Regards.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{book}
\usepackage{etextools}

\makeatletter

\def\timerstart{\edef\start{\the\pdfelapsedtime}}
\def\timerstop{%
\edef\finish{\the\pdfelapsedtime}%
\the\numexpr(\finish-\start-32767)/65536\relax sec
\the\numexpr\numexpr(\finish-\start)
-\numexpr(\finish-\start-32767)/65536\relax*65536\relax
*1000/65536\relax ms%
}%

\def\profilethis#1#2{%
\count@\z@ \timerstart
\@whilenum \count@<#1\do{\advance\count@ \@ne
#2}%
\timerstop
}% \profilethis

\def\testFE#1{\FE@testopt{#1}\@testFE{}}
\def\@testFE[#1]#2{}

\newcommand\test[2][]{}

\begin{document}

\profilethis {2000000}{\testFE[one]{two}}

\profilethis {2000000}{\test[one]{two}}

\bigskip

\profilethis {2000000}{\test[one]{two}}

\profilethis {2000000}{\testFE[one]{two}}


\end{document}\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Ahmed Musa

unread,
Jan 14, 2011, 5:39:57 PM1/14/11
to
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%- Hide quoted text -
>
> - Show quoted text -

> I think at \ifcsundef for example, so general that it is far better than
> \makeatletter \expandafter \makeatother
> \ltx@IfUndefined (inside document)

The prefix doesn't have to involve '@'. Something like pdf commands:
\pdfstrcmp, etc. So we could have \etbifcsundef, \etbletcs, etc.

0 new messages