如何在 reStructuredText / Sphinx 中创建浮动图形?

2024-04-20

我想要一个带有文字的图形。

这就是我要说的:

Installation of Optional Accessories
====================================

.. warning:: Never plug in or unplug a Hand Robot or a Grasp Sensor while the robot is turned on, as the system will not function properly and damage to the robot could occur.

Installing a Hand Robot
-----------------------

.. _`fig-attach-hand-robot`:
.. figure:: attach-hand-robot.*
  :scale: 40%
  :align: right

  Attach Hand Robot

Make sure the robot is turned off as described in the section :ref:`turn-off-robot`. 

Take the hand robot out of the grounded bin that sits on top of the electrical panel (if you have an adjustable height table) or sits on top of the rear table (if you have a fixed height table). Make sure not to touch the pins on the electrical wiring while doing so. Insert the conical protrusion of the hand robot into the conical receptacle (see :ref:`fig-attach-hand-robot`). Once the hand robot is supported by the InMotion Arm Robot, make sure the two knobs below the Hand Robot have engaged and sprung in. If they have not, twist them until they do as shown (see :ref:`fig-knobs-in`).


and 我得到的是这个 PDF 输出的屏幕截图。 http://dl.dropbox.com/u/178401/Screenshots/fvf~.png

  • 为什么图形标题居中,而不是在图像下方?
  • 为什么正文(“确保...”和“接受...”)不在图像的左侧,而不是在图像的下方?我希望图形向右浮动,文本在左侧。

所以,我对 reStructuredText 做了一些研究,看来你想要的实际上是不可能的。

的文档figure http://docutils.sourceforge.net/docs/ref/rst/directives.html#figureimage http://docutils.sourceforge.net/docs/ref/rst/directives.html#image-options指令从未提及将文本环绕在对象周围的能力。

这可能是向 Sphinx 开发人员提供的功能请求,尽管我怀疑他们会拒绝它,因为第一个规范中没有明确提到它。

我希望赏金能够引起一些关注,但我怀疑并没有。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 reStructuredText / Sphinx 中创建浮动图形? 的相关文章

  • Sphinx 和 JavaScript 文档工作流程 [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 对于我的 JavaScript 框架 我想使用 Sphinx 由于我是 Sphinx 世界的新手 我希望你们能帮助我开始使用 Sphi
  • 在 Sphinx 中的文件链接中使用版本号

    在 Sphinx 中 可以使用以下语法生成文件链接 name of file js
  • Sphinx automodule:如何引用同一模块中的类?

    我正在尝试使用狮身人面像autodoc http www sphinx doc org en master usage extensions autodoc html扩展 特别是automodule指令自动为我正在开发的 django 应用
  • 带注释的狮身人面像树

    通常使用toctree在狮身人面像中看起来像这样 toctree maxdepth 2 foo bar baz 举例来说 如果foo rst以标题 Being Foo 开头 bar rst从 做酒吧 开始 并且baz rst以 Thinki
  • Sphinx Pygments 词法分析器过滤器扩展?

    我有一种类似 Lisp 的语言 我想在 Sphinx 代码片段文档中强调使用 Pygments 我的方法是扩展现有的 CommonLispLexer 以使用 NameHighlightFilter 添加内置名称 但是 它不起作用 所以我一定
  • 如何使用 intersphinx 正确链接到 PyQt5 文档?

    我在尝试链接到时遇到了一些麻烦PyQt5 文档 http pyqt sourceforge net Docs PyQt5 using intersphinx 尝试交叉引用任何QtCore类 例如QThread 没有像我预期的那样工作 我已经
  • 如何在Sphinx中展开侧边栏目录树上的所有小节?

    我想知道是否有一种方法可以扩展包含在标题下的所有小节index rst file 举个例子 它是这样的 Section 1 Section 2 Section 3 这就是我希望的样子 Section 1 Subsection 1 1 Sub
  • 用于多语言 API 的 Doxygen

    我的公司开发了一个用于工程程序的 API 它是用 C 开发的 但我们为以下语言创建了包装器 类似于 VB 的专有语言 MATLAB 和Python 目前 文档是由一堆脚本生成的 要保持 100 的完整性开始变得非常耗时 我想知道是否有一种方
  • 如何使 Sphinx 尊重使用 __init__.py 将类导入到包中

    我有一个包裹 foo foo py bar py init py foo py 有一个 Foo 类 在 init py 中 我导入了 Foo 类 以便用户可以执行以下操作 from foo import Foo Sphinx 正确地将 Fo
  • sphinx,重组文本:表格的颜色单元格/行

    有没有办法为 sphinx 中表格中的特定行着色 我尝试使用 role 它与 CSS 文件相关 如中讨论的sphinx restructedtext 为单个单词设置颜色 https stackoverflow com questions 3
  • 将可点击的 SVG 图像插入 Sphinx 文档

    我有 SVG 图像文件 其中有多个节点 每个节点都与 URL 关联 如果我直接在浏览器中打开此文件 我可以单击每个节点 它将打开不同的 URL 但是 当我在 Sphinx 文档中使用这张图片时 它不起作用 图片作为一个整体呈现 所以我需要通
  • 如何从 .rst 文件访问 sphinx conf.py 中的变量?

    我是 Sphinx 和 reStructuredText 的新手 在我的狮身人面像里面conf py我定义 version 0 0 2 代替tutorial rst我想访问version变量和显示0 0 2在我的 html 文件中 我试过
  • 在 sphinx 侧边栏中启用版本阅读文档主题

    我想将 versions html 包含在侧边栏中 但无法成功 我尝试在 中为侧边栏添加 versions html 但这没有效果 html sidebars versions html 另外如何声明不同的版本conf py 我看过sphi
  • 我可以在 reStructuredText 中使用内联原始 LaTeX

    我正在尝试将 LaTeX 变量嵌入到一些 reStructuredText 中 我知道 raw 指令 但我希望将其嵌入到文本段落中 具体来说 我希望从模板考试文档中复制 numquestions 和 numpoints 变量 我尝试过使用
  • 摆脱 Sphinx 中的“重复标签”警告

    在 Sphinx 中 我收到大量警告 例如 PATH FILENAME LINE WARNING duplicate label LABELNAME other instance in PATH FILENAME 似乎将所有节标题视为 标签
  • 如何在节标题和段落之间添加额外的空格

    我希望标题和段落之间以及段落之间有更多的空间 我不希望这是一个全局设置 但我想在需要的地方和时间使用它 感谢任何建议 您可以在行首使用竖线在输出中生成空行 像这样 Heading Paragraph with text
  • 通过 :ref:? 从 ReST 文档中提取文本块

    我有一些 reStructuredText 文档 我想在在线帮助中使用其中的片段 似乎一种方法是通过引用 剪掉 标记片段 例如 my boring section Introductory prose blah blah blah my i
  • 如何收集 Sphinx 中的所有外部链接?

    我必须在手册中放入一些外部链接 并且希望在 部分甚至整本书的末尾 不重要 列出所有链接 而无需手动重复它们 我怎样才能做到这一点 这是带有参考书目的文档的摘录 呈现的版本是here http packages python org pyte
  • 使用 Sphinx 时,如何记录没有文档字符串的成员?

    我正在为我发布的包编写文档 我发现您的文档越全面 人们就越容易找到您的包来使用 废话 实际上 我在充满爱心地编写代码的所有功能和细节方面获得了很多乐趣 然而 我对如何为类级变量编写与 Sphinx 兼容的文档感到完全困惑 特别是 我有一些e
  • reStructuredText:README.rst 未在 PyPI 上解析

    我有一个托管在 Github 和 PyPI 上的 Python 项目 在 Github 上 https github com sloria TextBlob blob master README rst https github com s

随机推荐