rst2typst
  • "atsphinx" project
/

Contents:

  • Getting started
  • Command line tools
  • Spec of translator
    • Admonitions
    • Block quotes
    • Bullet lists
    • Code
    • Comments
    • Contents
    • Definition lists
    • DocBook elements
    • Docinfo
    • Enumerated lists
    • Field lists
    • Footnotes
    • Hyperlinks
    • Images
    • Inline markups
    • Line blocks
    • Math
    • Option lists
    • Plain text
    • Raw
    • Sections
    • Tables
    • Transitions
  • Roadmap
  • Contributing guide

Reference:

  • API reference

On this page

  • Details
  • Examples
    • External hyperlink targets
    • Internal hyperlink targets
    • Indirect hyperlink targets
    • Anonymous hyperlink targets
  • References
  1. rst2typst /
  2. Spec of translator /
  3. Hyperlinks

Hyperlinks¶

Details¶

reStructuredText supports several types of hyperlink targets as documented in the docutils reference:

  1. External hyperlink targets: Links to external URLs

  2. Internal hyperlink targets: Links to explicit targets within the document

  3. Indirect hyperlink targets: Aliases that point to other targets

  4. Implicit hyperlink targets: Automatically created from section titles

  5. Anonymous hyperlink targets: Targets matched by position using double underscores

Examples¶

External hyperlink targets¶

External hyperlink targets link to URLs outside the document.

https://example.com

`here <https://example.com>`_

Python_

.. _Python: https://python.org
#link("https://example.com")[https://example.com]

#link("https://example.com")[here]

#link("https://python.org")[Python]

Internal hyperlink targets¶

Internal hyperlink targets create anchors within the document that can be referenced.

Clicking on this internal hyperlink will take us to the target_ below.

.. _target:

The hyperlink target above points to this paragraph.
Clicking on this internal hyperlink will take us to the #link(<target>)[target] below.
<target>

The hyperlink target above points to this paragraph.

Indirect hyperlink targets¶

Indirect hyperlink targets are aliases that point to other targets, allowing multiple names for the same destination.

.. _Python: https://www.python.org/

.. _Python DOT ORG: Python_

This is a `Python DOT ORG`_ reference.
This is a #link("https://www.python.org/")[Python DOT ORG] reference.

Anonymous hyperlink targets¶

Anonymous hyperlink targets use double underscores and are matched to references in order of appearance.

See `the web site of my favorite programming language`__.

__ https://www.python.org/
See #link("https://www.python.org/")[the web site of my favorite programming language].

References¶

Docutils:

  • https://www.docutils.org/docs/ref/rst/restructuredtext.html#hyperlink-targets

Typst:

  • https://typst.app/docs/reference/model/link/

Previous
Footnotes
Next
Images

2026, Kazuya Takei

Made with Sphinx and Shibuya theme.