VirtualBox

Changeset 58442 in vbox for trunk


Ignore:
Timestamp:
Oct 28, 2015 1:11:26 PM (9 years ago)
Author:
vboxsync
Message:

docbook2latex.xsl: better support for table columns, now handle 1 to 6 columns and give a reasonable error if anything else is specified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/docbook2latex.xsl

    r56565 r58442  
    512512    <xsl:choose>
    513513      <xsl:when test="@style='verywide'">
    514         <xsl:text>&#x0a;&#x0a;{\small\begin{center}&#x0a;\begin{tabulary}{1.1\textwidth}[]{|L|L|L|}&#x0a;\hline&#x0a;</xsl:text>
    515       </xsl:when>
    516       <xsl:otherwise>
    517         <xsl:text>&#x0a;&#x0a;{\small\begin{center}&#x0a;\begin{tabulary}{.9\textwidth}[]{|L|L|L|}&#x0a;\hline&#x0a;</xsl:text>
    518       </xsl:otherwise>
    519     </xsl:choose>
     514        <xsl:text>&#x0a;&#x0a;{\small\begin{center}&#x0a;\begin{tabulary}{1.1\textwidth}[]</xsl:text>
     515      </xsl:when>
     516      <xsl:otherwise>
     517        <xsl:text>&#x0a;&#x0a;{\small\begin{center}&#x0a;\begin{tabulary}{.9\textwidth}[]</xsl:text>
     518      </xsl:otherwise>
     519    </xsl:choose>
     520    <xsl:text>{</xsl:text>
     521    <xsl:choose>
     522      <xsl:when test="@cols='1'">
     523        <xsl:text>|L|</xsl:text>
     524      </xsl:when>
     525      <xsl:when test="@cols='2'">
     526        <xsl:text>|L|L|</xsl:text>
     527      </xsl:when>
     528      <xsl:when test="@cols='3'">
     529        <xsl:text>|L|L|L|</xsl:text>
     530      </xsl:when>
     531      <xsl:when test="@cols='4'">
     532        <xsl:text>|L|L|L|L|</xsl:text>
     533      </xsl:when>
     534      <xsl:when test="@cols='5'">
     535        <xsl:text>|L|L|L|L|L|</xsl:text>
     536      </xsl:when>
     537      <xsl:when test="@cols='6'">
     538        <xsl:text>|L|L|L|L|L|L|</xsl:text>
     539      </xsl:when>
     540      <xsl:otherwise>
     541        <xsl:message terminate="yes">Unsupported number of columns (<xsl:value-of select="@cols"/>), fix document or converter</xsl:message>
     542      </xsl:otherwise>
     543    </xsl:choose>
     544    <xsl:text>}&#x0a;\hline&#x0a;</xsl:text>
    520545    <xsl:apply-templates />
    521546    <xsl:text>&#x0a;\end{tabulary}&#x0a;\end{center}}&#x0a;</xsl:text>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette