= 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[]
include::../attributes/common_css.adoc[]

[abstract]
.문서개요
--
This document has a header that specifies the {doctitle}.
This document is about the table.
--

== 기본
[cols="1a"]
|===
....
.테이블 제목
[cols=""]
\|===
\|헤더1열 \|헤더2열

\|1행1열
\|1행2열

\|2행1열
\|2행2열
\|===
....
|===

* 결과
+
.테이블 제목
[cols=""]
|===
|헤더1열 |헤더2열

|1행 1열
|1행 2열

|2행 1열
|2행 2열
|===


== 열
=== 열 너비
[cols="1,9a"]
|===
|[cols="1,1,1,1"]
\|=== 
|
* 새 줄에서 속성 목록을 만듭니다. 열 속성 [cols=""]
* 열은 쉼표로 구분하고 목록의 각 항목을 열 지정자라고 합니다.
* 열 지정자는 열과 해당 열에 할당된 너비, 맞춤 및 스타일 속성을 나타냅니다.
* 각 열 지정자가 동일한 숫자(이 경우 정수)인 경우 모든 열의 너비가 동일합니다.

|[cols="4*"]
\|===
|
* 동일한 너비, 가로 맞춤, 세로 맞춤 및 내용 스타일을 표의 여러 연속 열에 적용할 땐 **열 승수**를 사용합니다.
* 승수는 정수(n)와 별표(*)로 구성됩니다.
** 정수(n): 테이블에 추가될 연속 열의 수
** 별표(*): 승수 연산자라고 하며 정수 바로 뒤에 배치
** ex) [cols="5,1,1,1"] => [cols="5,3*"]

|[cols="25,25,25,25"]
\|===
|
* 열 너비는 1%와 100%사이의 백분율을 사용하여 할당할 수도 있습니다. 
백분율 기호(%)는 생략합니다.
** ex) [cols="15%,30%,55%"] => [cols="15,30,55"]
|===

=== 열 정렬
정렬 연산자는 열 지정자에 적용되고 cols 속성에 할당됩니다.

.가로 정렬
[cols="^1,1,3a"]
|===
|<
|왼쪽 정렬
(기본)
.3+|
* 가로 정렬 연산자는 세로 정렬 연산자(있는 경우) 앞과 열 너비(있는 경우) 앞에 입력됩니다. 
** [cols="2,##^##1"] : 두번째 열 가로 가운데 정렬
** [cols="##>##.^1,2"] : 첫번째 열 가로 오른쪽 정렬, 세로 가운데 정렬
* 승수(*)를 사용 시 가로 정렬 연산자가 승수 연산자 바로 뒤에 배치됩니다.
** [cols="3*##>##"] : 모든 열 가로 오른쪽 정렬

|>
|오른쪽 정렬

|^
|가운데 정렬
|===

.세로 정렬
[cols="^1,1,3a"]
|===
|.<
|위쪽 정렬
(기본)
.3+|
* 세로 정렬 연산자는 가로 정렬 연산자(있는 경우) 바로 뒤와 열 너비(있는 경우) 앞에 입력됩니다.
** [cols="2,##.^##1"] : 두번째 열 세로 가운데 정렬
** [cols=">##.^##1,2"] : 첫번째 열 가로 오른쪽 정렬, 세로 가운데 정렬
* 승수(*)를 사용 시 세로 정렬 연산자가 승수 연산자 바로 뒤에 배치됩니다.
** [cols="3*##.>##"] : 모든 열 세로 아래쪽 정렬

|.>
|아래쪽 정렬

|.^
|가운데 정렬
|===

=== 열 서식
[cols="2,^2,5"]
|===
|서식 |연산자 |설명

|AsciiDoc
|a
a|* 블록 요소(목록, 구분된 블록 및 블록 매크로) 지원

|Default(기본)
|d
d|단락에서 허용되는 모든 태그(예: 인라인 서식, 인라인 매크로) 지원

|Header
|h
h|머리글 의미와 스타일을 텍스트와 셀 테두리에 적용

|Literal
|l
l|리터럴 블록 안에 있는 것처럼 처리

|Monospace
|m
m|텍스트 고정 폭 글꼴을 사용하여 렌더링

|기울임
|e
e|텍스트 기울임꼴로 표시

|굵게
|s
s|텍스트 굵게 표시
|===

* 서식 연산자는 항상 열의 지정자 또는 승수의 마지막 위치에 배치
** [cols=">1##e##,.^3##s##"]
** [cols="3*.>##m##"]
* 특정 셀에만 서식을 지정할 때는 셀 구분자 세로 막대(|) 앞에 서식 연산자 지정
** a| : 블록 요소 지원
** e| : 텍스트 기울임꼴

== 행
[cols="1a"]
|===
----
.A table with a title
[cols="1,1"]
\|===
\|Cell in column 1, header row \|Cell in column 2, header row <1>
<2>
\|Cell in column 1, row 1 <3>
\|Cell in column 2, row 1 <4>
<5>
\|Cell in column 1, row 2
\|Cell in column 2, row 2
\|===
----
|===


<1> 여는 구분 기호(|===) 바로 뒤의 줄에서 첫 번째 행의 모든 셀을 한 줄에 입력합니다.
+
** 첫 번째 행을 머리글 행으로 처리하지 않으려는 경우 여는 구분 기호(|===) 바로 뒤에 빈 줄을 삽입합니다.
<2> 머리글 행 바로 뒤의 줄은 비워 둡니다.
<3> 새 셀을 만들려면 Shift+|. 세로 막대(|) 뒤에 해당 셀에 표시할 내용을 입력합니다.
<4> 새 줄에서 다른 셀을 입력합니다.
<5> 행은 하나 이상의 빈 줄로 구분됩니다.

* 결과
+
.A table with a title
[cols="1,1"]
|===
|Cell in column 1, header row |Cell in column 2, header row

|Cell in column 1, row 2
|Cell in column 2, row 2

|Cell in column 1, row 3
|Cell in column 2, row 3
|===

== 셀
* 셀 지정자 순서
|===
<factor><span(+) 또는 중복(*)연산자><가로정렬연산자><세로정렬연산자><서식연산자>\|<셀내용>
|===
=== 셀 병합
* 열 병합
열 범위 인수(`n`)와 범위 연산자(`+`)를 입력합니다. 예) 2+
* 행 병합
행 범위 인수(`.n`)와 범위 연산자(`+`)를 입력합니다. 예) .2+

[cols="1a"]
|===
----
[%header,cols="4*"]
\|===
\|Column 1,
 header row 
\|Column 2,
 header row
\|Column 3,
 header row
\|Column 4,
 header row

\|Cell in column 1, row 2
2.3+\|This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of `2.3+`
\|Cell in column 4, row 2

\|Cell in column 1, row 3
\|Cell in column 4, row 3

\|Cell in column 1, row 4
\|Cell in column 4, row 4
\|===
----
|===

* 결과
+
[%header,cols="4*"]
|===
|Column 1,
header row 
|Column 2,
 header row
|Column 3,
 header row
|Column 4,
 header row

|Cell in column 1, row 2
2.3+|This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of `2.3+`
|Cell in column 4, row 2

|Cell in column 1, row 3
|Cell in column 4, row 3

|Cell in column 1, row 4
|Cell in column 4, row 4
|===

=== 셀 정렬
셀의 내용을 가로로 가운데에 맞추려면 셀의 구분 기호(|) 앞에 연산자를 배치합니다.
[cols="1a"]
|===
----
\|===
\|column 1 \|column 2

.2+>.>\|This cell spans two rows(`.2+`), and its content is aligned to the right(`>`) and the bottom(`.>`).
2+^\|This cell spans two columns(`2+`), and its content is horizontally centered(`^`).

2*\|This content is duplicated in two adjacent columns(`2*`). It's content is aligned to the left of the cell by default.
\|===
----
|===

* 결과
+
|===
|column 1 |column 2 |column 3

.2+>.>|This cell spans two rows(`.2+`), and its content is aligned to the right (`>`) and the bottom(`.>`).
2+^|This cell spans two columns(`2+`), and its content is horizontally centered(`^`).

2*|This content is duplicated in two adjacent columns(`2*`). It's content is aligned to the left of the cell by default.
|===



=== 셀 서식
서식 연산자는 항상 셀 지정자의 마지막에 입력됩니다.
셀의 구분 기호(|)와 연산자 사이에 공백을 삽입하지 마세요.
[cols="1a"]
|===
----
\|===
\|Column 1 \|Column 2

.4+^.>s\|This cell spans 3 rows (`3+`).
The content is centered horizontally (`+^+`), vertically aligned to the bottom of the cell (`.>`), and styled as strong (`s`).
e\|This content is italicized (`e`).

m\|This content is rendered using a monospace font (`m`).

s\|This content is bold (`s`).

a\|This cell supports block elements (`a`).
* List item 1
* List item 2
[source,python]
----
import os
print "%s" %(os.uname())
----
\|===
----
|===

* 결과
+
|===
|Column 1 |Column 2

.4+^.>s|This cell spans 3 rows (`3+`).
The content is centered horizontally (`+^+`), vertically aligned to the bottom of the cell (`.>`), and styled as strong (`s`).
e|This content is italicized (`e`).

m|This content is rendered using a monospace font (`m`).

s|This content is bold (`s`).

a|This cell supports block elements (`a`).
* List item 1
* List item 2
[source,python]
----
import os
print "%s" %(os.uname())
----
|===

== 중첩
AsciiDoc 표 서식(a)로 표시된 표 셀은 일반 블록 내용 외에도 중첩 표를 지원합니다.
중첩 표의 기본 셀 구분 기호는 !===, ! 입니다.
[cols="1a"]
|===
----
[cols="1,2a"]
\|===
\| Col 1 \| Col 2

\| Cell 1.1
\| Cell 1.2

\| Cell 2.1
\| Cell 2.2

[cols="2,1"]
!===
! Col1 ! Col2

! C11
! C12
!===

\|===
----
|===

* 결과
+
[cols="1,2a"]
|===
| Col 1 | Col 2

| Cell 1.1
| Cell 1.2

| Cell 2.1
| Cell 2.2

[cols="2,1"]
!===
! Col1 ! Col2

! C11
! C12
!===

|===