Jump to content

Help:Lists

This is a fully translated help. Click here for more information.
From DawoumWiki, the free Mathematics self-learning

이 페이지는 미디어위키에서 목록을 생성하는 것을 다룹니다.

List basics

미디어위키는 목록의 세 가지 유형: 순서화된 목록(ordered lists), 비-순서화된 목록(unordered lists), 및 설명(description) 또는 정의(definition) 목록을 제공합니다. 다음 섹션에서, 순서화된 목록이 예제로 사용됩니다. 비-순서화된 목록은 대응하는 결과를 제공할 것입니다:

위키텍스트 랜더링
* Lists are easy to do:
** start every line
* with a star
** more stars mean
*** deeper levels
  • Lists are easy to do:
    • start every line
  • with a star
    • more stars mean
      • deeper levels
* A newline
* in a list  
marks the end of the list. 
Of course
* you can
* start again.
  • A newline
  • in a list

marks the end of the list. Of course

  • you can
  • start again.
# Numbered lists are good
## very organized
## easy to follow
  1. Numbered lists are good
    1. very organized
    2. easy to follow
* You can also
** break lines
** like this
  • You can also
    • break lines
    • like this
; Description or definition lists
; item : definition
; semicolon plus term
: colon plus definition
Definition lists
item
definition
semicolon plus term
colon plus definition
; Mixed definition lists
; item 1 : definition
:; sub-item 1 plus term
:: two colons plus definition
:; sub-item 2 : colon plus definition
; item 2 
: back to the main list
Mixed definition lists
item 1
definition
sub-item 1 plus term
two colons plus definition
sub-item 2
colon plus definition
item 2
back to the main list
* Or create mixed lists
*# and nest them
*#* like this
*#*; definitions
*#*: work:
*#*; apple
*#*; banana
*#*: fruits
  • Or create mixed lists
    1. and nest them
      • like this
        definitions
        work:
        apple
        banana
        fruits

Paragraphs in lists

단순성을 위해, 위키 마크업에서 목록 항목은 단락보다 더 길 수 없습니다. 다음 빈 줄은 목록을 끝내고 정렬된 목록의 카운터를 재설정합니다. 비-순서화된 목록 항목을 분리하는 것은 보통 눈에 띄는 효과를 가지지 않습니다.

단락은 HTML 태그를 사용함으로써 목록에서 강제될 수 있습니다. 두 줄 바꿈 기호, <br /><br />는 원했던 효과를 생성할 것입니다. 따라서 첫 번째 단락을 제외하고 모두 <p>...</p>로 묶일 것입니다.

Continuing a list item after a sub-item

HTML에서, 목록 항목은 반드시 인접하지 않은 여러 하위목록을 포함할 수 있습니다; 따라서 첫 번째 하위 목록 앞뿐만 아니라 하위 목록 사이 및 마지막 하위 목록 뒤에 목록 항목의 일부일 수 있습니다. 어쨌던, 위키-구문에서, 하위목록은 페이지의 섹션과 같은 규칙을 따릅니다: 하위목록에 없는 목록 항목의 유일한 가능한 부분은 첫 번째 하위목록 앞에 있습니다.

위키텍스트 코드에서 번호가 지정되지 않은 첫 번째 수준 목록의 경우에서, 이 제한은 목록을 여러 목록으로 분할함으로써 극복될 수 있습니다; 부분 목록 사이의 들여쓰기된 텍스트는 하위목록 뒤에 목록 항목의 일부로 시각적으로 제공될 수 있습니다; 어쨌던, 이것은, CSS에 따라, 각 목록 앞 뒤에 빈 줄을 제공할 수 있으며, 이 경우에서, 균일성을 위해, 모든 각 첫 번째 수준 목록 항목은 별도의 목록으로 만들어질 수 있습니다.

번호가 매겨진 목록은, 소프트웨어에 대해, 하나의 목록이 여러 목록으로 구성될 수 있음을 보여줍니다; 번호가 매겨지지 않은 목록은 1로 다시 시작하는 문제가 적용되지 않는 것을 제외하고는 해당하는 결과를 제공합니다.

<ol>
  <li>list item A1
    <ol>
      <li>list item B1</li>
      <li>list item B2</li>
    </ol>continuing list item A1
  </li>
  <li>list item A2</li>
</ol>
  1. list item A1
    1. list item B1
    2. list item B2
    continuing list item A1
  2. list item A2
vs.
#list item A1
##list item B1
##list item B2
#:continuing list item A1
#list item A2
  1. list item A1
    1. list item B1
    2. list item B2
    continuing list item A1
  2. list item A2

한 단계 더 깊어지고, 하위 목록 항목이 하위-하위목록 뒤에 계속되면, 빈 줄이 더 많이 생깁니다. 어쨌던, 첫 번째 수준 목록의 연속성은 영향을 받지 않습니다:

#list item A1
##list item B1
###list item C1
##:continuing list item B1
##list item B2
#list item A2

다음을 제공합니다:

  1. list item A1
    1. list item B1
      1. list item C1
      continuing list item B1
    2. list item B2
  2. list item A2

역시 m:Template:List demo (backlinks edit)을 참조하십시오.

번호가 매겨진 항목을 둘러싼 내부에 번호가 지정되지 않은 글 머리 기호를 포함할 수 있습니다:

# list item A
#* nested bullet A1
#* nested bullet A2
# continuing list item B
#* nested bullet B1
#* nested bullet B2

다음을 제공합니다:

  1. list item A
    • nested bullet A1
    • nested bullet A2
  2. continuing list item B
    • nested bullet B1
    • nested bullet B2

Changing the list type

목록 유형 (목록 항목 앞에 나타나는 표식 유형)은 list-style-type 속성을 설정함으로써 CSS에서 변경될 수 있습니다:

위키텍스트 렌더링
<ol style="list-style-type:lower-roman">
  <li>About the author</li>
  <li>Foreword to the first edition</li>
  <li>Foreword to the second edition</li>
</ol>
  1. About the author
  2. Foreword to the first edition
  3. Foreword to the second edition
<ol style="list-style-type:lower-alpha">
  <li>About the author</li>
  <li>Foreword to the first edition</li>
  <li>Foreword to the second edition</li>
</ol>
  1. About the author
  2. Foreword to the first edition
  3. Foreword to the second edition

Extra indentation of lists

큰 글꼴의 번호 매겨진 목록에서, 일부 브라우저는 여분의 들여 쓰기가 적용되지 않는 한 (만약 여러 열이 있으면: 각 열에 대해) 두 자릿수 이상을 표시할 수 없습니다. 이것은 CSS로 수행될 수 있습니다:

ol { margin-left: 2cm}

또는 대안적으로, 아래와 같이 수행될 수 있습니다.

위키텍스트 렌더링 비고
:#abc
:#def
:#ghi
 
  1. abc
  2. def
  3. ghi
A list of one or more lines starting with a colon creates a description list without definition terms, and with the items as definition descriptions, hence indented. However, if the colons are in front of the codes "*" or "#" of an unordered or ordered list, the list is treated as one definition description, so the whole list is indented.
<ul>
  <ol>
    <li>abc</li>
    <li>def</li>
    <li>ghi</li>
  </ol>
</ul>
    1. abc
    2. def
    3. ghi
MediaWiki translates an unordered list (ul) without any list items (li) into a div with a style="margin-left: 2em", causing indentation of the contents. This is the most versatile method, as it allows starting with a number other than 1, see below.
<ul>
#abc
#def
#ghi
</ul>
    1. abc
    2. def
    3. ghi
Like above, with the content of the "unordered list without any list items", which itself is an ordered list, expressed with # codes. The HTML produced, and hence the rendering, is the same. This is the recommended method when starting the list at 1.

세 가지 방법 모두 3-자릿수 숫자의 모든 자릿수를 표시한다는 것을 시연하기 위해, 목록 데모를 참조하십시오.

Specifying a starting value

시작하는 값을 지정하는 것은 HTML 구문으로 가능합니다.

<ol start="9">
<li>Amsterdam</li>
<li>Rotterdam</li>
<li>The Hague</li>
</ol>
  1. Amsterdam
  2. Rotterdam
  3. The Hague

또는:

<ol>
<li value="9">Amsterdam</li>
<li value="8">Rotterdam</li>
<li value="7">The Hague</li>
</ol>
  1. Amsterdam
  2. Rotterdam
  3. The Hague

Comparison with a table

자동 번호 매기기를 제공하는 것 외에도, 번호 매겨진 목록은 역시 테이블 구문을 사용하는 것과 비교하여 항목의 컨텐츠를 정렬합니다:

{|
|-
| align=right |  9.|| Amsterdam
|-
| align=right | 10.|| Rotterdam
|-
| align=right | 11.|| The Hague
|}

다음을 제공합니다:

9. Amsterdam
10. Rotterdam
11. The Hague

이 비-자동 번호 지정은 만약 텍스트가 번호를 참조하면 항목의 삽입 또는 삭제가 대응을 방해하지 않는다는 장점이 있습니다.

Multi-column lists

See also Template:Col-begin, Template:Col-break, Template:Col-end.

Multi-column bulleted list

<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
* apple
* carpet
* geography
* mountain
* nowhere
* postage
* ragged
* toast
</div>

다음을 제공합니다:

  • apple
  • carpet
  • geography
  • mountain
  • nowhere
  • postage
  • ragged
  • toast
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* apple
* carpet
* geography
* mountain
* nowhere
* postage
* ragged
* toast
</div>

다음을 제공합니다:

  • apple
  • carpet
  • geography
  • mountain
  • nowhere
  • postage
  • ragged
  • toast

Multi-column numbered list

<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
#apple
#carpet
#geography
#mountain
#nowhere
#postage
#ragged
#toast
</div>

다음을 제공합니다:

  1. apple
  2. carpet
  3. geography
  4. mountain
  5. nowhere
  6. postage
  7. ragged
  8. toast

HTML 구문을 사용하여, 시작 값 아래에 지정됩니다 (첫 번째 열에 대해 위키-구문 또는 HTML-구문은 사용될 수 있습니다).

이전 섹션에서 설명된 여분의 들여 쓰기을 갖는 조합에서:

{| valign="top"
|-
|<ul><ol start="125"><li>a<li>bb<li>ccc</ol></ul>
|<ul><ol start="128"><li>ddd<li>ee<li>f</ol></ul>
|}

다음을 제공합니다:

    1. a
    2. bb
    3. ccc
    1. ddd
    2. ee
    3. f

m:Template:multi-column numbered list (backlinks edit)를 사용하여, 시작하는 값의 계산은 자동화될 수 있고, 마지막을 제외한 각 열에서 오직 첫 번째 시작 값과 항목 수가 지정되어야 합니다. 열에 항목을 추가하거나 열에서 항목을 제거하려면 모든 후속 열의 시작하는 번호를 변경하는 대신, 오직 하나의, 해당 열에서 항목의 숫자를 조정하면 됩니다.

{{Multi-column numbered list|125|a<li>bb<li>ccc|3|<li>ddd<li>ee<li>f}}

다음을 제공합니다:

    1. a
    2. bb
    3. ccc
    1. ddd
    2. ee
    3. f
{{Multi-column numbered list|lst=lower-alpha|125|a<li>bb<li>ccc|3|<li>ddd<li>ee|2|<li>f}}

다음을 제공합니다:

    1. a
    2. bb
    3. ccc
    1. ddd
    2. ee
    1. f
{{Multi-column numbered list|lst=lower-roman|125|a<li>bb<li>ccc|3|<li>ddd<li>ee|2|<li>f}}

다음을 제공합니다:

    1. a
    2. bb
    3. ccc
    1. ddd
    2. ee
    1. f
{{Multi-column numbered list|lst=disc||a<li>bb<li>ccc||<li>ddd<li>ee||<li>f}}

다음을 제공합니다:

    1. a
    2. bb
    3. ccc
    <ol start="Expression error: Missing operand for +." style="list-style-type:disc">
  • ddd
  • ee

Streamlined style or horizontal style

다음과 같은 매우 기본적인 형식을 사용하여 짧은 목록을 표시할 수도 있습니다:

''Title of list:'' example 1, example 2, example 3

다음을 제공합니다:

Title of list: example 1, example 2, example 3

이 스타일은 페이지에서 더 적은 공간을 필요로 하고, 목록에 항목이 적고 쉽게 읽을 수 있고, 직접 편집 지점이 필요하지 않으면 선호됩니다. 목록 항목은 고유 명사가 아닌 한 소문자로 시작해야 합니다.

Tables

일-열 테이블은 목록과 매우 유사하지만, 정렬을 허용합니다. 만약 위키텍스트 자체가 이미 같은 정렬키로 정렬되었으면, 이 이점이 적용되지 않습니다. 다중-열 테이블은 임의의 열을 정렬하는 것을 허용합니다.

역시 테이블을 사용할 때를 참조하십시오.

Changing unordered lists to ordered ones

CSS와 함께

ul { list-style: decimal }

순서가 없는 목록은 순서가 있는 목록으로 변경됩니다. 이것은 HTML 소스 코드에서 모든 ul-list에 적용됩니다 (CSS 선택기가 이것을 제한하지 않는 한):

  • 그것들은 *와 함께 생성됩니다
  • 그것들은 위키텍스트에서 <ul>와 함께 생성됩니다
  • 그것들은 시스템에 의해 생성됩니다

다른 페이지와 마찬가지로, 각 특수 페이지는 페이지 이름을 기반으로 하는 클래스가 있으므로, 목록을 정렬해야 하는지 여부를 각 유형에 대해 별도로 지정할 수 있습니다. User contributionsWhat links here을 참조하십시오.

어쨌던, 클래스 이름은 역사가 보여지는 페이지를 기반으로 하기 때문에, 모든 페이지 역사 목록을 정렬하는 것은 가능해 보이지 않습니다 (모든 목록을 정렬하지 않는 한).

See also