Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Hypertext: only the left part is clickable in pdf

Explorer ,
Oct 21, 2024 Oct 21, 2024

Hello,

 

We work in a structured .fm document/book.

 

We want to have clickable words in a table, so that each jumps to section of the document when clicked.

 

We couldn't do it with Xref because the clickable text must be something different than the target section title.

 

So we did it with Hypertext elements:

 

- In the table, we inserted a Hypertext container with an embedded HypertextMarker. See below how those are defined in our EDD. Within the Hypertext container we added the text to be displayed, along with the HypertextMarker element. The HypertextMarker command is for example "gotolink VERSION", with "VERSION" the name of the target marker. See structure below:

Table
    TableMain
        TTitle
        THeading (...)
        TBody
        CellBody
            Hypertext
                HypertextMarker ...... gotolink VERSION
                Para ..... VERSION

 

- In the target section, the target HypertextMarker is defined as "newlink VERSION", with "VERSION" the name of the marker, as shown below:

SectionLevel2
    Title
        Hypertext
            HypertextMarker ..... newlink VERSION
            Section title text

 

EDD elements:

Element (Container): Hypertext
    General rule:	(HypertextMarker, (<TEXT> | Para)*)
    Automatic insertions
        Automatically insert child:	HypertextMarker
    Text format rules
        If context is: Title
            No additional formatting.
        Else
            Text range.
            Use character format: Italic

Element (Marker): HypertextMarker
    Initial marker type
        In all contexts.
            Use marker type: Hypertext

 

We do it for several cells of our table. The result is not consistent: some links work as expected, so that the whole displayed word is clickable, but some other links have only a very narrow part of the text that is clickable at the left of it, which makes it very hard to click on.

 

I tried to put the text in a paragraph but it is the same as when inserted as plain text.

 

Did you ever see this ? Is it a bug ? Is there any workaround ?

 

Thanks in advance.

 

Eric

 
 
 
 
232
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 24, 2024 Oct 24, 2024

Hello Framexpert and Bob, thanks a lot for your answers !

 

I played with the formats a bit, considering what you explained, but I wasn't able to get a consistent result in the end. Some links always ended to be clickable only at the very beginning of the text as described above.

 

I finally decided to switch to the "Xref" method as follows, that seem to give consistent results :

  • Create a Xref element
  • In the "cross reference" panel, click on "Edit Format" to create a new format
  • Create a dedicated forma
...
Translate
Community Expert ,
Oct 21, 2024 Oct 21, 2024
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2024 Oct 21, 2024

I don't know if Rick's video covers this, but the usual suspect is a Character Format in the source (target) text.

FM only requires you to delimit the start of a cross-reference of hypertext target, and uses various cues to determine the end of the range, one of which is encountering a ChFmt. The usual work-around is to remove the format, perhaps replacing it with some Unicode that natively has the desired presentation (bold, italic, super/sub-scripted, etc.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2024 Oct 24, 2024
LATEST

Hello Framexpert and Bob, thanks a lot for your answers !

 

I played with the formats a bit, considering what you explained, but I wasn't able to get a consistent result in the end. Some links always ended to be clickable only at the very beginning of the text as described above.

 

I finally decided to switch to the "Xref" method as follows, that seem to give consistent results :

  • Create a Xref element
  • In the "cross reference" panel, click on "Edit Format" to create a new format
  • Create a dedicated format for each cross reference, for example if the text to be displayed is "REGISTER1":
    • Name: "reg REGISTER1" (any unique name here)
    • Definition: "REGISTER1" (the text you want to display and to be clickable)
  • Insert the Xref and set it to the defined format
  • Do it for each Xref (yes, it is a PITA)

 

Thanks anyway for your help !

 

Kind regards

 

Eric

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines