I would like to add elements like Example, Note, Caution, Related Topics, ... But later I might want to add a symbol/picture or put the element in a box. Or I might want to change the picture, box, font, color, background color, indentation, etc.
How do I set up an Example "style," so that later I can make changes in one place and all my Examples change?
Thank you.
Example, Note, Caution, Related Topics, ... syles
-
Daniel Ferguson
- Propeller Head
- Posts: 77
- Joined: Wed Jul 10, 2013 12:34 pm
- Location: Salt Lake City
- Contact:
Re: Example, Note, Caution, Related Topics, ... syles
You'll want to set up classes in your stylesheet for each element. In your example, you may end up with classes like "p.example", "p.note", "p.caution", and "p.related" in your stylesheet. To add these classes, open your stylesheet in Flare, highlight the element to which you want to add a class (in this case, it would be the "p" tag), and then click "Add Class" in the toolbar. You can then add your classes and style them however you want.
After you've defined your style classes, you can apply them to the appropriate elements in your topic files. My preferred method of doing this is to right-click on the structure bar for that element, and then to select "Style Class > [your style]." For example, if you had a paragraph that you wanted to be a note, you would right-click the "p" structure bar for that paragraph, and then select "Style Class > p.Note."
Now, any change that you make to the p.Note class in your stylesheet will automatically apply to every paragraph with a class of Note in your project.
Hope this helps.
After you've defined your style classes, you can apply them to the appropriate elements in your topic files. My preferred method of doing this is to right-click on the structure bar for that element, and then to select "Style Class > [your style]." For example, if you had a paragraph that you wanted to be a note, you would right-click the "p" structure bar for that paragraph, and then select "Style Class > p.Note."
Now, any change that you make to the p.Note class in your stylesheet will automatically apply to every paragraph with a class of Note in your project.
Hope this helps.
Re: Example, Note, Caution, Related Topics, ... syles
Just to add to what Daniel wrote, depending on how you want the example, note, etc., to look, you might have to go with a div inside a div. If you can get the effect you want with a paragraph, I'd go with that, but for certain designs, you might have to get fancier.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Example, Note, Caution, Related Topics, ... syles
Daniel,
Thank you.
The problem with using just styles is that it only affects the style. When if I want the word "Example" centered at the top of every example? Or I want the examples numbered?
I think the styles approach takes care of the formatting elements within the example but not elements surrounding the example.
Richard
Thank you.
The problem with using just styles is that it only affects the style. When if I want the word "Example" centered at the top of every example? Or I want the examples numbered?
I think the styles approach takes care of the formatting elements within the example but not elements surrounding the example.
Richard
Re: Example, Note, Caution, Related Topics, ... syles
You can use the mc-auto-number-format attribute to add the word "Example" to a paragraph or div class (or list, etc.). It's the same as adding "Figure" before figure captions. You might need to play with the styles a bit, though, perhaps include a span class, if you want the text "Example" to hang outside the example content.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Example, Note, Caution, Related Topics, ... syles
You might also find this forum post relevant to what you're trying to do: http://forums.madcapsoftware.com/viewto ... 68&p=93098
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Example, Note, Caution, Related Topics, ... syles
check out twitter's styles for these. very nice, standardized look great and free to use!