INTERESTING FACTS BLOG

Painting and Sketches

AsciiDoc qo`llanmasi

Оригинальная статья: AsciiDoc cheatsheet

Автор статьи: Aleks Efros

Источник: https://powerman.name/doc/asciidoc

Xulosa

Bu qo’llanma AsciiDoc uchun – “Matnga asoslanib hujjat tayyorlash” skripti. Qo’llanma har xil AsciiDoc versiyalari uchun mavjud (ba’zi bir formatdagi sintaksik o’zgarishlar uchun) shuningdek har xil css uslublar ham (GitHubda bor).

Bu qo’llanma AsciiDoc 8.6.9, uchun standart css ishlatilgan holda.

Hujjat sarlavhasi

Main Header
===========
Optional Author Name <[email protected]>
Optional version, optional date
:Author:    AlternativeWayToSetOptional Author Name
:Email:     <[email protected]>
:Date:      AlternativeWayToSetOptional date
:Revision:  AlternativeWayToSetOptional version

Attributlar

AsciiDocda oldindan belgilangan juda ko’p attributlar bor, hamda siz o’zingiznikini qo’shsangiz ham bo’ladi. Attribut qiymatini olish uchun {attributnomi} sintaksisini ishlating.

Author is {author}

Version is {revision}

Muallif - Aleks Efross

Versiya – 2.2.2

:My name: Alex Efros
My name is {myname}

Mening ismim Aleks Efros

Line
with bad attribute {qwe} will be
deleted

Qator o’chdi

Escaped: \{qwe} and +++{qwe}+++

Qochildi: {qwe} va {qwe}

Sarlavhalar

Level 1
-------
Text.

Level 2
~~~~~~~
Text.

Level 3
^^^^^^^
Text.

Level 4
+++++++
Text.

1-Bosqich

Tekst.

2-Bosqich

Tekst.

3-Bosqich

Tekst.

4-Bosqich

Tekst.

== Level 1
Text.

=== Level 2
Text.

==== Level 3
Text.

===== Level 4
Text.

1-Bosqich

Tekst.

2-Bosqich

Tekst.

3-Bosqich

Tekst.

4-Bosqich

Tekst.

Paragraflar

.Optional Title

Usual
paragraph.
Ixtiyoriy sarlavha

Oddiy paragraf.

.Optional Title

 Literal paragraph.
  Must be indented.
Ixtiyoriy sarlavha
Literal paragraf.
 Indentsiya qilinishi kerak.
.Optional Title

[source,perl]
die 'connect: '.$dbh->errstr;

Not a code in next paragraph.
Ixtiyoriy sarlavha
die 'connect: '.$dbh->errstr;

Keyingi paragrafdagi kod emas.

.Optional Title
NOTE: This is an example
      single-paragraph note.
Note
Ixtiyoriy sarlavha
Bu bir-paragrafli eslatma misoli
.Optional Title
[NOTE]
This is an example
single-paragraph note.
Note
Ixtiyoriy sarlavha
Bu bir-paragrafli eslatma misoli.
TIP: Tip.
Tip Maslahat.
IMPORTANT: Important.
Important Muhim.
WARNING: Warning.
Warning Ogohlantirish.
CAUTION: Caution.
Caution Etibor bering.

Blocks

.Optional Title
----
*Listing* Block

Use: code or file listings
----
Ixtiyoriy sarlavha
*Ro'yxat* Bloki

Ishlat: kod yoki fayl ro’yxat
.Optional Title
[source,perl]
----
# *Source* block
# Use: highlight code listings
# (require `source-highlight` or `pygmentize`)
use DBI;
my $dbh = DBI->connect('...',$u,$p)
    or die "connect: $dbh->errstr";
----
Ixtiyoriy sarlavha
# *Manba* bloki
# Ishlat: kod ro'yxatini ta'kidlash
# (talab qilinadi `manba-ta'kidlash` yoki `pigmentiz`)
use DBI;
my $dbh = DBI->connect('...',$u,$p)
    or die "connect: $dbh->errstr";
.Optional Title
****
*Sidebar* Block

Use: sidebar notes :)
****
Ixtiyoriy sarlavha

Yon tomon bloki

Ishlat: yon tomon eslatmalari :)

.Optional Title
==========================
*Example* Block

Use: examples :)

Default caption "Example:"
can be changed using

 [caption="Custom: "]

before example block.
==========================
Misol 1. Ixtiyoriy sarlavha

Blok misoli

Ishlat: misollar :)

Standart sarlavha “Misol:” o’zgartirish mumkin

[caption="Maxsus: "]

Blok misolidan oldin.

.Optional Title
[NOTE]
===============================
*NOTE* Block

Use: multi-paragraph notes.
===============================
Note
Ixtiyoriy sarlavha

ESLATMA bloki

Foydalanish: ko'p-paragrafli eslatma.

////
*Comment* block

Use: hide comments
////
++++
*Passthrough* Block
<p>
Use: backend-specific markup like
<table border="1">
<tr><td>1<td>2
</table>
++++
*Passthrough* bloki

Ishlat: orqa qism-maxsus kabi

12
 .Optional Title
 ....
 *Literal* Block

 Use: workaround when literal
 paragraph (indented) like
   1. First.
   2. Second.
 incorrectly processed as list.
 ....
Ixtiyoriy sarlavha
*Literal* Bloki

Ishlat: literal bo’lganda ishlatish
paragrafga o’xshab
  1. Birinchi.
  2. Ikkinchi.
ro’yxat bo’lib noto’g’ri ishlangan.
.Optional Title
[quote, cite author, cite source]
____
*Quote* Block

Use: cite somebody
____
Ixtiyoriy sarlavha

Iqtibos bloki

Ishlat: kimnidir keltirish

Manbani keltirish
— Muallifni keltirish

Text

forced +
line break

Majburiy
Satr bo’lish

normal, _italic_, *bold*, +mono+.

``double quoted'', `single quoted'.

normal, ^super^, ~sub~.

normal, kursiv, qalin, mono.

“Ikkitalik qo’shtirnoq”, ‘bittalik qo’shtirnoq’.

normal, super, sub.

Command: `ls -al`

+mono *bold*+

`passthru *bold*`

Command: ls -al

mono bold

passthru *bold*

Path: '/some/filez.txt', '.b'

Path: /some/filez.txt, .b

[red]#red text# [yellow-background]#on yellow#
[big]#large# [red yellow-background big]*all bold*

Qizil tekst sariq katta hammasi qalinda

Chars: n__i__**b**++m++[red]##r##

Chars: nibmr

// Comment
(C) (R) (TM) -- ... -> <- => <= &#182;

© ® ™ — … → ← ⇒ ⇐ ¶

''''

Escaped:
\_italic_, +++_italic_+++,
t\__e__st, +++t__e__st+++,
+++<b>bold</b>+++, $$<b>normal</b>$$
\&#182;
\`not single quoted'
\`\`not double quoted''

Qochildi: _kursiv_, _kursiv_, t__e__st, t__e__st, qalin, <b>normal</b> &#182; `bittalik qo’shtirnoq emas' ``Ikkitalik qo’shtirnoq emas''

Agar sayt manzilida/yo’lida bo’sh probel ishlatish kerak bo’lib qolsa, %20 ishlatish kerak.

[[anchor-1]]
Paragraph or block 1.

anchor:anchor-2[]
Paragraph or block 2.

<<anchor-1>>,
<<anchor-1,First anchor>>,
xref:anchor-2[],
xref:anchor-2[Second anchor].

Paragraf yoki blok 1.

Paragraf yoki blok 2.

link:asciidoc[This document]
link:asciidoc.html[]
link:/index.html[This site root]
http://google.com
http://google.com[Google Search]
mailto:root@localhost[email admin]

Birinchi bosh sahifa images/icons/home.png , ikkinchi bosh sahifa Alt text .

images/icons/home.png
Chizma 1. Rasm bloki
Alt text
Kichik rasm to’liq rasmga bog’langan

My screenshot

This is example how files
can be included.
It's commented because
there no such files. :)

// include::footer.txt[]

// [source,perl]
// ----
// include::script.pl[]
// ----

Bu misol qanday qilib fayl qo’yilishini ko’rsatadi. Bu izohlangan chunki u yerda ko’p fayllar yo’q :)

Ro'yxat

.Bulleted
* bullet
* bullet
  - bullet
  - bullet
* bullet
** bullet
** bullet
*** bullet
*** bullet
**** bullet
**** bullet
***** bullet
***** bullet
**** bullet
*** bullet
** bullet
* bullet
Belgilangan
  • o'q

  • o'q

    • o'q

    • o'q

  • o'q

    • o'q

    • o'q

      • o'q

      • o'q

        • o'q

        • o'q

          • o'q

          • o'q

        • o'q

      • o'q

    • o'q

  • o'q

.Bulleted 2
- bullet
  * bullet
Belgilangan 2
  • o'q

    • o'q

.Ordered
. number
. number
  .. letter
  .. letter
. number
.. loweralpha
.. loweralpha
... lowerroman
... lowerroman
.... upperalpha
.... upperalpha
..... upperroman
..... upperroman
.... upperalpha
... lowerroman
.. loweralpha
. number
Tartiblangan
  1. Son

  2. Son

    1. Xarf

    2. Xarf

  3. Son

    1. kichikalfa

    2. kichikalfa

      1. kichikroman

      2. kichikroman

        1. kattaalfa

        2. kattaalfa

          1. kattaroman

          2. kattaroman

        3. kattaalfa

      3. kichikroman

    3. kichikalfa

  4. son

.Ordered 2
a. letter
b. letter
   .. letter2
   .. letter2
       .  number
       .  number
           1. number2
           2. number2
           3. number2
           4. number2
       .  number
   .. letter2
c. letter
Belgilangan 2
  1. xarf

  2. xarf

    1. xarf2

    2. xarf2

      1. son

      2. son

        1. son2

        2. son2

        3. son2

        4. son2

      3. son

    3. xarf2

  3. xarf

.Labeled
Term 1::
    Definition 1
Term 2::
    Definition 2
    Term 2.1;;
        Definition 2.1
    Term 2.2;;
        Definition 2.2
Term 3::
    Definition 3
Term 4:: Definition 4
Term 4.1::: Definition 4.1
Term 4.2::: Definition 4.2
Term 4.2.1:::: Definition 4.2.1
Term 4.2.2:::: Definition 4.2.2
Term 4.3::: Definition 4.3
Term 5:: Definition 5
Belgilangan
Muddat 1

Ta’rif 1

Muddat 2

Ta’rif 2

Muddat 2.1

Ta’rif 2.1

Muddat 2.2

Ta’rif 2.2

Muddat 3

Ta’rif 3

Muddat 4

Ta’rif 4

Muddat 4.1

Ta’rif 4.1

Muddat 4.2

Ta’rif 4.2

Muddat 4.2.1

Ta’rif 4.2.1

Muddat 4.2.2

Ta’rif 4.2.2

Muddat 4.3

Ta’rif 4.3

Muddat 5

Ta’rif 5

.Labeled 2
Term 1;;
    Definition 1
    Term 1.1::
        Definition 1.1
Belgilangan 2
Muddat 1

Ta’rif 1

Muddat 1.1

Ta’rif 1.1

[horizontal]
.Labeled horizontal
Term 1:: Definition 1
Term 2:: Definition 2
[horizontal]
    Term 2.1;;
        Definition 2.1
    Term 2.2;;
        Definition 2.2
Term 3::
    Definition 3
Term 4:: Definition 4
[horizontal]
Term 4.1::: Definition 4.1
Term 4.2::: Definition 4.2
[horizontal]
Term 4.2.1:::: Definition 4.2.1
Term 4.2.2:::: Definition 4.2.2
Term 4.3::: Definition 4.3
Term 5:: Definition 5
Gorizontal belgilangan
Muddat 1

Ta’rif 1

Muddat 2

Ta’rif 2

Muddat 2.1

Ta’rif 2.1

Muddat 2.2

Ta’rif 2.2

Muddat 3

Ta’rif 3

Muddat 4

Ta’rif 4

Muddat 4.1

Ta’rif 4.1

Muddat 4.2

Ta’rif 4.2

Muddat 4.2.1

Ta’rif 4.2.1

Muddat 4.2.2

Ta’rif 4.2.2

Muddat 4.3

Ta’rif 4.3

Muddat 5

Ta’rif 5

[qanda]
.Q&A
Question 1::
    Answer 1
Question 2:: Answer 2
S&J
  1. Savol 1

    Javob 1

  2. Savol 2

    Javob 2

.Indent is optional
- bullet
    * another bullet
        1. number
        .  again number
            a. letter
            .. again letter

.. letter
. number

* bullet
- bullet
Chiziq ixtiyoriy
  • O’q

    • boshqa o’q

      1. son

        1. yana son

          1. xarf

            1. yana xarf

            2. xarf

        2. son

    • o'q'

  • o'q

.Break two lists
. number
. number

Independent paragraph break list.

. number

.Header break list too
. number

--
. List block define list boundary too
. number
. number
--

--
. number
. number
--
Ikki ro’yxatni bo’lish
  1. son

  2. son

Mustaqil xatboshi ro'yxati.

  1. son

Sarlavha ham bo’linadi
  1. son

  1. Ro'yxat bloklari ham ro'yxat chegarasini belgilaydi

  2. son

  3. son

  1. son

  2. son

.Continuation
- bullet
continuation
. number
  continuation
* bullet

  literal continuation

.. letter
+
Non-literal continuation.
+
----
any block can be

included in list
----
+
Last continuation.
Davomi
  • o'q davomi

    1. son davomi

      • o'q

        literal davomi
        1. xarf

          No-Literal davomi.

          har qanday blok ro’yxatga qo’shilishi mumkin

          Oxirgining davomi.

.List block allow sublist inclusion
- bullet
  * bullet
+
--
    - bullet
      * bullet
--
  * bullet
- bullet
  . number
    .. letter
+
--
      . number
        .. letter
--
    .. letter
  . number
Ro’yxat bloklari kichik ro’yxat qo’shishni ta’minlaydi
  • o'q

    • o'q

      • o'q

      • o'q

    • o'q

  • o'q

    1. son

      1. xarf

        1. son

        1. xarf

      2. xarf

    2. son

Jadvallar

Siz jadvalni CSV fayl bilan include:: makrolar orqali jadval ichida to’ldirishingiz mumkin.

.An example table
[options="header,footer"]
|=======================
|Col 1|Col 2      |Col 3
|1    |Item 1     |a
|2    |Item 2     |b
|3    |Item 3     |c
|6    |Three items|d
|=======================
Jadval 1. Jadval uchun misol
Ustun 1 Ustun 2 Ustun 3

6

Uchta buyum

d

1

Buyum 1

a

2

Buyum 2

b

3

Buyum 3

c

.CSV data, 15% each column
[format="csv",width="60%",cols="4"]
[frame="topbot",grid="none"]
|======
1,2,3,4
a,b,c,d
A,B,C,D
|======
Jadval 2. CSV data, 15% har bir ustun

1

2

3

4

a

b

c

d

A

B

C

D

[grid="rows",format="csv"]
[options="header",cols="^,<,<s,<,>m"]
|===========================
ID,FName,LName,Address,Phone
1,Vasya,Pupkin,London,+123
2,X,Y,"A,B",45678
|===========================
ID FName LName Address Phone

1

Vasya

Pupkin

London

+123

2

X

Y

A,B

45678

.Multiline cells, row/col span
|====
|Date |Duration |Avg HR |Notes

|22-Aug-08 .2+^.^|10:24 | 157 |
Worked out MSHR (max sustainable
heart rate) by going hard
for this interval.

|22-Aug-08 | 152 |
Back-to-back with previous interval.

|24-Aug-08 3+^|none

|====
Jadval 3. Ko'p qatorlik kataklar, qator/ustun span

Kun

Davomiylik

O'rtacha HR

Eslatmalar

22-Aug-08

10:24

157

Bu orqali qiyinchilik bilan MSHR (maksimal barqaror yurak kursi) ishlab chiqilgan.

22-Aug-08

152

Orqaga qarab o'tgan vaqt oralig'ida.

24-Aug-08

yo’q