How do I generate Asciidoctor admonition in the top left corner - asciidoc

Looking into the official Asciidoctor documentation about Admonitions the addmonition look like:
The admonition is in the top left corner.
However, when I use the same admonition in my documentation the it looks like:
The admonition is on the left side of the text.
Are there some special Asciidoctor attributes I need to set in order to get the same look as in the official documentation?

The first example uses the CSS in the Antora UI, the second uses the standard Asciidoctor CSS. The HTML created in both scenarios is the same.
If you want the a similar styled HTML output as with the Antora UI, you'll need to borrow the necessary CSS from the Antora UI and integrate it into the theme you use for your HTML output.

Related

Custom background in title-slide using quarto's reveal implementation

I'm using quarto's reveal.js implementation. I've been reading the official documentation page on customising themes and I'm relatively familiar with SCSS rules.
I've been able to create classes to slides and then customise them via SCSS rules. Regretfully, I haven't been able to add a custom background (either colour or, ideally, image background) to the first slide (#title-slide) covering the entire area, as I would do in other regular slides as described here.
Is there any way to add custom backgrounds to the first slide other than this hack consisting of leaving the presentation's attributes blank?
EDIT:
Not sure if that's the right approach, but I tried adding the background-image url in the yaml metadata and it works:
---
title: "My title"
background-image: "https://images.unsplash.com/flagged/photo-1580139624070-910f651c1b78?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80"
background-opacity: "0.45"
format:
revealjs:
theme: [default]
logo: images/logo_black.png
editor: visual
---
Regretfully, properties such as background-color and background-opacity don't work.
Just for the record, after #tarleb's comment pointing me to pandoc's documentation, I made it work by adding this on yaml's metada:
---
[...]
title-slide-attributes:
data-background-image: "/path/to/image"
data-background-size: contain
data-background-opacity: "number"
[...]
---
As can be seen, other attributes can be passed, as long as
they are indented under title-slide-attributes
they are prepended with data-

How to automatically apply style to all images/diagrams with asciidoctor?

I would like that all images/diagram to be centered in my document.
I know I can center them this way:
[plantuml, align="center"]
....
Some diagram
....
But I would like it to be automatic.
You need to apply some CSS to achieve that, assuming that your output is HTML. If your need to achieve the same for PDF, you'd need to adjust the theme that you are using.
To add some CSS for HTML, see the section on Docinfo Files.
To customize a PDF theme, refer to the theming guide.

How to fold all the second level section in Sphinx?

I'm using the readthedocs theme for a personal sphinx documentation project. Everything works fine except the display of the left frame of the content list: It display all level of section headings, without showing any hierarchy. How to let it show levels as in most readthedocs documentation project?
After click the + sign, it looks right:
This is how I mark the section title:
Apache
======
How to restart
--------------
This sounds like this bug: Toc not expanding.
If not, please include your version of Sphinx, where you build the docs, and whether what you do to build the docs satisfies the conditions of that issue.
Otherwise, there is no configurable option to expand all options in the for the RTD Sphinx theme. See https://sphinx-rtd-theme.readthedocs.io/en/latest/configuring.html#toc-options You will have to write custom JavaScript to make it so, and include the static asset with the theme. That homework is left to the questioner or a gracious answerer.
You could also file a feature request at https://github.com/rtfd/sphinx_rtd_theme/issues/new
This is the default behavior of sphinx. The section that you select expands on the left side bar. Else, it remains collapsed. https://docs.readthedocs.io/en/latest/versions.html this link also shows similar kind of behavior. To make it collapsible on clicking, you will require to update the theme.

Markdown to pdf: page marking

I want to make pdf by markdown: write makrdown and convert it in pdf.
Can I page marking by means of a markdown?
I understand as "a page marking" transition to new page, location of a line to page center across, text location in page center, etc.
Thanks.
I suspect that the best way to get about doing this is to do a Markdown-HTML-PDF convertion. Your markdown implementation should be able to generate HTML and then use something like wicked_pdf (ruby) or the underlying wkhtmltopdf to go from HTML to PDF. The wicked_pdf documentation outlines how to do page numbering with the help of some javascript. For page breaking you should be able to use CSS to keep things together and force page breaks. Check out page-break-inside and page-break-after for this. There is a discussion about it in the wkhtmltopdf manual.

I am using HTML snippet in to Highlight HTML and Javascript code in blog Joomla. but it's executed after saving it

while creating a article I want to show some HTML code as part of content, but after saving that article that particular snippet of HTML code get executed.
I am using joomla 1.5 | code citation extension for insert code in article. Is there any solution?
You should turn off HTML stripping, or include it as a Custom HTML Module, and writing the position in the article with load position. to load the custom HTML you've put in the Module. i.e.
{loadposition YourModulePosition}
Will load anything you place within a Custom HTML Module.
The correct way should be to paste the code into the wysiwyg (design view, not raw code view) - as long as you have a decent editor the angle brackets should be converted to html entities and it should just work.
The built-in Geshi plugin - though a little dated - is usually all that is needed to make add colored highlighting. The plugin is a little dated but after inserting your code all you need to do to make it work is add:
<pre class="html"> ... </pre>
around your html. Chenge HTML to js, css, etc depending upon the code to be shown.

Resources