[texhax] Problem with the nameref package

ghaverla ghaverla at materialisations.com
Tue May 20 02:53:51 CEST 2014

On Mon, 19 May 2014 20:27:31 +0200
Heiko Oberdiek <heiko.oberdiek at googlemail.com> wrote:

> The title for the label is written into the `.aux` file
> => moving argument.  
> Therefore it is quite dangerous for a package like `nameref'
> to prefer the long title that might contain fragile stuff.

I have very little experience at writing any TeX macro related.

But, I can appreciate how a long title might be more fragile than a
short one.

So, I did a little experiment in perl, which didn't work out.  But, I
thought I might as well mention that I tried something.  Might provide
ideas for a better solution.  :-)

I made up a long title:
Some Horribly Long Title Involving Gradients of the Stress Tensor in
High Modulus Carbon Reinforced DGEBA Based Epoxies Functionalised with
Single-Walled Carbon Nanontubes and Core Shell Rubber Additives

which is all ASCII, and 203 characters long.  LZW compression is
supposed to work well on text, but all I got was about 10%
compression.  I converted that raw binary into hexadecimal, and then
ran the hexadecimal through conversion from base 16 to base 96 (which
is a printable string).  The final string was longer than the string I
started with, and I doubt it is any less fragile than the string I
started with.

Maybe someone can come up with a better idea?


More information about the texhax mailing list