Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Are you following this page? - https://www.grainge.org/RoboHelp_Tour/rh2022/authoring/variables.htm
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Even if I put it at the end it still doesn't display properly. Am I misunderstanding this?
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Unfortunately that isn't what is happening for me at all. It does exactly what I've shown in my screenshots.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now