I would like to add a custom element to my *.adoc files that looks like:
remark:: Text of remark
remark:: Text of remark 2
The text should be rendered like NOTE: element or similar but the remark should be numbered through the whole document, like
Remark 1: Text of remark
Remark 2: Text of remark 2
...
Is such customizing possible in AsciiDoc?
Look into using AsciiDoc's counters.
If you want remark 2 and Text of remark 2, you may have to set a separate attribute for each.
:remark_count: {counter:remark}
Remark {remark_count}: Text of remark {remark_count}
:remark_count: {counter:remark}
Remark {remark_count}: Text of remark {remark_count}
Related
I'm new to MyST and Sphinx, so perhaps this has an obvious explanation, but it is not obvious to me. Whenever I use any construct in my Markdown source, such as bold facing or italics or even an html element such as <span>, the result in the formatted HTML output contains spaces inside the HTML tags. For example, an input such as
* **Barcode**: the barcode identifying the item
* **Title**: the title of the item.
* **Author**: the author of the item.
produces this:
Note the space before the :. Inspecting the HTML reveals that the bold-faced element contains unexpected space characters:
Note the spaces inside the <strong>...</strong>. Why is this happening? What am I doing wrong? More importantly, how do I make it stop?
I'm using Sphinx 3.4.3 with myst-parser 0.13.3. My conf.py defines extensions as 'myst_parser', 'sphinx.ext.autodoc', 'sphinx.ext.autosectionlabel', and 'sphinx.ext.napoleon'.
From all examples I can find, Asciidoc's footnote is written inline:
http://www.seinan-gu.ac.jp/~shito/asciidoctor/html_chunk/chap73.html
The first time you enter a footnote you want to reuse, give it a unique ID in the first position.
The next time you reference the footnote you only need to insert the ID in the square brackets
Though it allows referencing footnote by id, but the example only references inline footnote.
How to write a footnote elsewhere, and reference in the main body of text? My footnotes can sometimes be a few paragraphs, so inline makes less sense.
Currently, there is no facility to control footnote positioning. See: https://asciidoctor.org/docs/user-manual/#user-footnotes
If you can live without auto-numbering, you can simulate footnotes using standard Asciidoctor notation:
== A section
A bold statement<<myfootnote1,^[1]^>>
== Another section
== Footnotes
[horizontal]
[[myfootnote1]]^1^::
Express your opinion in a brave way.
I am in trouble with the event that the sentence edited in CKEditor are not output to Word as a result of inheriting attributes of “-aw-import:ignore”.
A tag with this attribute is a tag that conveys the attribute of the original word when converting from html to word, and it is not output as word as a meta tag.
If the sentence entered in CKEditor inherits the attributes, it will not be output as word by mistake.
Aspose.Words writes this "-aw-import:ignore" only when it needs to make certain elements visible in HTML that would otherwise be collapsed and hidden by web browsers e.g. empty paragraphs, space sequences, etc.
Currently we mark only the following elements with “-aw-import:ignore”:
Sequences of spaces and non-breaking spaces that are used to simulate
padding on native list item (<li>) elements.
Non-breaking spaces that are used to prevent empty paragraphs from collapsing.
However, note that this list is not fixed and we may add more cases to it in the future.
Also, please note that Aspose.Words write instead of because is not defined in XML. And by default Aspose.Words generate XHTML documents (i.e. HTML documents that comply with XML rules).
I work with Aspose as Developer Evangelist.
Please find below list of custom styles that Aspose.Words uses to save extra information in output HTML and usually this information is used for Aspose.Words-HTML-Aspose.Words round-trip. We will add description of these entities in documentation as soon as possible.
-aw-comment-author
-aw-comment-datetime
-aw-comment-initial
-aw-comment-start
-aw-comment-end
-aw-footnote-type
-aw-footnote-numberstyle
-aw-footnote-startnumber
-aw-footnote-isauto
-aw-headerfooter-type
-aw-bookmark-start
-aw-bookmark-end
-aw-different-first-page
-aw-tabstop-align
-aw-tabstop-pos
-aw-tabstop-leader
-aw-field-code
-aw-wrap-type
-aw-left-pos
-aw-top-pos
-aw-rel-hpos
-aw-rel-vpos
-aw-revision-author
-aw-revision-datetime
I want to create a table in ReStructuredText (ReST / RST) where every column should be rendered as an inline literal / monospace font.
I can't find a way to have inline literals span multiple lines, where there is text in front of them, like a table.
Is there a way for me to set a table to render a specific column as inline literal / monospace font? If not, what is the best practice for this?
Try this.
.. csv-table::
:header: Header1, Header2, Header3
A, B, "These lines appear as one line,
even though they are written in two lines."
C, D, "This is normal text. ``this is inline stuff that is very long and may wrap on multiple lines of text in a table cell, and it could look OK, but who knows?`` This is normal text again."
Yields this screenshot, using the Alabaster theme.
You might have to twiddle your theme's CSS to get it just right.
in a Web page :
<h3 class="xh-highlight">Units Currently On Bed List</h3>
"[total beds=0]
"
i want to find xpath of total beds=0.
how can i do?
Your question and your comment are a bit contradictory. Do you want to find the text after a heading or do you want to find the element containing the text [total beds=0]? Also, how exact do you want to navigate your document?
To find a text after any h3 element you can use this: //h3/following-sibling::text()[1] (see XPath - select text after certain node).
To find a text after an h3 element with the class "xs-highlight" you can use this: //h3[#class='xh-highlight']/following-sibling::text()[1]
To be even more precise you can also look for the heading text: //h3[#class='xh-highlight' and text()='Units Currently On Bed List']/following-sibling::text()[1]
This doesn't match the html in your first comment however, so you might want to adjust the header class and text values. Also, it will find any first text even if there are other elements between it and the h3 element.
Now, your second comment makes it seem you actually want to find the element containing the text. The reason //*[text()='[total beds=0]'] doesn't work is because of the newline in the text. If you can get rid of that in the source it should match, otherwise you can "ignore" it in the xpath by using //*[normalize-space(text())='[total beds=0]']. (This is assuming the quotes around the text in your question aren't actually in the document.)