Extension:Cite
Cite 확장은 지면에 각주로 참조를 만들 수 있습니다. MediaWiki에 <ref>와 <references />인 2개의 파서 hook을 추가해서, 지면에 인용을 추가할 수 있게 해줍니다.
Installation
미디어위키 확장 내려받기 지면에서 해당 판을 내려받아서 정해진 위치로 이동시킵니다.
미디어위키 설정 LocalSettings.php 파일에 다음을 추가합니다:
wfLoadExtension( 'Cite' );
Special:Version에 접근해서 확장이 정상적으로 설치가 되었는지 확인을 합니다.
Usage
<ref>
태그의 기본 개념은 ref 태그로 묶인 텍스트를 지정된 섹션에 각주로 삽입하는 것입니다. 이 섹션은 자리-표시자 태그 <references />
로 나타냅니다. 이 형식은 이전 형식과 호환하여 사용할 수 없습니다 — 둘 중 하나를 선택해야 합니다.
추가적인 자리-표시자 태그 <references />
가 텍스트에 삽입될 수 있으며, 그 지점까지의 모든 <ref>
태그가 삽입됩니다.
만약 기사에 <references />
를 포함하는 것을 잊어 버리면 각주가 사라지지 않지만, 페이지의 끝에 참조가 표시됩니다.
이 페이지 자체는, 이 문장의 끝에 있는 것과 같은 각주를 사용합니다.[note 1] 만약 "Edit this page"을 클릭하여, 이 페이지의 소스를 볼 경우에는, 각주의 실제 예제를 볼 수 있습니다.
Wikitext | Rendering |
---|---|
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> The Moon, however, is not so big.<ref>''R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
==Notes==
<references />
|
The Sun is pretty big.[1] The Moon, however, is not so big.[2] Notes
|
Multiple uses of the same footnote
각주에 고유 식별자를 지정하기 위해서는, <ref name="name">
을 사용하십시오. 그런 다음 동일한 이름의 ref 태그를 사용하여 동일한 각주를 다시 참조할 수 있습니다. 첫 번째 참조에 텍스트가 이미 있기 때문에 두 번째 태그 안의 텍스트는 중요하지 않습니다. 전체 각주를 복사하거나 <ref name="name" />
과 같이 종료된 비어있는 ref 태그를 사용할 수 있습니다.
다음 예제에서는, 동일한 소스를 세 번 인용합니다.
Wikitext | Result |
---|---|
This is an example of multiple references to the same footnote.<ref name="multiple">Remember that when you refer to the same footnote multiple times, the text from the first reference is used.</ref>
Such references are particularly useful when citing sources, if different statements come from the same source.<ref name="multiple" /> Any reused tag should not contain extra content, that will spawn an error. Only use empty tags in this role.
A concise way to make multiple references is to use empty ref tags, which have a slash at the end. Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.<ref name="multiple" />
==Notes==
<references />
|
This is an example of multiple references to the same footnote.[1] Such references are particularly useful when citing sources, if different statements come from the same source.[1] Any reused tag should not contain extra content, that will spawn an error. Only use empty tags in this role. A concise way to make multiple references is to use empty ref tags, which have a slash at the end. Although this may reduce redundant work, please be aware that if a future editor removes the first reference, this will result in the loss of all references using the empty ref tags.</translate>[1] Notes
|
Merging two texts into a single reference
일반적인 위키 소스 문제는, 하나의 참조 텍스트를 다른 페이지로 분할하여 병합하는 방법입니다. 이 작업은 참조의 첫 부분에 <ref name="name">
태그를 사용하고 <ref follow="name">
태그로 다른 페이지에 태그를 추가하여 수행 할 수 있습니다.
다음은, 앞 절에서 사용한 텍스트를 파생시킨 예제입니다:
Wikitext | Rendering |
---|---|
This is an example of merging multiple texts into the same footnote.<ref name="main">Remember that all the texts will be included into the reference containing the ''name='' attribute.<br /></ref>
<ref follow="main">Simply include the text to be merged into the first <ref name="main"> reference with a tag <ref follow="name"><br />This paragraph is included into a similar tag and it will be merged into the reference in former paragraph.</ref>
==References==
<references />
|
This is an example of merging multiple texts into the same footnote.[1]
References
|
이 구문을 "Page: namespace"에 사용할 때, 각주의 첫 번째 부분이 전달/포함되는 곳에, 각주의 일부를 따르는 ref가 동일한 ns0 페이지로 함께 전달/포함되어야 됨을 조심하십시요. 이 결과를 얻으려면 적절한 섹션 태그를 사용하십시오. 참조 이름이 전적으로 숫자가 아니어야 함을 명심하셔야 합니다, 예를 들어, <ref name="p32">
그리고 <ref follow="p32">
.
The <references /> tag
<references />
태그는 <ref>
태그에 정의된 모든 인용문의 텍스트를 페이지의 해당 지점까지 삽입합니다. 예를 들어 위의 인용을 기반으로 note 그룹에 대한 참조가 있어야 합니다.
Wikitext | Result |
---|---|
<references group="note"/>
|
|
Wikipedia의 일부 언어 버전에서는, <references />
가 통합된 {{Reflist}}
템플릿을 사용하여 긴 참조 목록을 배치할 수 있습니다. 여러 개의 열에 참조 목록을 표시하는 선택적 매개 변수를 제공합니다. 예를 들어, 영어, 힌디어 및 인 링구아 위키피디아는 css 선택기 references-small
를 사용하여 참조 텍스트를 일반 텍스트보다 작게 만듭니다.
만약 페이지가 둘 이상의 <references />
목록을 포함하면, 각 목록에는 이전 참조 목록 다음에 정의된 <ref>
태그가 포함됩니다. 만약 이러한 참조 목록이 템플릿에 의해 생성된 경우에는, 첫 번째 참조 목록 앞에 정의된 ref 태그가 각 목록에 나열되고, 그리고 참조 태그는 있지만 참조 목록은 없다는 오류 메시지가 표시됩니다.
Grouped references
만약 원하는 경우에, 이것은 $wgAllowCiteGroups = false;
에 의해 비활성화 될 수 있습니다.
다음 예제에서는 인용 및 기타 각주에 대해 별도의 참조 목록을 생성합니다:
Wikitext | Result |
---|---|
According to scientists, the Sun is pretty big <ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref> In fact, it is very big <ref group="footnotes"> Take their word for it. Don't look directly at the sun!</ref>
==Notes==
<references group="footnotes" />
==References==
<references />
|
According to scientists, the Sun is pretty big [1] In fact, it is very big [footnotes 1]
Notes
References
|
익명 그룹은 이전처럼 작동하지만, 명명된 그룹을 대상으로하는 참조는 지정된 <references />
요소에만 표시됩니다.
Separating references from text
텍스트 참조는 텍스트를 다른 페이지로 쉽게 복사 할 수 있도록 해줍니다; 다른 한편으로, 그들은 그것을 읽기 어렵게 만듭니다. 많은 데이터, 인용문 또는 정교한 인용 템플릿을 포함하는 참조는 실제로 볼 수 있는 텍스트보다 소스의 훨씬 더 많은 부분을 차지할 수 있습니다. 이를 피하기 위해 최근 버전의 확장 프로그램은 <references />
섹션의 일부 또는 전체를 독자에게 실제로 표시되는 위치로 옮길 수 있습니다.
Wikitext | Result |
---|---|
According to scientists, the Sun is pretty big.<ref name="miller" /> The Moon, however, is not so big.<ref name="smith" />
==Notes==
<references>
<ref name="miller">E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23-5.</ref>
<ref name="smith">R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44-6.</ref>
</references>
|
According to scientists, the Sun is pretty big.[1] The Moon, however, is not so big.[2] Notes
|
따라서, 위의 코드는 위의 첫 번째 예제와 동일한 출력을 가지지만 참조의 번호 지정 및 순서는 일반적으로 동일하지 않습니다.
Substitution and embedded parser functions
Cite의 <ref>
태그는 MediaWiki의 파서 함수 (예를 들어, {{#ifexpr:…}}
) 또는 변수 (예를 들어, {{PAGENAME}}
) 또는 subst:
앞에 파싱되기 때문에, 이것들은 인용 문헌에서 작동하지 않습니다. 대신에, 마법 단어 {{#tag:…}}
을 사용해야 합니다.
Wikitext | Result |
---|---|
Foo <ref>This is not working, see{{cite journal|url="www.google.com" |title=Search |author= |date= |accessdate={{subst:#time:Y-m-d|now}}}}</ref> bar baz…
Foo{{#tag:ref|Whereas this does, see{{cite journal|url="www.google.com" |title=Search |author= |date= |accessdate={{subst:#time:Y-m-d|now}}}}}} bar baz…
<references />
|
Foo [1] bar baz… Foo[2] bar baz…
|
Customization
<ref>
및 <references>
의 출력 형식은 MediaWiki 메시지를 통해 거의 완벽하게 사용자 정의 가능합니다. 예를 들어, 위키 구성에 따라 MediaWiki 이름 공간을 통해 수정할 수 있습니다.
<ref>와 <references>의 출력을 제어하는 메시지 목록과 그 값(있는 경우) ($1, $2, $3 ...)은, 기본 내용의 최신 목록을 보려면 여기를 참조하십시오.
- Incomplete list
- cite_reference_link_key_with_num
- key
- num
- cite_reference_link_prefix
- cite_reference_link_suffix
- cite_references_link_prefix
- cite_references_link_suffix
- cite_reference_link
- ref ID
- backlink ID
- count to display
- cite_references_link_one
- Used to format the source list that <references /> outputs, it configures 3 things: the backlink ID, the ref ID, and text of note.
- backlink ID - used for creating the number order of the source list.
- ref ID - used to link back to the actual reference in the text, this is where you can configure the <bold>^</bold> symbol
- text of note - text used above describing the source info
- cite_references_link_many
- backlink ID
- list of links
- text of note
- cite_references_link_many_format
- ref ID
- numeric value to use as a backlink
- custom value (as defined in cite_references_link_many_format_backlink_labels to use as a backlink)
- cite_references_link_many_format_backlink_labels
- cite_references_link_many_sep
- cite_references_link_many_and
- cite_references_prefix
- cite_references_suffix
Set references to use ^ and letters
기본 uparrow(↑)를 캐럿(^)으로 바꾸기 위해서는, 다음 시스템 메시지를 수정하십시오. 이 페이지들은 모두 Special:Allmessages에서 찾을 수 있습니다.
From | To |
---|---|
<li id="$1">[[#$2|↑]] $3</li>
|
<li id="$1">[[#$2|^]] $3</li>
|
From | To |
---|---|
<li id="$1">↑ $2 $3</li>
|
<li id="$1">^ $2 $3</li>
|
$3을 <sup> </sup> 태그 사이에 쓰면 링크가 1.0, 1.1, 1.2에서 a, b, c 등으로 변경됩니다.
From | To |
---|---|
[[#$1|<sup>$2</sup>]]
|
[[#$1|<sup>$3</sup>]]
|
이 3페이지를 처음으로 검색하면 일치하는 항목이 없습니다. "Create this page"를 클릭하여 코드를 편집하십시오. 참조가 있는 페이지가 다시 작성될 때까지 변경 사항이 표시되지 않습니다.
Set reference and reference number highlighting
다음 코드를 mw:MediaWiki:Common.css 페이지에 추가하십시오.
/* make the Cite extension list of references look smaller and highlight clicked reference in blue */
ol.references { font-size: 90%; }
ol.references li:target { background-color: #ddeeff; }
sup.reference:target { background-color: #ddeeff; }
See also
- mw:Help:Extension:Cite
- HarvardReferences (compatible)
- Extension:Semantic Cite
- Fork at GitHub offering an additional parameter to specify pages, example.