ReST刪除線
回答
我查了文檔更好,由威樂Säävuori的建議,我決定加入這樣的刪除線:
.. role:: strike
:class: strike
在該文件中,這可以應用如下:
:strike:`This text is crossed out`
然後在我css
文件我有一個條目:
.strike {
text-decoration: line-through;
}
According to the official spec有在休息透溼標記沒有指令。
但是,如果環境允許:raw:角色或者您可以編寫自己的角色,則可以爲其編寫自定義插件。
有我在做它至少在三個方面:
.. role:: strike
An example of :strike:`strike through text`.
.. container:: strike
Here the full block of test is striked through.
An undecorated paragraph.
.. class:: strike
This paragraph too is is striked through.
.. admonition:: cancelled
:class: strike
I strike through cancelled text.
應用rst2html
後您將獲得:
<p>An example of <span class="strike">strike through text</span>.</p>
<div class="strike container">
Here the full block of test is striked through.</div>
<p>An undecorated paragraph.</p>
<p class="strike">This paragraph too is is striked through.</p>
<div class="strike admonition">
<p class="first admonition-title">cancelled</p>
<p class="last">I strike through cancelled text.</p>
你有風格
.strike {
text-decoration: line-through;
}
在這裏,我已經採取了admonition
使用它們指令作爲示例,但任何 指令允許:class:
選項 會做。
由於它生成span
role
指令是 允許將您的樣式應用於段落的一部分的唯一指令。
它是多餘的一類strike
添加到指令又稱 strike
,如建議Gozzilli,因爲指令的名稱是默認 類HTML輸出。
我檢查了這些語法都與rest2html
和斯芬克斯。但 雖然一切如預期rest2html
class
指令失敗斯芬克斯。你有
.. rst-class:: strike
This paragraph too is is striked through.
這是只在小 footnote of Sphinx reSt Primer說來取代它。
我發現其他答案非常有幫助。 我對斯芬克斯不是很熟悉,但是我將它用於一個項目。我也希望獲得突破性的能力,並根據以前的答案進行工作。 爲了清楚起見,我在gozzilli中提到了刪除線的角色,但是我使用rst_prolog變量將其保存在conf.py中,如堆棧溢出線程here中所述。這意味着這個角色可用於所有的休息文件。
然後,我通過在我的源代碼目錄中的_templates
內創建layout.html
來擴展基本html模板。這個文件的內容是:
{% extends "!layout.html" %}
{% set css_files = css_files + ["_static/myStyle.css"] %}
這基本上包括一個自定義的css文件到所有內置的默認html文檔。
最後,在我的源目錄中我_static目錄我包括其中包含的文件myStyle.css
:哪些其他的答案已經提供
.strike {
text-decoration: line-through;
}
。
我只是寫這個答案,因爲它對我來說不是顯而易見的,我用有限的獅身人面像經驗來編輯文件。
- 1. http用REST刪除
- 2. CakePHP的REST API刪除.format
- 3. Azure REST API刪除狀態
- 4. REST刪除表單域?
- 5. Play框架Scala REST刪除
- 6. REST風格取消刪除
- 7. Slim Framework v3 - REST API - 刪除
- 8. REST - 刪除一組對象
- 9. Java Rest刪除錯誤
- 10. 刪除線
- 11. 刪除斷線
- 12. 刪除虛線
- 13. 刪除折線
- 14. SED刪除線
- 15. 刪除線
- 16. 刪除線
- 17. 刪除斜線
- 18. 刪除線
- 19. 刪除峯線
- 20. UILabel刪除線
- 21. 刪除折線
- 22. 刪除線
- 23. 刪除對象時刪除線程
- 24. PHP的幫助刪除刪除TD線
- 25. 刪除線由鍵
- 26. 刪除線引導
- 27. RestKit刪除航線
- 28. 刪除斜線域
- 29. 如何刪除線
- 30. 刪除下劃線
當您使用獅身人面像時,這可能有所幫助:http://stackoverflow.com/a/24932178/2923406 – Rolf