> You mean in addition to the fact that the xhj package abstract claims you
> shouldn't use galley2 directly in more than 2% of the cases?
seems we have some misunderstanding here. i do believe that the above
statetemt is right (or rather should be right), i.e., that in most
circumstances one should only use higher level interfaces that use galley
internally rather than galley itself. I understood you as trying to get
justification without internally using the galley interface at all.
> >but i think that if you want extended control like offered by the galley
> >interface you can't simply turn it on and off but have to stay within its
> That's not at all what I was doing. I simply had expected that changes to
> justification would be contained by the normal grouping mechanism (because
> they are in 2e) and the fact that they aren't suggests that there are
> things missing from the basic interfaces.
hmm, sounds bad, doesn't it? well i just looked up how i implemented list
environments (since they would need that too) and what I found was this:
i think my original motivation was that the grouping mechanism as such is too
fragile to provide proper control in case of the galley structures as too many
things within TeX's model of the galley happen at different places, e.g the
\parindent is evalutated at the beginning, the baselineskip (to the previous
paragraph even) is calculated at the end of the paragraph, etc. so by making
all things global i was able to control the changes better and in a safer way.
the down effect is that you have to include in environments like yours
explicit state saving end restoring code.
clearly something open to refinement (again the whole implementation is meant
as a trial prototype! - improve it)
> For my present needs I can just
> switch to using instances of the `single' template instead since the
> justification was changed for each new paragraph anyhow. I suspect however
> that having changes of the justification (or whatever) apply for the
> duration of an environment will be a rather frequent request and one
> shouldn't have to go to the "special needs" interface to achieve it. It
> could be that you have to start a new galley level for the environment, but
> then that should probably be given as an example somewhere.
ah here you say it anyhow. however, the fact that such environments start a
new galley level (as they do effectively with the state saving action) means
that they to some extend decouple themselves from the outer environment and I
remember that this was bothersome in one or the other case I was playing with.
So better suggestions are welcome.
> It is a bit annoying that the galley stuff makes all old code so completely
> ineffective. Would it be possible to create some templates which (at each
> \par and in \everypar, I suspect) simply have the mechanisms look in the
> registers which take the names of the primitive parameters and uses the
> values found there? It would (hopefully) enable old code to work in the
> extent that it isn't overridden by settings using the LaTeX2e* interfaces.
the comepltexity of the galley2 implementation isn't due to me being naughty,
it is more or less in my believe due to the nature of the beast. in other
words, I started out with the idea of hooking into \par and \everypar (which
is essentially what I do) and ended up with this type of code (and this is in
fact already the second prototype)
better programmers up front then --- any takers?