我正在使用 Atom Editor + 两个有关 asciidoctor 的插件/包。
一切都按预期工作。但我有以下情况:
我有以下目录结构:
xml
figures
findOneXml.adoc
findOneXml.png
urls
findOne.adoc
Run Code Online (Sandbox Code Playgroud)
哪里findOneXml.adoc(在数字文件夹内)有
[[findOneXml]]
image::findOneXml.png[caption="Figure - " title="findOneXml"]
Run Code Online (Sandbox Code Playgroud)
通过实时预览,我可以看到图像及其各自的描述
现在 with findOne.adoc(在url文件夹中)包含以下行:
include::../figures/findOneXml.adoc[]
Run Code Online (Sandbox Code Playgroud)
我认为路径参考没问题。如果我使用其他,实时预览会显示一条关于无效或错误路径的错误消息。
但是通过实时预览,我看到图像损坏了,但我可以看到描述。
有什么问题或遗漏了什么?
即使include::./../figures/findOneXml.adoc[]失败
注意:在子/子文档中,我需要添加其他数据如何注释、提示(警告),该子文档将被其他父母多次重复使用。所以我只不需要参考图像。
谢谢
我正在使用spring rest docs生成asciidoc片段.
我可以在我的文档页面中包含生成的代码段.但是,我想在一个单独的adoc文件中定义每个secion的结构,并为我的索引文件中的每个文件都有一行.
目前我的index.adoc文件如下所示:
= My Http Api Docs
= GET /units/:id
== Path Parameters
include::{snippets}/units/get/path-parameters.adoc[]
== Response Fields
include::{snippets}/units/get/response-fields.adoc[]
Run Code Online (Sandbox Code Playgroud)
我希望它是这样的
index.adoc
= My Http Api Docs
usemytemplates::mytemplate.adoc[method='get', url='units', desc='/units/:id']
Run Code Online (Sandbox Code Playgroud)
mytemplate.adoc
= {method} {desc}
== Path Parameters
include::{snippets}/{url}/{method}/path-parameters.adoc[]
== Response Fields
include::{snippets}/{url}/{method}/response-fields.adoc[]
Run Code Online (Sandbox Code Playgroud)
谁知道这样的事情怎么办?
使用asciidoc,我想将目录放在第三页上。最多只能放在第2页;在扉页之后。
我的期望是这样的事情应该有效:
= My book
A book to enjoy
== Preface
Enjoy my book
== Table of contents
:toc:
== Chapter One
It was the best of times ...
Run Code Online (Sandbox Code Playgroud)
...但目录仍然位于第 2 页。
是否可以选择放置目录的位置?
编辑:
我希望目录位于不同页面上的原因是因为我正在复制一个模板,该模板在目录之前有一个部分。
我正在尝试将 pdf 书转换为 asciidoc 文档。我尝试了以下命令:
pandoc -s s.pdf -t asciidoc -o example28.txt
Run Code Online (Sandbox Code Playgroud)
我遇到了“未知读者”问题。
Run Code Online (Sandbox Code Playgroud)q@q-ABRA-A5-V12-1:~/Downloads$ pandoc -s s.pdf -t asciidoc -o example28.txt pandoc: Unknown reader: pdf Pandoc can convert to PDF, but not from PDF.
我该如何解决这个问题,或者是否有另一种方法可以将 pdf 转换为 asciidoc?
我正在编写一些将转换为 HTML 的文本,作为一个长页面。
无法弄清楚如何像在 HTML 中一样使用 链接到部分#some-id,以便用户在单击它时会向上或向下浏览网页
<h2 id="some-id">Section A</h2>
<p>Lot's of lines</p>
<a href="#some-id">Go to section</a>
Run Code Online (Sandbox Code Playgroud) 例如,如果我写:
Notepad++ is *great*, I like Notepad++
Run Code Online (Sandbox Code Playgroud)
它被视为++something++转义结构,忽略粗体*并产生:
<p>Notepad is *great*, I like Notepad</p>
Run Code Online (Sandbox Code Playgroud)
而不是所需的:
<p>Notepad++ is <strong>great</strong>, I like Notepad++</p>
Run Code Online (Sandbox Code Playgroud)
上游讨论:https://github.com/asciidoctor/asciidoctor/issues/1864
在 Asciidoctor 2.0.10 上测试。
我的任务是将一些文档转换为 asciidoc 格式。
我只有 asciidoctor 标准工具 - 我无法访问 asciidoctor 用于渲染输出的任何 css 表。
我需要改变单词中间的颜色。
假设这个词是 RedNectar
我希望前三个字母呈现为红色,后五个字母呈现为黄色
如果我拆分这个词并使用[red]#Red# [yellow]#Nectar#
我得到了正确的颜色,但它们之间有一个空格
但如果我删除空间,[red]#Red#[yellow]#Nectar#它会呈现为:
[黄色突出显示只是表示有问题的预览]
那么我需要施展什么魔法才能让这两个半字连接起来呢?在很多情况下,当我在单词之间使用 {nbsp} (不间断空格)时,我在单词之间遇到与 wee 相同的问题 - 现在它完全被视为空格,并且我遇到了与您所看到的相同类型的问题这里 - 我在 Red 和 Nectar 之间有一个空格 - 它只是一个 {nbsp} - 并且仍然无法正确渲染。
有谁知道如何在 Asciidoc 中将变量传递{var}给[source]块和示例块(带有====)?
我已经尝试了以下
:country: France
:city: Shanghai
[source]
----
print("{country} is a country")
print("{city} is a city")
----
.Example
====
{country} is a country +
{city} is a city
====
.Example with better alignment
====
{country} is a country
{city} is a city
====
Run Code Online (Sandbox Code Playgroud)
但这就是我得到的:
实际上,第一个“示例”正在运行,但它不是理想的解决方案,因为:
+在每一行的末尾添加一个期待您的投入。提前致谢!
当使用 asciidoctor-pdf 转换为 PDF 时,我无法为 .adoc 文件设置字体大小(或样式)。根据文档,我可以指定它如下:
base:
font_size: 8
line_height_length: 10
Run Code Online (Sandbox Code Playgroud)
所以我把它放在我的 .adoc 文件的顶部。但是生成的 PDF 并未反映此更改。您能否提供一个 .adoc 文件作为示例,该文件指定不同的字体大小或样式?坦吉斯
我正在使用 asciidoc 标记语言编写文档并将其推送到 github 存储库。Github 自动渲染 asciidoc 文件 (*.adoc),但出于(我)未知的原因不想接受我嵌入的 YouTube 视频。
我已经尝试了 asciidoc 作者指南中推荐的方法(例如)
video::rAteGra5-xM[youtube]
Atom 编辑器中的预览有效,导出为 HTML 版本有效。你能帮我吗?让它在 github 渲染的 asciidoc 页面中工作的首选方法是什么?
谢谢