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.
This topic is closed to new replies. Start a new post to keep the conversation going.
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.
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 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.
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.
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.
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.
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.
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.