On Wed, Nov 4, 2009 at 5:54 AM, osna <osna...@googlemail.com> wrote:
>
> Hello Kevin & other developers,
>
> I'm using the tufte-handout.cls one and a half year, first with
> TeXShop, then - most time - with LyX as editor and helpful cap.
>
> The works I edit are linguistic ones, language teaching and presenting
> old texts (in Westphalian-Saxon, sister of Middle English). Therefore
> I'm glad, that tufte-latex cultivates and forster the use of (helping)
> sidenotes! LyX on the other hand facilitate the use of IPA phonetical
> characters which I need.
>
> Not until the other week I finally established tufte-latex 3.0.0 with
> the result that firstly my hitherto made documents couldn't be
> processed (compiled) any more, not in TeXShop nor LyX.
>
> I got LaTeX warnings and errors like:
>
> ! LaTeX Error: Command \cplabel already defined.
> ! LaTeX Error: Command \adjustwidth already defined.
The Tufte-LaTeX document classes load the changepage (or chngpage)
package themselves. So if you attempt to load the package in the
preamble of your document, you will see these errors. Since we
require this package for the fullwidth environment and figure* floats,
the best solution is to remove \usepackage{changepage}% (or chngpage)
from the preamble of your document.
> Package hyperref Warning: Token not allowed in a PDF string
> (PDFDocEncoding):
> (hyperref) removing `\afterassignment' on input line
> 53.
>
> <= this one 25 times with another "removing"-specification.
This is a warning emitted by the hyperref package when it is
converting LaTeX code into plain text. You can almost always safely
ignore these.
> and even when there are more than ten sidenotes:
>
> »! LaTeX Error: Too many unprocessed floats.«
You discovered a solution to this problem below. I'll add my comments there.
> Therefore I had a correspondence with the LyX developers. (Myself I am
> not at all a programmer or LaTeX expert.) On this basis I ask you:
>
> =>hyperref: Is it wise to load the hyperref pkg already with the .cls,
> which does not allow or make much complicated to configure it in the
> doc's preamble?
It's not particularly wise, no. I'm trying to work around the issue,
but have hit some snags and haven't had time to get back into it yet.
In the meantime, a workaround you can use is to provide the 'nohyper'
document class option:
\documentclass[nohyper]{tufte-book}
and then load hyperref in the preamble of your document with the
options you prefer. Some options can be set in the preamble with
\hypersetup, but not all of them.
> =>PDFDocEncoding (which is not Unicode!): is it wise to set this in
> the .cls, isn't it a disregard of other languages than English for use
> with tufte-latex? - The umlaute (mutated vowels) will not function in
> pdf-bookmarks, unless the hyperref pkg is loaded with the "unicode"
> option.
I don't think we're explicitly setting PDFDocEncoding in our code --
hyperref simply defaults to that when the unicode option isn't
specified. Are you aware of any caveats to using the unicode option?
At first glance, it seems like using unicode makes for a sensible
default. I'm happy with adding this option as a default if there are
no major issues with it.
> => "Too many unprocessed floats" - I don't know why I had less cases
> of the problem with tufte-handout-version-2. Anyway, it is not good in
> a doc-class which cultivates and demand extended use of sidenotes.
>
> For the latter I finally discovered already a work-arround (or
> solution?) with \usepackage{morefloats} in the preamble...
Using the morefloats package will get you a bit farther: it adds more
'slots' for sidenotes/floats.
The Tufte-LaTeX document classes automatically include the 'placeins'
package. This package provides the \FloatBarrier command. If you put
the \FloatBarrier command in your document, it will force LaTeX to
process all of the floats before typesetting any more material. (This
also has the side-effect of starting a new paragraph, so use it
between paragraphs.) I've attached a short example document that
illustrates the effect of the \FloatBarrier command (along with using
the morefloats package).
It looks like the morefloats package could go even further in what it
does. I'll look into the trade-off between memory usage and adding
more float 'slots'. It would definitely be nice for people using the
Tufte-LaTeX document classes to never have to see the 'too many
unprocessed floats' error.
> So I concentrate here on asking a better solution for hyperref and -
> above all - for the PDFDocEncoding, i. e. Unicode.
>
> Do you think that you develope solutions for one or all the
> inconveniences, snags and headaches mentioned above?
> Have you other advice?
For the hyperref/unicode issue, you can use the 'nohyper' workaround I
mentioned above. I'll look into the unicode option and will continue
to try to get hyperref to bend to my will. :-)
Let me know if have problems with any of the workarounds I mentioned
above or if you encounter further problems with the Tufte-LaTeX
document classes.
Thanks for your help in identifying these shortcomings!
--Kevin
On Wed, Nov 4, 2009 at 8:19 PM, Uwe Stöhr <uwes...@web.de> wrote:
> This doesn't work here. Whenh I compile the attached TeX file, I get 4 LaTeX
> errors. Two of them are about a missing \fi, so it might be a bug in the
> tufte class. (I'm using the latest version of tufte.)
>
> Besides this, never get any PDF bookmark when using the tufte-handbook
> class, no matter if I use the "nohyper" option or not.
Are you using the latest released version or the version in svn?
When I compile this with the svn version, it compiles without error
(using both pdflatex and latex). Can you add 'debug' to the
documentclass options list and send me the resulting log file?
Thanks!
--Kevin
On Thu, Nov 5, 2009 at 6:57 PM, Uwe Stöhr <uwes...@web.de> wrote:
> Kevin Godby schrieb:
>
>>> Besides this, never get any PDF bookmark when using the tufte-handbook
>>> class, no matter if I use the "nohyper" option or not.
>>
>> Are you using the latest released version or the version in svn?
>
> I'm using version 3.0.0 of tufte.
>
>> When I compile this with the svn version, it compiles without error
>> (using both pdflatex and latex). Can you add 'debug' to the
>> documentclass options list and send me the resulting log file?
>
> It is attached.
Ah, it looks like the 'nohyper' option was added after 3.0.0 was
released. Sorry.
Try using the version in svn and see if it compiles successfully
there. If there are still bugs, please let me know and I'll try to
fix them.
http://code.google.com/p/tufte-latex/source/checkout
(I really do need to release a new version soon!)
Thanks!
--Kevin
When I compile this with the svn version, it compiles without error(using both pdflatex and latex). Can you add 'debug' to thedocumentclass options list and send me the resulting log file?
On Sat, Nov 7, 2009 at 1:10 PM, Uwe Stöhr <uwes...@web.de> wrote:
> Before doing this, can you please have a look at this bug:
> I checked out the latest tufte files and run the attached TeX-file. I get a
> bunch of errors, one for every \footnote and one for every \sidenote. I
> attached the logfile.
> Note that this errors didn't occur with tufte 3.0.0.
I'll try. When hyperref is loaded, it redefines the \footnote
commands and overrides the Tufte-LaTeX redefinition of \footnote.
In short, the hyperref package is a pain. :-) It needs to be loaded
*before* some code and *after* other code (and keeping it all straight
gives me a headache).
But I'll add this to the list of bugs and try to get the hyperref
stuff working before the next release.
Thanks for reporting the bug!
--Kevin
It looks like hyperref redefines the footnote code only if
hyperfootnotes=true (which is the default). Adding the
'hyperfootnotes=false' option when you load the hyperref package
should resolve the issue.
I've added \PassOptionsToPackage{hyperfootnotes=false}{hyperref} so
that it will work with the default options. This fix has been
committed to svn.
Thanks for your help!
--Kevin
It looks like hyperref redefines the footnote code only if
hyperfootnotes=true (which is the default). Adding the
'hyperfootnotes=false' option when you load the hyperref package
should resolve the issue.
I've added \PassOptionsToPackage{hyperfootnotes=false}{hyperref} so
that it will work with the default options. This fix has been
committed to svn.
I don't usually change the date/version in the code until it's time
for a release. The hyperref change is in revision 129.
--Kevin
I wrote:Thanks for this fix, but it still doesn't compile. I get a hyperref error when there are cross-references to figure or figure*, see the attached testfile.I also get this bug for references to tables but not for references to marginfigures.
it worked, in TeXShop and with LyX-LaTeX. Also I tested it with same real document of mine with success. In LaTeX (TeXShop) also the \hyperref{}{} worked, but not (yet) in LyX - I will asked this betimes there. So I have to use for the time being in LyX-LaTeX only the \url{} command for internet links.
On Tue, Nov 10, 2009 at 8:24 PM, Uwe Stöhr <uwes...@web.de> wrote:
> Thanks for this fix, but it still doesn't compile. I get a hyperref error
> when there are cross-references to figure or figure*, see the attached
> testfile.
> I expected that hyperref was turned-off completely or better not even loaded
> when the nohyper option is used.
I just committed a patch that should fix this (r130). Could you
verify that this resolves the bug?
What happened is that we store a copy of the definitions of \caption
and \label during \AtBeginDocument. When hyperref is loaded, it
redefines these commands. Unfortunately, it redefines the commands
after we've stored a copy of the definitions -- so we end up storing
the original LaTeX definitions instead of the new hyperref
definitions.
To fix this, I've started storing the definitions of \caption and
\label when you create the figure or table. This way, we'll always
have the latest (current) definition.
(We save copies of the \caption and \label definitions, because we
replace those commands with our own that gather the parameters to be
put in a box alongside the figure/table contents. After we're done
typesetting the caption alongside the figure/table, we restore the
original definitions.)
If you continue to encounter problems, please let me know.
Thanks!
--Kevin
I just uploaded a patch that I believe fixes the \ref problem that Uwe
discovered. If you have any other problems with the Tufte-LaTeX
document classes, please let me know.
Thanks!
--Kevin
This is the expected behavior. According to the hyperref docs:
The depth of the outlines is controlled by option bookmarksdepth. The
option acts globally and distinguishes three cases:
* bookmarksdepth: Without value hyperref uses counter tocdepth
(compatible behaviour and default).
* bookmarksdepth=<number>: the depth is set to <number>.
* bookmarksdepth=<name>: The <name> must not start with a number or
minus sign. It is a document division name (part, chapter, section,
...). Internally the value of macro \toclevel@<name> is used.
The book class sets the tocdepth so that only chapters are shown in
the table of contents by default.
> The new bug is:
>
> - Take the attached LyX file. You find there in section "Figures" a figure
> float followed by a MarginFigure float. In the PDF output the caption of
> both floats overlap each other making it unreadable.
Yes, this is a known issue. I would like to come up with a way to
automatically avoid these overlap conditions, but I'm not sure how to
do that yet.
--Kevin