Re: sidenotes

On Wed, June 1, 2011 5:32 pm, G. Ken Holman wrote:
> At 2011-06-01 17:24 +0100, Dave Pawson wrote:
>>On 1 June 2011 15:52, Tony Graham <tgraham@mentea.net> wrote:
>> > On Wed, June 1, 2011 3:10 pm, Dave Pawson wrote:
>> >> I want to float side notes to the outside, to take space from the
>> >> start|end region
>> >> which have been made large enough for them.
>> >>
>> >> OK when I know which side it will float to... less so when I insert
>> pages
>> >> and the recto content moves to the verso etc.
>> >>
>> >> Any suggestions please? I need a block about 16pc wide?
>> >
>> > float="outside"
>>
>>which stays within the body?
>
> Of course, yes.  By definition.
>
>>How to 'push it' into the margin area Tony?
>
> This is not possible in XSL-FO 1.1.  Only change bars can be
> synchronized outside of the body area with constructs in the body area.
>
>>Can it be done today?
>
> You have to mimic it using outside floats as Tony has advised you.

Increase the size of the fo:region-body to include the area where you want
the notes to be.

Use separate page masters for recto and verso pages and have a wider
margin on the 'outside' side of the fo:region-body of each.

Put your ordinary content in a fo:block inside a fo:block-container (to
establish a reference area).

Give the fo:block-container negative start-indent and end-indent values.

Give the fo:block the same start-indent and end-indent, but positive this
time.

Put the sidenote content in a fo:block-container in the fo:float.  Give
the fo:block-container a negative start-indent equal to its max-width.

YMMV, but something like this (see below) worked nearly well enough at
putting slide numbers in te outside margin when I formatted the slides for
my presentations.  See, e.g., the PDF attached to
http://www.mentea.net/wiki/XMLInPractice2009/XSLFO20

> And, then, you have to find a formatter that supports outside floats
> and intrusion displacement in order to do the mimicry.

All too true.  I gave up on putting the numbers on the outside because, as
you'll see if you look at the PDF, the formatter sometimes seemed to not
re-evaluate what was 'outside' when content was pushed to the next page.

> Tony's answer is correct for the state of the technology.

XSL FO 2.0 will have better support for marginalia.  See, e.g.,
http://www.w3.org/Style/XSL/Group/2009/03/xslfo20.html#req2_2_3

Regards,


Tony Graham                                   tgraham@mentea.net
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming

  <xsl:template match="head">
    <fo:block-container
      start-indent="-6pt"
      end-indent="-42pt"
      space-before="12pt">
      <fo:block
        intrusion-displace="none"
        start-indent="6pt"
        end-indent="42pt"
        margin="2pt"
        font-size="150%"
        keep-with-next="2"
        background-color="{$menteith-grey}">
        <fo:float float="outside">
          <fo:block-container
            display-align="before"
            intrusion-displace="block"
            start-indent="-36pt"
            end-indent="-48pt"
            max-width="36pt"
            border-left="3pt white solid"
            border-right="3pt white solid">
            <fo:block
              display-align="before"
              margin="2pt"
              font-weight="normal"
              font-size="12pt"
              line-height="inherit"
              start-indent="2pt"
              end-indent="2pt"
              text-align="center"
              background-color="{$menteith-grey}">
              <xsl:number level="any"
                count="slide|headslide"/>
            </fo:block>
          </fo:block-container>
        </fo:float>
        <xsl:apply-templates/>
      </fo:block>
    </fo:block-container>
  </xsl:template>

Received on Wednesday, 1 June 2011 18:39:17 UTC