将Sphinx docs / rst集成到一个应用程序中

时间:2012-12-09 23:23:04

标签: c++ python-sphinx

我喜欢狮身人面像,我已经玩了很短的时间了,我已经找到了解决数学方程式跨平台兼容性的繁琐问题的简单解决方案,我的文档组织保持清洁,我可以为输出调整了很多选项。

现在我必须解决的最后一部分:有一种通用的方法或一个定义良好的协议来将sphinx输出集成到我的C / C ++应用程序中?

例如,sphinx能够像这个伪代码一样输出标记作为标记:

std::string doc_author = "Super Mario" // already done by Sphinx
...
std::cout << doc_author << std::endl;  // i just have to use the token named doc_author with my functions/methods

为了简单起见我正在考虑支持我的应用程序与本机支持的输出选项之间的集成,例如

  html       to make standalone HTML files
  dirhtml    to make HTML files named index.html in directories
  singlehtml to make a single large HTML file
  pickle     to make pickle files
  json       to make JSON files
  htmlhelp   to make HTML files and a HTML help project
  qthelp     to make HTML files and a qthelp project
  devhelp    to make HTML files and a Devhelp project
  epub       to make an epub
  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  latexpdf   to make LaTeX files and run them through pdflatex
  text       to make text files
  man        to make manual pages
  texinfo    to make Texinfo files
  info       to make Texinfo files and run them through makeinfo
  gettext    to make PO message catalogs
  changes    to make an overview of all changed/added/deprecated items
  linkcheck  to check all external links for integrity
  doctest    to run all doctests embedded in the documentation (if enabled)

问题是这些技术不适用于数学世界,唯一提供相对较好支持的技术是pdf文件格式,也许是html,但在这种情况下我必须使用png来获得最大的兼容性,因为许多设备不支持渲染数学的现代解决方案,并且pngs具有固定的分辨率,并且在高分辨率设备上无法很好地扩展。

有一种简单的方法可以将sphinx与通用应用程序集成,或者我必须考虑并使用sphinx的pdf输出进行中间步骤?

0 个答案:

没有答案
相关问题