Le 16/04/2020 à 16:43, Tom Lane a écrit :
> Pierre Giraud <pierre.gir...@dalibo.com> writes:
>> Le 16/04/2020 à 00:18, Tom Lane a écrit :
>>> The main disadvantage I can see to the v2 design is that we're back
>>> to having two <rows> per function, which is inevitably going to result
>>> in PDF builds putting page breaks between those rows.  But you can't
>>> have everything ... and maybe we could find a way to discourage such
>>> breaks if we tried.
> 
> Further experimentation shows that the PDF toolchain is perfectly willing
> to put a page break *within* a multi-line <row>; if there is any
> preference to break between rows instead, it's pretty weak.  So that
> argument is a red herring and we shouldn't waste time chasing it.
> However, there'd still be some advantage in not being dependent on CSS
> hackery to make it look nice in HTML.
> 
> What we're down to wanting, at this point, is basically a para with
> hanging indent.
> 
>> What about putting everything into one <table row> and use a block with
>> some left padding/margin for description + example.
>> This would solve the PDF page break issue as well as the column
>> separation border one.
>> The screenshot attached uses a <dl> tag for the descrition/example block.
> 
> That looks about right, perhaps, but could you be a little clearer about
> how you accomplished that?

Attached you will find the HTML structure with associated styles.
Sorry I haven't tried to do this from the DocBook sources.
I hope this helps though.

Regards
# HTML

      <table class="table" summary="Date/Time Functions" border="1">
        <thead>
          <tr>
            <th align="" valign="middle">
              Function
              <dl>
                <dd>Description</dd> 
                <dd>Example</dd>
              </dl>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <code class="function">age</code>(<code 
class="type">timestamp</code>, <code class="type">timestamp</code>) → <code 
class="returnvalue">interval</code>
              <dl>
                <dd>Subtract arguments, producing a <span class="quote">“<span 
class="quote">symbolic</span>”</span> result that uses years and months, rather 
than just days
                </dd>
                <dd>
                <span>
                  <code class="literal">age(timestamp '2001-04-10', timestamp 
'1957-06-13')</code> → <code class="literal">43 years 9 mons 27 days</code>
                </span>
                </dd>
              </dl>
            </td>
          </tr>
        </tbody>
      </table>

# CSS

#docContent table.table code.literal {
    font-style: italic;
}

code.returnvalue {
    font-weight: bold;
}

code.function {
    font-weight: bold;
}

.replaceable > code {
    font-weight: normal !important;
}

#docContent table.table dl {
    margin-left: 30px;
    margin-top: 5px;
}

#docContent table.table dl > dd {
    margin-bottom: 0;
}

Reply via email to