[pmwiki-users] Keep column alignment with preformatted block text

ABClf languefrancaise at gmail.com
Sat Jun 1 08:20:35 PDT 2024


Thanks Petko for your suggestions and explanations.
Nonetheless, aligning according to | is not very convenient for a very
rudimentary unix user ;)
Now that I know the trick, I will continue to play, thank you.
Gilles.


Le sam. 1 juin 2024 à 17:00, Petko Yotov <5ko at 5ko.fr> a écrit :
>
> You can try something like this:
>
>    [[Synonyme.1442 | visite_sanitaire]]     5
>    [[Synonyme.805  | vite]]               123
>    [[Synonyme.2294 | vocation]]             4
>    [[Synonyme.373  | vodka]]                2
>    [[Synonyme.78   | voix]]                 7
>    [[Synonyme.459  | vol]]                 93
>
> Note that the preformatted text in the rendered page starts after the
> "|" so you probably want to align these like I did above.
>
> For >>white-space=pre<<, it may also need a fixed width font like
> font-family=monospace. Otherwise the spaces are the same, but the
> letters have different widths, i.e. I is narrower than W.
>
> I'm not sure if the wikistyle just >>pre<< is always enabled, if not,
> you may want to add to pub/css/local.css something like this:
>
>    .pre {
>      white-space: pre;
>      font-family: monospace;
>    }
>
> Petko
>
> On 01/06/2024 16:45, ABClf wrote:
> > Hello,
> >
> > I'm playing with preformatted text, trying to keep my text same like
> > it was entered (same alignment).
> >
> > I don't know why my text is not correctly aligned while using >>pre<<
> > block ;
> > and why, the only working case I have found, is by using
> > [@
> > code
> > @]
> >
> > test page is there :
> > https://www.pmwiki.org/wiki/Test/AlignColumn
> >
> > Any advice ? Something I'm doing wrong ?
> > Thank you,
> > Gilles.
> >



More information about the pmwiki-users mailing list