Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 8

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 9

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 10

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 11

Warning: Undefined array key "pmwiki" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 14

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 14

Warning: Undefined array key "pagename" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 225

Warning: Undefined array key "pagename" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 253
00056: should table caption markup be visible in the stdmarkup file? - PITS - PmWiki

00056: should table caption markup be visible in the stdmarkup file?

Summary: should table caption markup be visible in the stdmarkup file?
Created: 2004-09-26 01:08
Status: Closed - fixed for 2.0.devel10
Category: Feature
From: jr
Assigned:
Priority: 1
Version: 2.0dev8
OS: all

Description: Curently, pmwiki embeds treatment of table captions in the table row markup entry. It would be clearer to someone studying the stdmarkup.php file if there were a separate entry for table rows of the form '||!(.*?)!||'. Perhaps also add a comment about support for table headings using '||!'.


The main reason I went ahead and reused FormatTableRow() for captions was to enable captions to use left, right, and center alignment. Using a separate entry for processing captions is either redundant (a separate call to FormatTableRow() ) or loses that capability. It's reasonable to question if captions should provide alignment options. However, including comments about the available markups makes excellent sense. --Pm

One guessed that was the most likely reason. Lesson in sucking eggs follows:

  function SetTextAlignment($text) {
         $align = '';
         if $text starts and ends with a space
            $align = 'text-align: center;';
         else if $text starts with a space
            $align = 'text-align: right;'
         else if $text ends with a space
            $align = 'text-align: left;'
         return $align;
    }
    

This preserves the default alignment, of course.

This useful function would then be available to future MarkupExtensions, for example (making this up as an illustration):

    =Box ! Box Caption Centred !Box paragraph text

might use a style sheet to produce a box around a paragraph of text, with a caption.

Just a thought jr