Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Frequently Asked Questions 常見問題

Can I use QuickBook for non-Boost documentation? 我可以將 QuickBook 用於非 Boost 文檔中嗎?

QuickBook can be used for non-Boost documentation with a little extra work.
QuickBook 可以用於非 Boost 文件,只需要一點點額外的工作。

Faq contributed by Michael Marcin

Faq 由 Michael Marcin 貢獻

When building HTML documentation with BoostBook a Boost C++ Libraries header is added to the files. When using QuickBook to document projects outside of Boost this is not desirable. This behavior can be overridden at the BoostBook level by specifying some XSLT options. When using Boost Build version 2 (BBv2) this can be achieved by adding parameters to the BoostBook target declaration.
在用 BoostBook 構建 HTML 文檔時,一個 Boost C++ 庫頭文件將被增加到文件中。在將 QuickBook 用於 Boost 以外的項目時,這是不對的。這一行為可以通過指定一些 XSLT 選項,在 BoostBook 層面進行覆蓋。在使用 Boost Build version 2 (BBv2) 時,可以通過對 BoostBook 目標聲明增加參數來實現。

For example:
例如:

using quickbook ;

xml my_doc : my_doc.qbk ;

boostbook standalone
:
my_doc
:
<xsl:param>boost.image.srcimages/my_project_logo.png
<xsl:param>boost.image.alt
"\"My Project\""
<xsl:param>boost.image.w=100
<xsl:param>boost.image.h=50
<xsl:param>nav.layout=none
;

Is there an easy way to convert BoostBook docs to QuickBook? 有沒有容易的方法將 BoostBook 文檔轉換為 QuickBook?

There's a stylesheet that allows Boostbook generated HTML to be viewed as quickbook source, see http://svn.boost.org/trac/boost/wiki/QuickbookSourceStylesheetProject, so it's then just a cut and paste job to convert the BoostBook to QuickBook (which IMO is a whole lot easier to edit and maintain).
有一個 stylesheet 可以讓 Boostbook 生成的 HTML 看起來像一個 quickbook 源文件,請見 http://svn.boost.org/trac/boost/wiki/QuickbookSourceStylesheetProject,這樣只需要一個剪切並粘貼就可以將 BoostBook 轉換為 QuickBook (其 IMO 是一個整體,更易於編輯和維護)。

--John Maddock


PrevUpHomeNext