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

Variables don't use applied style in RH2022

Community Beginner ,
Nov 05, 2024 Nov 05, 2024

I'm using RH2022.5.28.  We're looking at implementing variables.  But when I add a variable to a heading it doesn't display using the heading style.  The heading is bold and uses a larger font size.  It displays as bold but not in the larger font size. 

780
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

Community Beginner , Nov 07, 2024 Nov 07, 2024

My colleague has just tried it and looked into it further, as it was happening on her projects too.  She's found what was causing it.  The css file has a style called <span>, possibly inserted when we were using Robohelp Classic years ago.  Deleting that style has made it work. 

Thank you for your help.

Translate
Community Expert ,
Nov 05, 2024 Nov 05, 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 Beginner ,
Nov 05, 2024 Nov 05, 2024

No I hadn't.  I can see from that I need to create a separate variable for use in the heading.  That's useful.  Thanks

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 ,
Nov 07, 2024 Nov 07, 2024

You shouldn't need to create a separate variable. It should take the formatting of the paragraph it is placed in.

 

If yuo have applied manual formatting to the variable, of course, then you would need a separate variable, but in most cases this shouldn't be necessary.

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 Beginner ,
Nov 07, 2024 Nov 07, 2024

No. It doesn't seem to work like that.  If I insert variable text into a heading, it doesn't use the heading style.  I have to create another variable for each heading style.  As described in the link I was provided.

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 ,
Nov 07, 2024 Nov 07, 2024

Your code is wrong. 

 

Adding a variable to a heading my code is like this.

 

<h1>Second Topic <span data-keyref="Variable 1">Variable 1</span></h1>

 

Your closing span tag is in the wrong place. If you drag the variable to the heading, it should write it as above.

 

Please use the photo icon to insert images within the post. Seeing an image inline with the text makes it easier for anyone answering or viewing the post.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
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 Beginner ,
Nov 07, 2024 Nov 07, 2024

I don't understand, sorry.  I don't want the variable text at the end of the sentence though, it needs to be at the beginning with text after it, so the span can't be at the end.  And I didn't write the code, that was put in by RH when I inserted the variable.  I didn't add any code to the variable itself.  I'm confused.

 

SSP output.jpg

SSP source.jpg

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 Beginner ,
Nov 07, 2024 Nov 07, 2024

Even if I put it at the end it still doesn't display properly.  Am I misunderstanding this? 

Nikki232229032y98_0-1730984281344.pngNikki232229032y98_1-1730984299458.png

The only way I can get it to work is if I create another variable with the styles applied in the variable itself.  So I need a different variable for each heading style it could be used in. 

Nikki232229032y98_2-1730984496803.pngNikki232229032y98_3-1730984513903.png

 

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 ,
Nov 07, 2024 Nov 07, 2024

Create a new topic just for the purposes of getting the hang of it.

 

The first line should be the default title of the topic and it should be H1 style. Change the text of the heading if you want.

 

Now drag the variable in front of the text. What you should see is the variable in the heading style and then the text.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
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 ,
Nov 07, 2024 Nov 07, 2024

Here's video to show how it is done. After inserting the snippet I have changed to Preview so that you can see it works.

 

https://www.grainge.org/demos/variables/variables.mp4

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
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 Beginner ,
Nov 07, 2024 Nov 07, 2024

Unfortunately that isn't what is happening for me at all.  It does exactly what I've shown in my screenshots.

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 ,
Nov 07, 2024 Nov 07, 2024

There is something else at play here as that is definitely how it should work. I have not seen anyone else report this.

 

If you create a new single topic project, does it work there as I have described?

 

Can you share your problem project? If you can, then see the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
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 Beginner ,
Nov 07, 2024 Nov 07, 2024

My colleague has just tried it and looked into it further, as it was happening on her projects too.  She's found what was causing it.  The css file has a style called <span>, possibly inserted when we were using Robohelp Classic years ago.  Deleting that style has made it work. 

Thank you for your help.

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 ,
Nov 07, 2024 Nov 07, 2024
LATEST

OK. As I said, there had to be something else at play. Glad you have sorted it out.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
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
Resources
RoboHelp Documentation
Download Adobe RoboHelp