asciidoctor

Does asciidoctor have a setting to remove the <paragraph> and <p> tags from the source it outputs?

霸气de小男生 提交于 2019-12-23 17:05:56
问题 I am developing a custom filter in Drupal using asciidoctor and realize that asciidoctor places the output in <div class="paragraph"><p> tags. Does it have a setting to remove those tags from the output and return just the inner HTML? 回答1: There is a different output plugin HTML5s that creates semantic HTML with fewer extra tags. It works both in Ruby and JavaScript environments. 来源: https://stackoverflow.com/questions/44859883/does-asciidoctor-have-a-setting-to-remove-the-paragraph-and-p

how to define own asciidoc macro

北城余情 提交于 2019-12-19 02:54:28
问题 How do I define a macro in asciidoc/asciidoctor? I will use a repeating pattern in many parts of my document so I would like to make a parametrized substitution to avoid entering the same stuff many times. In particular, I have the following asciidoc snippet: {set:cellbgcolor:grey} [grid=none, frame=none] |=== | X >| Y |=== {set:cellbgcolor!} And I need to place it in several parts of the document with different text substitutions in place of X and Y. How do I achieve that? 回答1: In my opinion

strange counting in Asciidoctor?

笑着哭i 提交于 2019-12-13 04:26:30
问题 I want to count my figures automatically I use Asciidcotor 1.5.6 :desc-image-fr: FR Text [id="image-fr",reftext="{figure-caption} {counter:figures}"] .{desc-image-fr} image::fr.png[align="center"] :desc-image-ab: AB Text .{desc-image-ab} [plantuml,id="image-ab",format="png",title="{desc-image-ab}" reftext="{figure-caption} {counter:figures}",align="center"] ---- () "FR" as GS () "AB" as AB ---- look in <<image-ab>> and <<image-fr>> This is the result: ...here is the image... Figure 3. FR Text

How to include raw html file?

亡梦爱人 提交于 2019-12-12 18:32:24
问题 In rst, I can easily include a raw html file using the raw directive as follows: .. raw:: html :file: some_file.html Is there a simple way to do this with asciidoctor? I understand that if I wrap the contents of some_file.html with ++++ that I can then use include:: in asciidoc, but I would like to avoid manually editing some_file.html . 回答1: Asciidoctor allows you to put includes into a passthrough block, ideally surrounded by empty lines, like this: ++++ include::some_file.html[] ++++

Strikethrough in Emacs image mode

∥☆過路亽.° 提交于 2019-12-11 05:16:07
问题 With a .emacs loading iimage-mode and adoc-mode: ;; Don't glare 200W in my eyes all day: (set-foreground-color "white") (set-background-color "black") ;; Use adoc as major mode for any file with the extension .adoc. (require 'adoc-mode) (setq auto-mode-alist (cons '("\\.adoc\\'" . adoc-mode) auto-mode-alist)) ;; Use iimage-mode as minor mode whenever we're in adoc-mode. (add-hook 'adoc-mode-hook 'my-adoc-mode-hook) (defun my-adoc-mode-hook () "Custom `adoc-mode' behaviours." (iimage-mode 1))

Resuable markup fragments with Asciidoctor

不打扰是莪最后的温柔 提交于 2019-12-11 04:34:22
问题 I am writing a guide in Asciidoctor for our company. In this guide I would like to define resuable markup fragments which I can use in the document like this one: :MUST: [small]#Must# Although the content is verbatim copied to the resulting document. Does anyone know how to define resuable markup snippets with Asciidoctor? 回答1: Includes are the easiest way to reuse content Macro is an other solution, but this requires some code. I think that my answer to "how to define own asciidoc macro"

asciidoc: is there a way to create an anchor that will be visible in libreoffice writer?

北战南征 提交于 2019-12-10 23:31:52
问题 Tl;dr; What is the correct way to create an anchor in docbook? and is there a way that will make the anchor visible in writer? Background I am trying to split up documentation that was previously in single open office documents into smaller asciidoc documents which are both included in the main open office document and also converted to either or both of html & pdf . I have this mostly working. I use asciidoctor to create html. asciidoctor-pdf to create pdf and a combination of asciidoctor

AsciiDoc add bold text inside a listing block

无人久伴 提交于 2019-12-05 13:13:20
Have some AsciiDoc that has a block like... ---- this is a test with *some* formatted/tabbed text in it blah ---- ...and I would like the text to display like... this is a test with some formatted/tabbed text in it blah ...where the word "some" is bold. summea In AsciiDoc, the double ---- lines signify ListingBlocks , which only preserve certain formatting aspects of your text ( line and whitespace formatting) , according to the AsciiDoc documentation on Delimited Blocks ( with the exception of using [subs="quotes"] , as you noted in your answer ). Other ways to include bold formatting in a