Skip to content

Add way to reference chapters / sections #326

@shimizukawa

Description

@shimizukawa

If you have numbered sections, it would be useful to be able to reference other sections by number, rather than title. For example, :secref:foo would be the same as :ref:Section 4 <foo>, provided foo was in the fourth section. Often, saying "we'll cover this in Chapter 4" reads much better than "we'll cover this in The Configuration File", especially if the title is long.

Once this is implemented, the title format and maximum depth should be configurable (e.g. only reference up to two levels deep).

I would like to try to implement this as an extension, but I'm not sure how to begin. If someone give me a hint for how to get the section number located at a particular reference, that would be a huge help.


Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions