How can I create MATLAB help output with hyperlinks that open a single PDF and navigate to specific bookmarked sections within the same document?

I have a Microsoft Word document named Test.docx that contains the following sections:
  • 1.1 Heading 1
  • 1.2 Heading 2
  • 1.3 Heading 3
Bookmarks have been added to each of these headings, and the Show bookmarks option is enabled. The document is then saved as Test.pdf.
I want to write a MATLAB code such that, when the user enters help in the MATLAB Command Window, the output appears as follows:
Refer to user guide:
Open Test (pdf)
Heading 1
Heading 2
Heading 3
All of the above entries should be displayed as clickable hyperlinks.
The expected behavior is:
  • Clicking Open Test (pdf) should open Test.pdf in the system's default web browser and display the first (title) page of the PDF.
  • Clicking Heading 1 should open the same PDF and navigate directly to section 1.1 Heading 1.
  • Clicking Heading 2 should open the same PDF and navigate directly to section 1.2 Heading 2.
  • Clicking Heading 3 should open the same PDF and navigate directly to section 1.3 Heading 3.
A key requirement is that all hyperlinks should reference the same PDF file. For example:
  • Clicking Open Test (pdf) opens the PDF at the first page.
  • If the PDF is already open and the user subsequently clicks Heading 1, Heading 2, or Heading 3, it should navigate to the corresponding bookmarked section within the same PDF rather than opening a separate browser tab or a new instance of the PDF.
In summary, all hyperlinks should target different locations (bookmarks) within the same PDF document instead of opening multiple copies of the same PDF.

1 commentaire

You can create clickable hyperlinks in the MATLAB Command Window output and help text using HTML hyperlinks and matlab. These hyperlinks can be used to open URLs or execute MATLAB commands.
You can also refer to these documentation

Connectez-vous pour commenter.

Réponses (0)

Catégories

Produits

Version

R2024b

Commenté :

le 7 Août 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by