[pmwiki-users] Options to fix "Page TOC listing showing up center-aligned"

Pico pmwiki at ben-amotz.com
Mon Jul 31 21:11:41 CDT 2006


John Rankin wrote:
> On Tuesday, 1 August 2006 10:58 AM, John Rankin <john.rankin at affinity.co.nz> wrote:
>> On Tuesday, 1 August 2006 10:21 AM, Tegan Dowling <tmdowling at gmail.com> wrote:
>>>> <snip>
>>> BY the way, I did find that the problem goes away if I use
>>>
>>>>> center<<
>>> !!Section Heading
>>>>> <<
>>> Instead of
>>>
>>> !!%center%Section Heading%%
>> I suspect that the toc is picking up the %center% as part of the 
>> toc entry text, so is centering each item. That should be fixable. 
>> Could you look at the html for the toc items and see if they 
>> include a center alignment attribute?
>>
>> If this is the case, the fix will be to omit some (but maybe not all)
>> style attributes. For example, what should the toc entry be for
>>
>> !!Here is an %red%important%% heading
>>
>> Should it omit the style? Currently, it will be included.
> 
> I have confirmed that the %center% is being picked up in the toc
> and tested a fix that looks for and removes '%center%'.
> 
> However, I am of 2 minds about what the fix should be:
> 
> a) just remove %center% -- this has the advantage that other
>    styles will be processed as part of the toc, but if there
>    is one special case, there may be a need for more than one
> 
> b) remove %[^%]*% -- this has the advantage of treating all
>    styles equally by stripping them out, but some authors may
>    want to have some styles reflected in the toc
> 
> c) do nothing -- I don't think this is an option, as the
>    centred toc text is pretty ugly
> 
> At the moment I lean to option a, but am keen to hear other 
> views either for or against. On principle, I don't really like
> treating one style as a special case so am happy to be
> convinced that the code should do something else.
> 
> Meanwhile, I will do nothing.
> 
> 
Along the lines of option a, maybe remove %right% and %center% because 
both are likely to throw off the layout of the toc items in similar ways.

Are there other styles that should be considered together with center 
and right in terms of their impact on layout?  (Presumably %left% is 
less of an issue, assuming that it doesn't change the layout of toc).

If this becomes too much of a headache and the choice comes down to all 
or nothing, then I think it would be better to lose all styling for the toc.

Pico




More information about the pmwiki-users mailing list