링크와 참조
문서개요
이 문서는 AsciiDoc 에서 링크와 참조를 표현하는 방법에 대해 설명합니다.
1. Link
문서에서 주소 지정 가능한 다른 리소스에 대한 링크(일명 하이퍼링크)를 만드는 다양한 방법을 제공한다.
|
문서에서 링크를 표현하기 위해서는 link:+++URL+++["링크 텍스트"] 를 사용하고 결과물은 다음과 같다.
1.1. AsciiDoc 소스
링크를 작성하는 AsciiDoc 소스는 다음과 같다.
The homepage for the Asciidoctor Project is link:+++https://asciidoctor.org/+++["AsciiDoctor Home"].
Email us at hello@example.com to say hello.
(1)
Once launched, the site will be available at \https://example.org.
If you cannot access the site, email \help@example.org for assistance.
--
1 | 자동 링크를 피하려면 URL앞에 \ 를 붙인다. |
2. 상호 참조 (xref)
문서에서 상호 참조를 표현하기 위헤서는 xref:문서명#앵커ID["링크 텍스트"] 를 사용하고 결과물은 다음과 같다.
2.1. AsciiDoc 소스
상호 참조를 작성하는 AsciiDoc 소스는 다음과 같다.
[#manual_id] (1)
Manually set id
[#link_asciidoc_source] (2)
=== AsciiDoc 소스
xref:15link.adoc#manual_id["Manual ID"] (3)
xref:15link.adoc#link_asciidoc_source["링크 AsciiDoc 소스"] (3)
1 | 앵커 설정 |
2 | 현 문서의 링크의 AsciiDoc 소스 섹션에 앵커 설정 |
3 | 참조 호출 |
앵커 설정 규칙
|