Commit 30af4a54 authored by heywon.choi's avatar heywon.choi

add samples

parent 7fc0eaca
= Blocks Sample
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the blocks sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
:source-highlighter: pygments
:pygments-style: manni
:pygments-linenums-mode: inline
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the blocks.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
.Structural containers in AsciiDoc
[,cols="15%,32%,18%,35%",options="header",]
|===
|Type |Description |Minimum delimiter |Example
|comment |출력에 표시되지 않는 개인 메모 |//// |
////
This is a comment.
////
|<<_example>> |예시 내용을 지정하거나 훈계 블록을 정의합니다. |==== |
====
This is an example.
====
|<<_listing>> |소스 코드 또는 키보드 입력이 입력된 대로 표시됩니다. |---- |
----
This is a listing.
----
|literal |출력 텍스트는 입력한 대로 정확하게 표시됩니다. |.... |
....
This is a literal.
....
|<<_open>> |통과 또는 테이블 블록을 제외한 모든 블록으로 작동할 수 있는 익명 블록 |\-- |
\--
This is an open.
\--
|<<_sidebar>> |문서의 흐름 외부에 표시되는 텍스트와 콘텐츠 |pass:[****] |
pass:[****]
This is a sidebar.
pass:[****]
|xref:Tables_sample.adoc#tables_sample[Table] |표 형식 콘텐츠를 표시합니다. |\|===
,===
:===
!=== |
|<<_pass>> |출력으로 직접 전송되는 처리되지 않은 콘텐츠 |pass:[++++] |
pass:[++++]
This is a pass.
pass:[++++]
|quote |선택적 저작자 표시가 있는 견적 |pass:[____] |
pass:[____]
This is a quote.
pass:[____]
|===
== Example
* 예제 블록
+
.Optional title
[example]
This is an example of an example block.
+
.예제 제목
====
The book hit the floor with a *thud*.
He could hear doves *cooing* in the pine trees`' branches.
====
* 축소
+
[%collapsible]
====
This content is only revealed when the user clicks the block title.
====
== Listing
=== 기본 코드 블록
----
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
----
=== 소스 코드 블록
[source]
----
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
----
[source,console]
$ asciidoctor -v
[source,c]
----
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
----
* 축소
+
.Show stacktrace
[%collapsible]
====
[source]
----
Error: Content repository not found (url: https://git.example.org/repo.git)
at transformGitCloneError
at git.clone.then.then.catch
Caused by: HttpError: HTTP Error: 401 HTTP Basic: Access Denied
at GitCredentialManagerStore.rejected
at fill.then
----
====
* 설명선
** 기본
+
[source,ruby]
----
require 'sinatra' <1>
get '/hi' do <2> <3>
"Hello World!"
end
----
<1> Library import
<2> URL mapping
<3> Response block
** 주석 뒤
+
[source]
----
line of code // <1>
line of code # <2>
line of code ;; <3>
line of code <!--4-->
----
<1> A callout behind a line comment for C-style languages.
<2> A callout behind a line comment for Ruby, Python, Perl, etc.
<3> A callout behind a line comment for Clojure.
<4> A callout behind a line comment for XML or SGML languages like HTML.
** 사용자 지정
+
[source,erlang,line-comment=%]
----
-module(hello_world).
-compile(export_all).
hello() ->
io:format("hello world~n"). % <1>
----
<1> A callout behind a custom line comment prefix.
** 줄 주석
+
[source,asciidoc,line-comment=]
----
-- <1>
A paragraph in an open block.
--
----
<1> An open block delimiter.
* 추가 속성
** 라인 번호 추가
+
[source,ruby,linenums]
----
ORDERED_LIST_KEYWORDS = {
'loweralpha' => 'a',
'lowerroman' => 'i',
'upperalpha' => 'A',
'upperroman' => 'I'
#'lowergreek' => 'a'
#'arabic' => '1'
#'decimal' => '1'
}
----
** 특정 라인 강조
+
[source,shell,highlight="3,4"]
----
#!/bin/sh
fail () {
echo
echo "$*"
echo
exit 1
} >&2
JAVACMD=java
which java >/dev/null 2>&1 || fail "ERROR: no 'java' command could be found in your PATH."
exec "$JAVACMD" "$@"
----
== Open
* The header in AsciiDoc must start with a document title.
+
--
Here's an example of a document title:
====
= Document Title
====
NOTE: The header is optional.
--
== Sidebar
사이드바에는 인용문, 방정식 및 이미지와 같은 모든 유형의 콘텐츠가 포함될 수 있습니다.
.Optional Title
****
Sidebars are used to visually separate auxiliary bits of content that supplement the main text.
TIP: They can contain any type of content.
.Source code block in a sidebar
[source,js]
----
const { expect, expectCalledWith, heredoc } = require('../test/test-utils')
----
////
+ 개별 제목은 섹션 제목과 유사한 방식으로 선언되고 스타일 지정됨
- 섹션 계층 구조의 일부가 아닙니다.
- 다른 블록에 중첩 될 수 있습니다.
- 자식 블록을 가질 수 없습니다.
- 목차에 포함되어 있지 않습니다.
////
[discrete]
== Discrete Heading
Discrete headings are useful for making headings inside of other blocks, like this sidebar.
Discrete headings can be used where sections are not permitted.
****
== Pass
--
++++
image:tiger.png[]
link:Tables_sample.adoc#tables_sample[Table]
++++
* 인라인 (pass:[+++])
+
Content passed directly to the output followed by normal content.
"/resources/+++**+++"
--
\ No newline at end of file
= Image Sample
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the image sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the image.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
= Links Sample
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the links sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the links.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
== 자동 링크
* http
* https
* ftp
* irc
* mailto
====
The homepage for the Asciidoctor Project is https://www.asciidoctor.org.
Email us at hello@example.com to say hello.
// 자동 링크 피하기
Once launched, the site will be available at \https://example.org.
If you cannot access the site, email \help@example.org for assistance.
====
=== 링크 속성
* 빈 창을 대상으로 지정하도록 링크 텍스트 끝에 캐럿(^) 삽입 및 role 적용
** Chat with other AsciiDoc users in the https://chat.asciidoc.org[*project chat*^,role=green].
* 링크 텍스트에 쉼표나 등호가 포함된 경우 큰따옴표로 묶어준다.
** https://example.org["Google, DuckDuckGo, Ecosia"^,role=teal]
** https://example.org["1=2 posits the problem of inequality"^]
* URL에 밑줄(_) 또는 캐럿(^)과 같은 문자가 포함된 경우 ++ 로 감싼다.
** link:+++https://asciidoctor.org/now_this__link_works.html+++[문제 URL^]
* 링크를 클릭하면 이메일 클라이언트가 제목 줄에 "Subscribe me"를 입력한다.
** mailto:join@discuss.example.org[Subscribe,Subscribe me]
** mailto:join@discuss.example.org[,Subscribe me]
== 상호 참조
=== 자동 앵커
AsciiDoc 프로세서는 모든 섹션 및 개별 제목에 대한 앵커를 자동으로 생성.
.자동 생성 규칙
* 인라인 서식 적용(제목 대체 순서).
* 모든 문자는 소문자로 변환
* 공백, 하이픈 및 마침표는 idseparator 특성의 값으로 대체(기본값)_
* 반복되는 구분 기호 문자 압축
* 필요한 경우 ID가 문서 내에서 고유할 때까지 시퀀스 번호 추가
====
== Auto Section
=> _auto_section
== Wiley & Sons, Inc.
=> _wiley_sons_inc
====
=== 수동 앵커
* 첫 번째 문자는 문자, 콜론 또는 밑줄
* 선택적 다음 문자는 문자, 콜론, 밑줄, 하이픈, 마침표 또는 숫자
* ID에 공백 문자를 사용 불가
* 가능하면 소문자를 사용
====
[#manual_id]
Manually set id
====
=== 내부 상호 참조
* 대상 섹션의 ID를 사용한 상호 참조
The section <<_자동_앵커,Auto>> describes how automatic anchors work.
The section <<manual_id,Manual>> describes how manual anchors work.
=== 문서간 상호 참조
문서 간 상호 참조에 대한 링크 텍스트는 (현재) 필수
* Refer to xref:Section_sample.adoc#section_A[Section A] for more information.
=== 각주
* 문장 부호 바로 뒤에 각주 매크로를 삽입합니다. 각주 매크로는 단일 콜론(:)만 사용
* 대괄호([]) 안에 각주의 내용 입력. 멀티라인 가능
* 각주를 재사용하려는 경우 대상 위치에 고유 ID 지정
* 기존 각주를 참조하려면 대상 슬롯에 각주의 ID만 지정하고 빈대괄호 사용
====
The hail-and-rainbow protocol can be initiated at five levels:
. doublefootnote:[The double hail-and-rainbow level makes my toes tingle.]
. tertiary
. supernumerary
A bold statement!footnote:disclaimer[Opinions are my own.]
Another outrageous statement.footnote:disclaimer[]
====
= List Sample
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the list sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the list.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
== 순서가 있는 목록
.목록의 제목
. Protons
. Electrons
. Neutrons
[]
.새 목록
. Step 1
. Step 2
.. Step 2a
.. Step 2b
. Step 3
== 순서가 없는 목록
.제목
* Level 1 list item
** Level 2 list item
*** Level 3 list item
**** Level 4 list item
***** Level 5 list item
****** etc.
* Level 1 list item
== 체크리스트
=== 일반
* [x] checked
* [ ] not checked
* normal list item
=== 대화형 확인란 (삭제)
[%interactive]
* [x] checked
* [ ] not checked
* normal list item
== 설명 목록
=== 기본
====
[horizontal]
RAM:: Temporarily stores information the CPU uses during operation.
Keyboard:: Used to enter text or control items on the screen.
====
=== 혼합
====
Dairy::
* Milk
* Eggs
Bakery::
* Bread
====
=== 중첩
====
Operating Systems::
Linux:::
. Fedora
* Desktop
. Ubuntu
* Desktop
* Server
BSD:::
. FreeBSD
. NetBSD
Cloud Providers::
PaaS:::
. OpenShift
. CloudBees
IaaS:::
. Amazon EC2
. Rackspace
====
= Document Title: Section sample: Subtitle
Gildong Hong <email1@bwg.com>; Kyun Heo <email2@bwg.com>
:description: The document's description. This document is about the section sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
include::./attributes/highlighter.adoc[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the section.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
.About {author_2}
Mr. {lastname_2} is the author.
// The default start value of a counter is 1.
:seq1: {counter:seq1}
== Section {seq1}
The sequence in this section is {seq1}.
=== Level 2 Section Title
Contents
==== Level 3 Section Title
Contents
===== Level 4 Section Title
Contents
====== Level 5 Section Title
Contents
====== Level 5 Section Title
Contents
:seq1: {counter:seq1}
== Section {seq1}
The sequence in this section is {seq1}.
// To create a character sequence.
:seq_A: {counter:seq_A:A}
== Section {seq_A}
The sequence in this section is {seq_A}.
// 대상 섹션의 ID를 사용한 상호 참조
If you want to see <<_section_1, Section 1>>
:seq_A: {counter:seq_A}
== Section {seq_A}
The sequence in this section is {seq_A}.
. Linux
* Fedora
* Ubuntu
* Slackware
. BSD
* FreeBSD
* NetBSD
= Table Sample
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the table sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the table.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
== 기본
[cols="1,1"]
|===
|Cell in column 1, header row |Cell in column 2, header row
|Cell in column 1, row 1 |Cell in column 2, row 1
|Cell in column 1, row 2 |Cell in column 2, row 2
|Cell in column 1, row 3 |Cell in column 2, row 3
|===
[%header%footer%autowidth]
|===
|Header A |Header B
|Footer A |Footer B
|===
\ No newline at end of file
= Text Formatting
Gildong Hong <email1@bwg.com>
:description: The document's description. This document is about the table sample.
include::./attributes/common_attrs.adoc[]
include::./attributes/dir_attrs.adoc[]
include::./styles/userinput.css[]
[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the text formatting.
--
.About {author}
This is a basic AsciiDoc document by {author}.
You can contact {firstname} at {email}.
== 굵게 (*)
A bold *word*, and a bold *phrase of text*.
Bold c**hara**cter**s** within a word.
== 기울임체 (_)
An italic _word_, and an italic _phrase of text_.
Italic c__hara__cter__s__ within a word.
== 고정 폭 (`)
"`Wait!`" Indigo plucked a small vial from her desk's top drawer
and held it toward us.
The vial's label read: `E=mc^2^`; the `E` represents _energy_,
but also pure _genius!_
== 강조 표시 (#)
Mark my words, #automation is essential#.
== 스타일 구문 ([.]#)
Do werewolves believe in [.small]#small print#?
[.big]##O##nce upon an infinite loop.
=== Text with custom role
This sentence contains [.userinput]*bold inline content* that's assigned a role.
=> HTML:
[source,html]
----
<p>This sentence contains <strong class="userinput">bold inline content</strong> that&#8217;s assigned a role.</p>
----
** See the link:Blocks_sample.adoc#blocks_sample[Blocks sample] for more details about the block usage.
** See the link:Links_sample.adoc#links_sample[Links sample] for more details about the link usage.
== 아래 첨자 (~), 위 첨자 (^)
"`Well the H~2~O formula written on their whiteboard could be part
of a shopping list, but I don't think the local bodega sells
E=mc^2^,`" Lazarus replied.
== 밑줄
The text +++<u>underline me</u>+++ is underlined.
== 권고 레이블
* 레이블은 대문자여야 함.
* 단락일 경우
** 레이블 바로 뒤에 콜론(:)이 온다.
** 단락의 첫 번째 줄을 레이블에서 한 칸으로 구분
* 블록일 경우
** 속성 목록([ ])에서 레이블을 설정
** 일반적으로 예제 블록(====)에 설정
* 종류
. {blank}
+
NOTE: 단락
note1
note2
. {blank}
+
[TIP]
.tips
====
* 블록
* tip1
* tip2
====
. {blank}
+
IMPORTANT: important
. {blank}
+
CAUTION: caution
. {blank}
+
WARNING: warning
////
+ "#": ID
- 첫 번째 문자는 문자, 콜론 또는 밑줄
- 선택적 다음 문자는 문자, 콜론, 밑줄, 하이픈, 마침표 또는 숫자
- ID에 공백 문자를 사용 불가
- 가능하면 소문자를 사용
+ ".": Role
- HTML의 CSS 클래스 이름으로 변환됨
- 단락 정렬
left, center, right 또는 justify
+ "%": Option
+ 속성 순서는 무관하나 id-role-option 순으로 배치
////
[#rules.text-center%incremental]
// Toggle section numbers on
:sectnums: all
// You can increase or reduce the section level limit
:sectnumlevels: 5
// Line breaks preserved throughout the document
:hardbreaks-option:
// Hide the scheme (e.g., https://)
:hide-uri-scheme:
// Enable font-based icons
:icons: font
////
+ Enable the autogenerated a table of contents(TOC)
- auto (default), left, right, preamble, macro
+ The table of contents is inserted directly below the document title, author, and revision lines when the toc attribute is set and its value is left empty or set to auto.
////
:toc: left
:toclevels: 5
\ No newline at end of file
:imagesdir: ./images
:iconsdir: ./icons
:stylesdir: ./styles
:scriptsdir: ./scripts
\ No newline at end of file
:source-highlighter: pygments
:pygments-style: manni
:pygments-linenums-mode: inline
\ No newline at end of file
.userinput {
font-family: monospace;
font-size: 100.1em;
line-height: calc(1 / 1.1);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment