How to turn a paragraph into a cross-reference/link

Hello,

I seek for a way to mark a text block (including indentions, images and
what is in there) and turn it into a cross reference - without it
getting substituted with a link name or a page number or the like. I
want it just as you find it in internet-shops: There is an article
entry, with header, text, image and price tag, and you can click on the
whole block (division in HTML))

regards

I think you just need not a cross-reference but a hyperlink. You will see that a hyperlink can be to a different part of the same document or another document, not just to a web address. You can link to tables, frames, graphics, OLE objects, sections, headings, or bookmarks.

I trust this helps.

Brian Barker

Hello,

>I seek for a way to mark a text block (including indentations,
>images and what is in there) and turn it into a cross reference -
>without it getting substituted with a link name or a page number or
>the like.

I think you just need not a cross-reference but a hyperlink. You will
see that a hyperlink can be to a different part of the same document
or another document, not just to a web address. You can link to
tables, frames, graphics, OLE objects, sections, headings, or
bookmarks.

I trust this helps.

Brian Barker

The hyperlink dialog expects a name for the hyperlink that substitutes
the original text block. How can I do it different?

regards,

Hi Dennis,

why do you need, that the entire block of text becomes a link? Do I understand it correctly, that when clicking _somewhere_ in the block, LO should switch to a different part of the document?

The problem is, that the <text:a> element, which is needed to define the click-sensitive area, is only allowed inside a paragraph and therefore cannot contain multiple paragraphs.

Kind regards
Regina

Dennis Heuer schrieb:

Select the text block, then ctrl+K to create the link

Best regards.
JBF

Try not giving it a name.

Brian Barker

Then it substitutes with the target name. There just needs to be a
tabulator space in the selection, and the hyperlink rewrites the
selection. Definitely, the hyperlink mechanism won't do...

Regards,

There just needs to be a tabulator space in the selection, and the
hyperlink rewrites the selection. Definitely, for my case, the
hyperlink mechanisms ain't work...

Regards,

Hi Dennis,

why do you need, that the entire block of text becomes a link? Do I
understand it correctly, that when clicking _somewhere_ in the block,
LO should switch to a different part of the document?

Read my message again. Therein is mentioned an example use-case.
This behaviour (link on div) is actually very very common on internet
and very very useful if the link info is heterogenuous (and thus it
would be cumbersome to find out what is clickable or to always target
at a different (and maybe small) location in an order of
heterogenuous list entries.)

The problem is, that the <text:a> element, which is needed to define
the click-sensitive area, is only allowed inside a paragraph and
therefore cannot contain multiple paragraphs.

It even cannot include a tabulator space whithout replacing the
selection. This is a very bad restriction. The true problem is that
LibreOffice is only expecting explanatory text snippets for hyperlink
names while in HTML the hyperlink very quickly turned into a universal
attribute of a semantic division. The latter is far more helpful...

Kind regards
Regina

Dennis Heuer schrieb:
> Hello,
>
> I seek for a way to mark a text block (including indentions, images
> and what is in there) and turn it into a cross reference - without
> it getting substituted with a link name or a page number or the
> like. I want it just as you find it in internet-shops: There is an
> article entry, with header, text, image and price tag, and you can
> click on the whole block (division in HTML))
>
> regards
> ---------------------------------------------------------------------
> Dennis Heuer
> einz@verschwendbare-verweise.seinswende.de
>

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more:
http://wiki.documentfoundation.org/Netiquette List archive:
http://listarchives.libreoffice.org/global/users/ All messages sent
to this list will be publicly archived and cannot be deleted

Regards,

As far as I know, the nature of hyperlinks in HTML has not changed. I looked at the page source for the kind of on-line shopping site that you're talking about, and the functionality that you want is produced by repeating the hyperlink for each text string or image that can be clicked on. Such pages are presumably created using specialized software.

- Robert

The hyperlink dialog expects a name for the hyperlink that substitutes the original text block. How can I do it different?

Try not giving it a name.

Then it substitutes with the target name.

Er, not for me, it doesn't.

There just needs to be a tabulator space in the selection, and the hyperlink rewrites the selection.

It seems that you can avoid this by creating the hyperlink for the text without the tab and inserting the tab afterwards. Indeed, it seems that as long as you have a minimum of two characters in your paragraph you can create the hyperlink and then add to the paragraph between those end characters as you wish - without upsetting the hyperlink.

Definitely, the hyperlink mechanism won't do...

You are welcome to give up, but I haven't. You said originally that you wanted to include images, and a way to do that - as someone has already suggested - is to create identical hyperlinks for them separately.

Brian Barker

I hope that you can already imagine what I mean with "cumbersome"...

Hi Dennis,

Dennis Heuer schrieb:

Hi Dennis,

why do you need, that the entire block of text becomes a link? Do I
understand it correctly, that when clicking _somewhere_ in the block,
LO should switch to a different part of the document?

Read my message again. Therein is mentioned an example use-case.
This behaviour (link on div) is actually very very common on internet
and very very useful if the link info is heterogenuous (and thus it
would be cumbersome to find out what is clickable or to always target
at a different (and maybe small) location in an order of
heterogenuous list entries.)

The problem is, that the <text:a> element, which is needed to define
the click-sensitive area, is only allowed inside a paragraph and
therefore cannot contain multiple paragraphs.

It even cannot include a tabulator space whithout replacing the
selection.

That is only a problem with this dialog. The file format has no problems with tabs. The easiest way to get a hyperlink to paragraph seems to me this way:
Enter first and last character of the paragraph, might be dummy, which you deletes later on.
Set the hyperlink to this two characters. Make sure, that you only mark the characters and that the marked area does not go to the next paragraphs. You should then have these two characters in the "Text:" field in the dialog. Enter target and close dialog.
Insert the desired text between the two characters.

Another way would be to edit the hyperlink directly in the file. That might work, if you use .fodt format and in case you know a little bit about HTML. If you set the hyperlink at the start of the paragraph, you only need to shift the </text:a> tag from inside the paragraph to immediately before the </text:p> element.

Another problem comes with images, which are anchored as character and therefor are totally inside the paragraph. LibreOffice does not allow you, to set the <text:a>...</text:a> brackets around shapes or images. That is no restriction from file format, but only from LibreOffice. You need to set the hyperlink in the properties of the image. That will generate a <draw:a> element, not a <text:a> element. That is different to HTML too.

Are you sure, a text document is the right medium for your purpose?

Kind regards
Regina

I'd suggest discussing this over coffee, but you wouldn't like my "cumbersome" flat, as when I come home I need to switch on the lights in each room separately!

(Actually, I think you used the word "cumbersome" only in enquiry on an entirely separate subject.)

Brian Barker

>>You are welcome to give up, but I haven't. You said originally that
>>you wanted to include images, and a way to do that - as someone has
>>already suggested - is to create identical hyperlinks for them
>>separately.
>
>I hope that you can already imagine what I mean with "cumbersome"...

I'd suggest discussing this over coffee, but you wouldn't like my
"cumbersome" flat, as when I come home I need to switch on the lights
in each room separately!

And then you're done, I guess. Now consider clonig this flat for a
flat-index, and possibly manipulating the clones :wink:

nevertheless...

Hello Regina,

thank you very much for the detailed explanation

Are you sure, a text document is the right medium for your purpose?

Yes, at least in the 21th Millenium :wink: I can leave out the image but
still there was the problem with tabs, as my index-list-entry-headings
are annotated ("inside"/"outside" and Dayphase) and span'ed with dots,
and this part is the longer and better clickable part (In a storyboard
often you have headings like "Bus", "Loo", "Off" or even shorter :slight_smile:

Kind regards
Regina

Regards,