Description
En route to prepare a new multipage booklet, I struggle to define and subsequently use a link across one Markdown file to a specific section in an other Markdown file. To me, the example in fortran-lang_webpage/source/community/contributing.md
with
[Fortran-lang news]({{pathto('index',1)[:-5]}}News)
is not yet understood. Because I did not identify an other already existing booklet using a cross-link to an other Markdown file, it is not possible to mimic the pattern required. Can you please provide a clarification on the following minimal working example?
Let's presume there already is an index.md
file with
# minibook_title
:::{toctree}
:maxdepth: 2
:hidden:
Dependent page <dependent_page>
This is the `index.md` file of `minibook_title`.
This links to [application](dependent_page.md#application)
as content. Already known to learning.yml
as is the following dependent file dependent_page.md
of the content
# dependent_page
test test test
test test test
test test test
## theory
placeholder placeholder
placeholder placeholder
placeholder placeholder
## application
This is section with the point
of interest I would like to cross-link.
to section application
.
In local builds with Linux Debian 13/trixie, resolving the dependencies with pip install -r requirements.txt
I'm able to cross-link to sections of the same Markdown file only, but not beyond. (Links to external references again work well.)
Activity
nbehrnd commentedon Mar 27, 2025
I kindly request assistance by @henilp105, @perazz, or an other steward of the web site regarding the issue about how to link from one MyST Markdownfile to a section of an other Markdown file.
First I create a build with
#build_preview
here on GitHub. While gliding the mouse over the keyword in question see an address which seems suitable -- see hereHowever, once I click on this critical keyword, the redirection still is only to the very top of the Markdown file in question, and not to the particular section of interest. Perhaps I'm just too close to the lines to recognize the cause and assistance by a second pair of eyes can both provide MWE and a boost of morale here ...
nbehrnd commentedon Jun 30, 2025
During the preparation of PR #542, I identified an approach. Under condition to pass the review, I possibly might then close this issue with a revision of the guidelines how to prepare a multipage-booklet.