Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to change the text size (font size) of specific blocks when you using asciidoc?

I need your help.

Now I am using AsciiDoc and AsciiDoctor to create some manuals.

I want texts smaller on some specific blocks, for example wide table, wide list, and so on, but not want main texts smaller. Especially I need to make texts of wide tables smaller as my customer requests so.

Is there any way?

like image 606
macoril Avatar asked Aug 18 '17 08:08

macoril


People also ask

How do you change the font size on messages only?

Change Font Size for Android Text MessagesOpen “Settings.” Select “Display.” Tap “Advanced,” then choose “Font Size.” Use the slider to adjust the size.

What is AsciiDoc format?

AsciiDoc is a text document format that was explicitly designed with the needs of publishing in mind, both print and web. It supports all the structural elements necessary for writing notes, documentation, articles, books, ebooks, slideshows, web pages, technical manuals and blogs.

How do I change the font from small to large font?

Here's how to change the size of text, images, and apps in Windows. To change your display in Windows, select Start > Settings > Accessibility > Text size. To make only the text on your screen larger, adjust the slider next to Text size.


1 Answers

You mention lists and tables... About lists, it can't be done as stated in AsciiDoctor Documentation:

Unsupported Complex AsciiDoc markup is not permitted in attribute values, such as:

  • lists

  • multiple paragraphs

  • other whitespace-dependent markup types

As you can see, there it mentions multiple paragraphs, so while @EhmKah answer is a correct way to set a custom styling block, it won't be rendered as expected in a table/list as it's multi-paragraph.

The Built-in CSS class syntax is the way to go [small]#any phrases# But in order to make this work in a table, you must set the cell type with a specifier in this case, the AsciiDoc specifier denoted by a This means the cell (or column) will render supported AsciiDoc statements, attributes, etc.

Here's a working example:

[frame="none",grid="none"]
|====
a| image::images\logo.png[] a|[.small]#Autor: {author}#
|====

If you have tons of rows/columns, you don't have to manually apply the a to all of them. You can set the columns you need this behavior this way:

[cols="1a,2a",frame="none",grid="none"]
|====
| image::images\logo.png[] |[.small]#Autor: {author}#
|====

You can check its documentation for more about Column Formatting and you can check the Rendered table with variable widths and alignments sub section for more about AsciiDoc (a) and other specifiers.

like image 172
Metafaniel Avatar answered Oct 06 '22 19:10

Metafaniel