2017-05-04 87 views
1

對準例如,這文字不正確

1. first item 
2. second item 
    - first subitem 
    - second subitem 
    more info about the 2nd item 
3. third item 

產生這種

enter image description here

如何獲得「更多關於第二項」出現在代碼中的位置?

回答

2

以下地方「更多信息」作爲第二個分項子彈點內的獨立的段落,在pandoc降價。

1. first item 
2. second item 
    - first subitem 
    - second subitem 

     more info about the 2nd item 

3. third item 

輸出:

<ol style="list-style-type: decimal"> 
<li>first item</li> 
<li>second item 
<ul> 
<li>first subitem</li> 
<li><p>second subitem</p> 
<p>more info about the 2nd item</p></li> 
</ul></li> 
<li>third item</li> 
</ol> 
0

這是我也似乎無法在一個優雅的方式來解決一個討厭的問題。但是,編譯到HTML有一個簡單的解決方法:將您的嵌套列表的最後一個項目後</ul></ol>標籤。

1. first item 
2. second item 
    - first subitem 
    - second subitem</ul> 
    more info about the 2nd item 
3. third item 

這將觸發HTML結束 - 在這種情況下,無序 - 嵌套列表降價指示它之前。幸運的是,這不,只要你混合無序(<ul>)和排序(<ol>)名單打破你的佈局可言,如果你的嵌套列表是相同類型作爲其母公司的這個打破你的佈局*。

如果需要,您還可以在不屬於嵌套列表的第一行之前放置一個<br>元素,我發現這樣會產生更具視覺吸引力的佈局。