Page 1 of 1

[Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Sun Sep 06, 2015 7:00 am
by iandol
I have a bibliography style that includes DOI links like so:
Azevedo FA, Carvalho LR, Grinberg LT, Farfel JM, Ferretti RE, Leite RE, Jacob Filho W, Lent R, & Herculano-Houzel S (2009) “Equal numbers of neuronal and nonneuronal cells make the human brain an isometrically scaled-up primate brain.” Journal of Comparative Neurology 513: pp. 532–541 <http://dx.doi.org/10.1002/cne.21974>
When scanning an ODT to create the formatted version, the links are output as simple text. It would be great to have real links which ODT files support. This requires the text:span element to be wrapped in a text:a element:

Code: Select all

<<text:span text:style-name="T3">http://dx.doi.org/10.1002/cne.21974</text:span>>
becomes

Code: Select all

<<text:a xlink:type="simple" xlink:href="http://dx.doi.org/10.1002/cne.21974"><text:span text:style-name="T3">http://dx.doi.org/10.1002/cne.21974</text:span></text:a>>
Would that be possible?

Re: [Feature Request] Hypertext Links in Bibliographies

Posted: Sun Sep 06, 2015 7:10 am
by Jon
I'm on vacation for the next 10 days in Europe so can't test this. but I think it's possible. Put the hypertext link "language" in the format as "quoted text" (e.g. between $ marks) and Bookends will output it in the format. Please see the section on Bookends Server toward the end of the user guide. It has explicit examples showing how this is done.

Jon
Sonny Software

Re: [Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Sun Sep 06, 2015 1:11 pm
by iandol
No worries this is a minor feature request, enjoy your vacation!!! :D

For when you return:

I can get the bibliography entry just fine using this format:

Code: Select all

a (d) “t”  f v|~: p. ^: pp. ~p– $<text:a xlink:type="simple" xlink:href="http://dx.doi.org/$u17$"><text:span text:style-name="T3">DOI Link</text:span></text:a>$
creates:

Code: Select all

Azevedo FA, Carvalho LR, Grinberg LT, Farfel JM, Ferretti RE, Leite RE, Jacob Filho W, Lent R, & Herculano-Houzel S (2009) “Equal numbers of neuronal and nonneuronal cells make the human brain an isometrically scaled-up primate brain.” Journal of Comparative Neurology 513: pp. 532–541 <text:a xlink:type="simple" xlink:href="http://dx.doi.org/10.1002/cne.21974"><text:span text:style-name="T3">DOI Link</text:span></text:a>
But then when creating the bibliography, Bookends insert this all as text in the ODT or FODT file, i.e. the markup is escaped to text. If I modify the rest of the format (manually generate bold and italics etc), I could just export to plain text, then edit the XML of a FODT file. But this is quite a fuss.

Re: [Feature Request] Hypertext Links in Bibliographies

Posted: Mon Sep 07, 2015 1:34 am
by Jon
Bookends generates the markup but whether the application that you are using knows what to do with it is up to that application. For example, when sent to a browser the hypertext links are recognized as such. You'll have to play with LibreOffice to see what it's looking for (for example, you may have to export to a text file, or as HTML, instead of a styled text file, and open that in LibreOffice

Jon
Sonny Software

Re: [Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Mon Sep 14, 2015 4:32 am
by iandol
But BE already works with ODF files right? When you scan and ODT file, BE "knows how to enter styling markup to create Bold, Italics, Underlines etc by writing the correct markup INTO the ODT. I don't don't have to hack the XML for this, BE does "Styled Text" for me every time. Why can't BE format links when styling text?

As I understand it your parser does this, for example if the BE format BOLDs the authors names, you inject:

Code: Select all

<text:span text:style-name="T4">Doe, John</text:span>
...when creating the formatted ODT. So now if the BE format includes a URL, you inject:

Code: Select all

<text:a xlink:type="simple" xlink:href="http://my.url">http://my.url</text:a>
The only difference is you need to know you are dealing with a URL, which you already know for {z} and can very easily guesstimate for {u17}, or scan for the URL pattern.

Re: [Feature Request] Hypertext Links in Bibliographies

Posted: Mon Sep 14, 2015 7:29 am
by Jon
The .odt file thinks the link is just text. You have to tell it (in the format) that it is not, that's it's a special case. Hypertext markup is NOT styled text, it's special instructions to the WP (that some may and some may not understand, actually). It's that simple. You should enter the necessary markup in the format.

Jon
Sonny Software

Re: [Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Mon Sep 14, 2015 4:20 pm
by iandol
I don't want to use HTML markup, I'd like to use styled text - scan a ODT file and get the correct formatting. In the format manager I can already style text without writing markup and manually hacking XML.

I fear my thread title is probably misleading you. I've edited it to hopefully be more clear.

To reiterate, BE already supports styled text for ODT files, why not styling of links as well as bold/italic/underline? This is technically straight-forward for you AFAIK, I imagine the issue you have is you don't want to give the ODT support a feature that RTF doesn't?

Re: [Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Tue Sep 15, 2015 12:38 am
by Jon
The word processor handles styling of links, not Bookends. It has nothing to do with .odt vs rtf vs anything else. One of us is not understanding the other. I'm telling you that your wp does not understand it's a link, it thinks it is plain text (styled or not, that's irrelevant), that's why it's not underlined (or functional for that matter -- simply underlining text doesn't make it a live link). And I've told you, you have to handle this yourself in the format, inserting whatever tags .odt uses to indicate that the content is a link, not text. Let's take this off-forum, it's not going anywhere. If you want to pursue it please email tech support and we'll discuss it there.

Jon
Sonny Software

Re: [Feature Request] STYLED Links in Scanned ODT Bibliographies

Posted: Thu Dec 03, 2015 1:17 pm
by iandol
Here is the macro to fix this for LibreOffice users: viewtopic.php?f=2&t=3930