Questions tagged [asciidoc]

AsciiDoc is a lightweight markup format similar to Markdown, but it was designed for technical writing with programmatic capabilities as well as semantic structure.

AsciiDoc is a document format for writing technical articles, books, ebooks, slideshows, web pages, man pages, and blogs. AsciiDoc files can be rendered in many formats including HTML, PDF, EPUB, and man page.

AsciiDoc is highly configurable: both the AsciiDoc source file syntax and the backend output markups (handled by templates) can be customized and extended by the user. The format is very similar to the popular Markdown markup, but AsciiDoc additionally incorporates programmatic capabilities and semantic structure. Functionality such as variable substitution, conditional flow, and file inclusion make AsciiDoc dynamic, more like coding. Semantic elements like admonitions, examples, definition lists, and sidebars enable structured writing like a mature technical-writing format.

Originally designed as a lighter, writer-friendlier version of the XML-based DocBook format, AsciiDoc is supported by two distinct toolchain families: the original, Python-sourced variant, as well as newer, Ruby-based tools from an organization called Asciidoctor. The newer suite honors the original syntax almost completely but remains active extending the language and its tooling.

AsciiDoc is free software. The Python-sourced edition is licensed under the terms of the GNU General Public License version 2 (GPLv2). The Ruby-sourced edition is licensed under The MIT License.

471 questions
7
votes
2 answers

Substitutions inside literals in Asciidoc

There doesn't appear to be a way to have variables (attributes, substitutions) parsed within literal text in Asciidoc, or else I'm missing something. I want to be able to set a variable and then call it inside a code block or literal string as…
Brian D
  • 833
  • 7
  • 11
5
votes
2 answers

Can I include Java constant value in AsciiDoctor document?

For example, lets have a Java constant in some class public class MyClass{ public static final String ENDPOINT="http://example.com" } and lets try to describe that class in AsciiDoctor (corporate docs reasons) ==== My class ..... some descripton…
Antoniossss
  • 31,590
  • 6
  • 57
  • 99
5
votes
1 answer

Center align image in README.adoc (AsciiDoc) on GitHub

I want to center align an image in a README.adoc file in GitHub. I know that for Markdown files, adding HTML like the following works:

However, I want…
HerCerM
  • 145
  • 2
  • 9
5
votes
1 answer

Create a Table with highlighted Source Code in Asciidoc

I would like to highlight some of my code in tables. I tried many ways but I could get it fixed. I would appreciate if someone can help me.
Youkesen
  • 137
  • 1
  • 1
  • 4
5
votes
2 answers

asciidoc asciidoctor include adocs and their images

I am building my asciidoc template to manage my development documentations. Therefor I want to be able to link existing ascii documents into a main / or a new document inclusive images and other resources. To link documents I use the include keyword…
5
votes
1 answer

With AsciiDoctor, how to pass variables in source and example blocks?

Any one knows how to pass variables {var} into [source] blocks and example blocks (with ====) in Asciidoc? I have tried the following :country: France :city: Shanghai [source] ---- print("{country} is a country") print("{city} is a…
Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
5
votes
1 answer

How to do word break in Ascii Doc?

I am writing documentation in Ascii Doc style (AsciiDocFX GUI, but I suppose it is invalid to topic) and I am having a problem. When I create a table and then input a long word with no spaces inside of cell, the word is not split into multiple…
Zdeno Pavlik
  • 728
  • 6
  • 15
5
votes
1 answer

AsciiDoc "referenced links" (as in Markdown)

Reference-style links are quite useful since I can refer to the links by its names. For instance, in Markdown I'm used to do something like: The [Web site][tag-web-site] references...blah. [tag-web-site]: https://web-site-url.tld ...and it will…
x80486
  • 6,627
  • 5
  • 52
  • 111
5
votes
1 answer

Using tabs in AsciiDoc (Spring Rest Docs)

I'm using Spring Rest Docs to generate documentation. I would like to do something like Bootstrap's Togglable tabs. Spring documentation uses togglable tabs, but I don't know how to do it. Here is an example (MockMvc / REST Assured):…
Bilal BBB
  • 1,154
  • 13
  • 20
5
votes
2 answers

How do I merge or even disable footnote links in asciidoc fop

I've got a rather large asciidoc document that I translate dynamically to PDF for our developer guide. Since the doc often refers to Java classes that are documented in our developer guide we converted them into links directly in the docs e.g.: In…
Shai Almog
  • 51,749
  • 5
  • 35
  • 65
5
votes
2 answers

Creating custom HTML with asciidoctor

I'm using a CMS to publish my blog articles. I'm looking for a way to create HTML articles offline from a simple text file. This is a piece of HTML which I normally use for my articles:

 We want to show how you can gather information such as the…

user2824073
  • 2,407
  • 10
  • 39
  • 73
5
votes
1 answer

a2x fails to compile my manpage

I have a an Asciidoc document foo.1.txt, and, following the instructions here, I tried to compile it with a2x as follows: a2x --doctype manpage --format manpage foo.1.txt After this, I got the following error: a2x: ERROR: "/usr/bin/asciidoc.py"…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
5
votes
2 answers

How can I place two images side-by-side with Asciidoctor?

I'm trying to place two images side-by-side, and ideally center the whole block in an Asciidoctor project. The code below works in the HTML5 output, but stacks the images when rendered to a…
Matt Raible
  • 8,187
  • 9
  • 61
  • 120
5
votes
1 answer

How to use AsciiDoclet to generate asciidoc file from javadoc comments in .java file

I'm newbie with asciidoc. I want to generate HTML Documentation from commented javadoc (in asciidoc format) in java file. for example java file /** * = Asciidoclet * * Sample comments that include `source code`. * * [source,java] * -- *…
Piyush
  • 1,528
  • 2
  • 24
  • 39
5
votes
2 answers

Align image caption with image in asciidoc

I have a block image inserted as shown below: [[myimage]] image::fig1.png[align="center", title="My caption"] Unfortunately, the image is centered but the caption is left-aligned. I also tried doing this: [[myimage]] .My…
pap42
  • 1,236
  • 1
  • 17
  • 28
1 2
3
31 32