Tinderbox Forum

Access to text of text link?

I’m interested in exporting text links by embedding them in/adjacent to the text from which they are linked. To explain, consider:

A note called “Source Note” whose $Text is “This is some sample text in which the word linked is a text link.”
A text link whose source text in “Source Note” is the word ‘linked’ and whose destination is a note called “Target Note” whose $Text is “Some footnote information.”

Using Action Code or Export Codes can I get access to the source text of a text link, in this case, ‘linked’ and a reference to the note to which it is linked? I’ve done some searching of this forum and ATBRef without turning up something that looked right.

In the ideal case, I’d like to export some Markdown that looked something like this:

This is some sample text in which the word [linked](Some footnote information) is a text link.

My situation is that I have a small number of notes (c. 15) most of which have 1, 2 or 3 text links out to short notes. Each of the linked notes is a sibling of the source note, btw. I would like to build an export template that automates the process of making the linked notes into footnotes of the source document.

I’m open to some post-processing using grep, sed, Pandoc, or something similar. The ultimate destination is Mellel, but for the (semi-)automated export I’d like to wind up with MultiMarkdown or Word or something I can get into Ulysses. (For example, I thought if I could get access to the source texts as strings, I could put these in an attribute, export that attribute, then post-process it to make the right connections/transformations.)

I’d be grateful for information on what is possible in relation to getting the source text of text links in TB or any ideas about how to achieve what I want, please.

Thank you.

In short, no! At present neither action nor export code give programmatic access to text link anchor text.

However, footnotes ring a bell from some years back. IIRC I did a variant of this for Ted Goranson’s (Tinderbox-generated) blog. The trick is to place the footnotes in a non exporting container, whilst letting the footnote notes themselves remain exportable. Then the main note template has extra code to include and foramt the footnote content into the note’s exported page.

Thanks Mark.

1 Like