[pmwiki-users] Options to fix "Page TOC listing showing up center-aligned"
John Rankin
john.rankin at affinity.co.nz
Mon Jul 31 19:59:41 CDT 2006
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.
JR
>
>--
>JR
>--
>John Rankin
>
More information about the pmwiki-users
mailing list