[texworks] Window Show Tags and Window Show Contents

Stefan Löffler st.loeffler at gmail.com
Wed Sep 9 11:11:38 CEST 2009


Alain Delmotte schrieb:
> Using my last build (v0.1r406 with Lua and printing) under Windows XP.

Just wanted to let you know: there have been two bugfixes recently (r409
and r413) plus some language updates. I mention this only because r409
fixes the bug originally reported by Paul. But this is not meant to
pressure you to compile them ;).

> 1) the tags panel is linked to a specific file; this means that when
> in a project you have to ask for the tags in each file of the project;

More specifically, the tags panel is linked to a specific window, AFAIK.
This probably won't change, unless we:
 * implement tabs or
 * implement a "Show/Hide tags in all open windows" or
 * implement a configuration property to show tags in new windows by

> 2) the tags themselves are linked to a specific file: you only see the
> structure of the file in which you are, not the structure of the whole
> document.

That's true and may be solved when we start working on project support.
However, this is a seriously non-trivial task. First of all, I imagine
it to be language dependent (LaTeX vs. ConTeXt, etc.). Secondly, it
could be difficult when we're dealing with multiple levels of
inclusions. In fact, I guess it would even be possible to do recursive
conditional inclusions, which would basically beat any editor that
doesn't include half the codebase of TeX itself.
Anyway, I expect the "normal case" to be implemented when project
support arrives, though.

> In the preview, the tags appear only if I use *hyperref* with the
> setup *\hypersetup{bookmarks=true}* and compile at least 2 times.

As pointed out already by Bruno, the "tags" (officially it's labeled
"Table of Contents", I believe) in the pdf only show up if they are
embedded in the pdf. This is not a feature of Tw parsing the pdf or
anything, it just displays the data if it's there. Note that this
doesn't have to correspond to the tags in the source view by any means.
You could fool the source tags for example by the following code:


And likewise, you can probably add custom entries to the pdf toc (either
through hyperref, I'm not sure if that's supported, or through some
specials). But the bottom line is: you need to add the data to the pdf
somehow, and hyperref is a convenient way to do that automatically.

Hope this clears things up a bit,

More information about the texworks mailing list