In reference to Doug Engelbart's vision: https://www.dougengelbart.org/content/view/116/#7j I am asking if there is feature in Org mode that could generate a back link or #name or other tags in export so that each part of Org file can be later finely referenced? Example may be seen on the above link. On the right side there are 7j or 7d names to which anybody can link to pin point specific paragraph. I know that #names exist in HTML export for *** headings. Do they or can they exist for every paragraph or item listed? Jean
On Sunday, 8 Nov 2020 at 23:40, Jean Louis wrote:
> I know that #names exist in HTML export for *** headings. Do they or
> can they exist for every paragraph or item listed?
Maybe not quite what you want but you can place anchors (aka targets)
anywhere you want in your document using <<targetname>>. I use these
for within-document linking but I imagine you can link to these from
other documents as well (untested).
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-61-ga88806.dirty
On 2020-11-09 at 03:38 -08, Eric S Fraga <e.fraga@ucl.ac.uk> wrote... > On Sunday, 8 Nov 2020 at 23:40, Jean Louis wrote: >> I know that #names exist in HTML export for *** headings. Do they or >> can they exist for every paragraph or item listed? > > Maybe not quite what you want but you can place anchors (aka targets) > anywhere you want in your document using <<targetname>>. I use these > for within-document linking but I imagine you can link to these from > other documents as well (untested). Also I imagine https://github.com/alphapapa/org-make-toc or https://github.com/snosov1/toc-org that already auto-make TOCs to every header could be hacked to add paragraph-level links? -k.
* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-09 14:39]:
> On Sunday, 8 Nov 2020 at 23:40, Jean Louis wrote:
> > I know that #names exist in HTML export for *** headings. Do they or
> > can they exist for every paragraph or item listed?
>
> Maybe not quite what you want but you can place anchors (aka targets)
> anywhere you want in your document using <<targetname>>. I use these
> for within-document linking but I imagine you can link to these from
> other documents as well (untested).
Thank you.
That forms foundation for final solution as then it could be possible
to define special export that finds each new line after empty lines
and automatically adds specific anchor or target name to document.
I have tried using it in that manner as below and exported it to HTML
and #names are inside HTML. In the final solution I may need to adopt
CSS to place named anchors on the right side and to display them as
they are usually not displayed.
<<anchor1>>
Paragraph
<<anchor2>>
Paragraph
Links:
- [[anchor1][anchor1]]
- [[anchor2][anchor2]]
Before the export, I would like to filter the text and add anchors
automatically.
If you have any pointer where I could insert a filter before
exporting, let me know.
Thanks,
Jean
On Monday, 9 Nov 2020 at 15:04, Jean Louis wrote:
> If you have any pointer where I could insert a filter before
> exporting, let me know.
You could use the org-export-before-processing-hook to process the
document. It works on a copy of the buffer. I've used this in the
past. There are other hooks which come in at different times in the
export process. There are also filters which process specific org
elements and I'm sure there is one for anchors... yes,
org-export-filter-target-functions.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-61-ga88806.dirty
* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-09 15:45]:
> On Monday, 9 Nov 2020 at 15:04, Jean Louis wrote:
> > If you have any pointer where I could insert a filter before
> > exporting, let me know.
>
> You could use the org-export-before-processing-hook to process the
> document. It works on a copy of the buffer. I've used this in the
> past. There are other hooks which come in at different times in the
> export process. There are also filters which process specific org
> elements and I'm sure there is one for anchors... yes,
> org-export-filter-target-functions.
Thank you! Reference taken.
I hope I will be able to customize the anchors myself in the filter.