« qutebrowser Key Bindings Installing Extended Hugo »

AsciiDoc Tips and FragmentsUpdated  2022-January-31

News

2022-January-30  Soft launched⁠[1] this evolving⁠[2] article.

 ℹ This is a work in progress.

Because I have a bad memory, I often need to search the web or the AsciiDoc docs for the tips and fragments in this article. Now I can visit this page, which is easy to get to when I’m developing the Infinite Ink website because, thanks to my multi-⁠monitor setup and the hugo server command, this article is easily viewable on my http://localhost:1313/ monitor (at http://localhost:1313/asciidoc-⁠tips-⁠fragments/).

Attributes

To learn about AsciiDoc attributes in general, see:

To learn about custom AsciiDoc attributes, see

Some built-in attributes

Built-in document attributes for character replacement
Attribute nameReplacement textAppearance

blank

nothing

empty

nothing

sp

space

nbsp

&#160;

zwsp

&#8203;

wj

&#8288;

apos

&#39;

'

quot

&#34;

"

lsquo

&#8216;

rsquo

&#8217;

ldquo

&#8220;

rdquo

&#8221;

deg

&#176;

°

plus

&#43;

+

brvbar

&#166;

¦

vbar

|

|

amp

&

&

lt

<

<

gt

>

>

startsb

[

[

endsb

]

]

caret

^

^

asterisk

*

*

tilde

~

~

backslash

\

\

backtick



two-colons

::

::

two-semicolons

;;

;;

cpp

C++

C++

pp

&#43;&#43;

++

Some of my custom attributes

In addition to the above built-in attributes, I define the following custom attributes.

:octothorpe: &#35;
:colon: &#58;
:rsolidus: &#92;
:underscore: &#95;
:3dashes: pass:q[<nobr>---</nobr>]
:4dashes: pass:q[<nobr>----</nobr>]

When coding in AsciiDoc, you reference attributes using syntax like this:

// A line starting with slash slash (//) is a comment

// Some built-in attributes
{asterisk}
{tilde}

// Some Infinite Ink custom attributes
{octothorpe}
{colon}
{rsolidus}
{underscore}
{3dashes}
{4dashes}

Result

* ~

# : \ _ --- ----

Assign multiple IDs to a section

The source code of Infinite Ink’s qutebrowser Tips and Fragments includes this section heading:

[[_wsl]]
== Calling a bash script from a Windows userscript[[_gitbash]]

Note:

• _wsl is the primary ID

• _gitbash is the secondary ID

With the above section heading code, each of the following is true.

1. Both of the next two AsciiDoc source code fragments link to this section heading:

link:/qutebrowser-tips-fragments/#_wsl[userscript on Windows]
link:/qutebrowser-tips-fragments/#_gitbash[userscript on Windows]

link:/qutebrowser-tips-fragments/#_wsl[Calling a bash script from a Windows userscript]

If you’re interested in this topic, here’s a live link: Calling a bash script from a Windows userscript.

Section listed in TOC but not displayed on page

This is interesting.

And so is this.

(to be written)

(to be written)

Endnotes

1. An Infinite Ink article that is soft launched is not listed on Infinite Ink’s Hugo-⁠generated sitemap or home page.
2. Many Infinite Ink articles, including this one, are evergreen and regularly updated.

Comments and questions 📝 🤔 👎 👍

Your public comment or question might immediately improve this page or help me to (eventually) improve this page.