Links in HTML Documentation generated by MATLAB not linking to correct location
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ben Rautio
el 19 de Jul. de 2023
Comentada: Ben Rautio
el 24 de Jul. de 2023
I used live MATLAB scripts to create documentation for some code. I used hyperlinks within the documentation to jump to different parts of the documentation. These links worked when I tested them in the live script.
However, when I exported the live scripts as HTML to use as documentation for a custom toolbox, I noticed the links didn't work anymore. When I clicked on them, they would jump to the table of contents at the top of the documentation rather than the section that I linked to within the document.
Does anyone know how to create these links so that they jump to the section I linked to in the documentation rather than the table of contents when I export to HTML?
Thank you.
0 comentarios
Respuesta aceptada
Kshittiz
el 24 de Jul. de 2023
Hey,
Please note that the HTML generated by MATLAB doesn't inherently support internal anchor links, this is why you are being redirected to the table of contents instead of the linked sections.
To create links that correctly jump to specific sections within the exported HTML documentation, you can use HTML anchor tags and IDs, i.e. :
i) In the live script, add an HTML anchor tag with a unique ID to the section you want to link to.
ii) Create a hyperlink to the section using the href attribute and the ID of the anchor tag.
I hope this helps.
Thanks
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!