2013-02-27 31 views
2

我遇到了如果TOC標題太接近TOC編號的場景,它會向內拉編號。當標題接近編號時TOC格式化問題

在這裏你可以看到幾個例子,我開始每次添加/刪除一個字符,看看它會不正確地拉數字內容與正確換行到下一行。

Incorrect TOC formatting

以下是topic.fo兩個街區。首先是一個沒有在目錄編號拉動,二是拉動編號英寸

<fo:block 
    start-indent="0in + (2 * 30pt) + 14pt"> 
    <fo:block 
     end-indent="22pt" 
     font-size="10pt" 
     font-style="italic" 
     font-weight="normal" 
     last-line-end-indent="-22pt" 
     text-align="justify" 
     text-align-last="justify" 
     text-indent="-14pt" 
     line-height-shift-adjustment="disregard-shifts" 
     font-family="Helvetica, Arial Unicode MS"> 
     <fo:basic-link 
      internal-destination="_OPENTOPIC_TOC_PROCESSING_d73e797" 
      line-height="150%" 
      line-height-shift-adjustment="disregard-shifts" 
      font-family="Helvetica, Arial Unicode MS"> 
      <fo:inline 
       end-indent="14pt" 
       keep-together.within-line="auto" 
       line-height-shift-adjustment="disregard-shifts" 
       font-family="Helvetica, Arial Unicode MS">Notes Associated with an Improperly Filled Card or a Negative Profile (Biopattern)</fo:inline> 
      <fo:leader 
       leader-pattern="dots"/> 
      <fo:inline 
       keep-together.within-line="always" 
       padding-left.length="12pt" 
       start-indent="-14pt" 
       text-align="right" 
       line-height-shift-adjustment="disregard-shifts" 
       font-family="Helvetica, Arial Unicode MS">2-<fo:page-number-citation 
        ref-id="_OPENTOPIC_TOC_PROCESSING_d73e797"/> 
      </fo:inline> 
     </fo:basic-link> 
    </fo:block> 
</fo:block> 
<fo:block 
    start-indent="0in + (2 * 30pt) + 14pt"> 
    <fo:block 
     end-indent="22pt" 
     font-size="10pt" 
     font-style="italic" 
     font-weight="normal" 
     last-line-end-indent="-22pt" 
     text-align="justify" 
     text-align-last="justify" 
     text-indent="-14pt" 
     line-height-shift-adjustment="disregard-shifts" 
     font-family="Helvetica, Arial Unicode MS"> 
     <fo:basic-link 
      internal-destination="_OPENTOPIC_TOC_PROCESSING_d73e800" 
      line-height="150%" 
      line-height-shift-adjustment="disregard-shifts" 
      font-family="Helvetica, Arial Unicode MS"> 
      <fo:inline 
       end-indent="14pt" 
       keep-together.within-line="auto" 
       line-height-shift-adjustment="disregard-shifts" 
       font-family="Helvetica, Arial Unicode MS">Notes Associated with an Improperly Filled Card or with a Negative Profile (Biopat</fo:inline> 
      <fo:leader 
       leader-pattern="dots"/> 
      <fo:inline 
       keep-together.within-line="always" 
       padding-left.length="12pt" 
       start-indent="-14pt" 
       text-align="right" 
       line-height-shift-adjustment="disregard-shifts" 
       font-family="Helvetica, Arial Unicode MS">2-<fo:page-number-citation 
        ref-id="_OPENTOPIC_TOC_PROCESSING_d73e800"/> 
      </fo:inline> 
     </fo:basic-link> 
    </fo:block> 

我試着調整不同的終端縮進看看我是否能迫使它包沒有任何運氣。我正在使用DITA-OT 1.5.4和FOP 1.0。

+1

看起來像FOP中的一個錯誤,它保留了頁碼引用值的空間,以及它如何與領導者一起工作。您是否嘗試過在FO中對相同頁碼進行拼寫的頁碼2-1進行硬編碼。如果硬編碼的2-1沒有創建縮進,那麼這是頁碼引用和引導組合的錯誤。 – jelovirt 2013-02-28 10:02:17

回答

4

看起來像FOP中的錯誤,請參閱FAQ

出現這種情況FO:頁號引元素,如果FOP格式化請求的頁面之前,通常在TOC或 索引頁出現引用 。這是由於FOP必須猜測未知頁數如何佔用太多空間,並且通常 猜測有些偏離。

最新的FOP版本應該修復此問題。檢查是否可以升級。