p.note with left image and indented text

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
John Owens
Propeller Head
Posts: 31
Joined: Sun Aug 30, 2009 2:59 am

p.note with left image and indented text

Post by John Owens »

Is there a simple way to add an image to the left of a note, without using a 2 column 1 row table. I currently have 1000s of p.notes with only a background color and top/bottom borders. I want a painless way to convert these all to No background color; add an image and top/bottom borders. I know I can do this via the background image property, HOWEVER Word does not understand this, and even though our final output is PDF and CHM, our reviewers only use Word. I already have to explain to them why our cover page and two column index are not working in Word, but to have to tell them to disregard 1000s of notes, is too much.

While we are at it using images for bullets do not work in Word either... solution?
Thanks in advance for any help.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: p.note with left image and indented text

Post by LTinker68 »

No, there's no solution. Word doesn't support quite a few of the CSS specifications. Well, Word 2003 doesn't, and I don't recall anyone mentioning that Word 2007 was any better. No idea about Word 2010. You can submit a bug report at http://www.madcapsoftware.com/bugs/submit.aspx, but I'm not sure how much MadCap can do to fix it, since it's more an issue on Word's side.

BTW, I don't know about the background image on a paragraph note, but there is a relatively easy workaround for images in a bulleted list. Once you build the Word output, open the output in Word and modify the list style that was created and reselect the image file you used for the bullet images.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: p.note with left image and indented text

Post by ChoccieMuffin »

Word 2007 does drop caps, so could you fudge it by a global change before producing the Word docs to change your graphic to a drop cap - pick a letter and let people just assume that whenever they see a drop cap W for example, that's the Note icon. You'd have to have a play at producing a drop cap in Flare, export it to Word to see if it would do the trick from a spacing point of view, and then have a go at doing a Search and Replace throughout the code. I know it's not the perfect solution but it might just about do the trick, seeing as it's just for reviewing purposes rather than for publication. I haven't tried it so it might be a very silly suggestion, but might be worth spending a few minutes on.

Is that any use? (Sometimes the box needs to be ignored, not just thought outside of.)
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
John Owens
Propeller Head
Posts: 31
Joined: Sun Aug 30, 2009 2:59 am

Re: p.note with left image and indented text

Post by John Owens »

LTinker68 wrote:No, there's no solution. Word doesn't support quite a few of the CSS specifications. Well, Word 2003 doesn't, and I don't recall anyone mentioning that Word 2007 was any better. No idea about Word 2010. You can submit a bug report at http://www.madcapsoftware.com/bugs/submit.aspx, but I'm not sure how much MadCap can do to fix it, since it's more an issue on Word's side.
Thanks for your reply. I was hoping that MadCap would be able to port it to something that Word would understand...guess not
LTinker68 wrote: BTW, I don't know about the background image on a paragraph note, but there is a relatively easy workaround for images in a bulleted list. Once you build the Word output, open the output in Word and modify the list style that was created and reselect the image file you used for the bullet images.
I tried this but MadCap exports both the level 1 image bullet list items and the numbered list items as l_1, so when I use Word to modify the list style, it makes both the numbered and bulleted list the same. Since all Flare CSS properties for both the ol and ul are the same except for the Autonumber in ol and the image in the ul, maybe Flare decides that this is close enough and exports them as the same Word style. I guess i could modify the ol indentation a little so that Maybe Flare would recognize it as a different style.

Probably the best bet is to add a new media in the style sheet, specifically for Word and use my old styles for it. I haven't done that before, right now we have the default media and the Print media, I guess I can add a Word media???
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: p.note with left image and indented text

Post by NorthEast »

John Owens wrote:Probably the best bet is to add a new media in the style sheet, specifically for Word and use my old styles for it. I haven't done that before, right now we have the default media and the Print media, I guess I can add a Word media???
I was just going to suggest that - it's what we do. Yep, you can add your own media type and set alternative styles in there that are Word-friendly; e.g. for notes you could just display the text 'Note:' using an autonumber.
John Owens
Propeller Head
Posts: 31
Joined: Sun Aug 30, 2009 2:59 am

Re: p.note with left image and indented text

Post by John Owens »

Thanks All. Well now that that is fixed...one more.

I am using a div to display command line code (to simulate screen output)...but Word doesn't recoginize div's either. Is there another way to do this without using a div, something that will work on all targets?
Basically I want a light gray background with all my code displayed in a monospaced font.

Something that I could replace the following div with

div.CommandLine
{
font-family: 'Courier New', monospace;
background-color: #dcdcdc;
font-size: 8pt;
padding: 2px;
}
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: p.note with left image and indented text

Post by LTinker68 »

Try using the pre tag. I don't know if Word recognizes it, but others have mentioned using it for displaying code. I believe it also preserves spacing.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
TheGreatAndPowerfulOz
Sr. Propeller Head
Posts: 131
Joined: Mon Apr 24, 2006 12:52 pm
Location: Glen Mills, PA

Re: p.note with left image and indented text

Post by TheGreatAndPowerfulOz »

Dave Lee wrote:I was just going to suggest that - it's what we do. Yep, you can add your own media type and set alternative styles in there that are Word-friendly; e.g. for notes you could just display the text 'Note:' using an autonumber.
David,

I've been looking for a way to display "Note:" for my <div.note> elements when outputting to PDF, since the background image I have defined for them doesn't come through (works great in WebHelp and CHMs, tho!). Can you elaborate on what you mean by "using an autonumber"? I'm kind of a newbie to printed output, and I don't know much at all about the autonumber functionality in Flare.

BTW, here's how I have my notes defined in my CSS. If there's something else I should do to simply make my PDF output respect the background image, please advise!

Code: Select all

div.note
{
	background-image: url('../Media/Note24x24.png');
	background-repeat: no-repeat;
	background-position: 5.00px 12.00px;
	background-color: rgb(255, 255, 255);
	border: 1px solid #aaa;
	text-align: left;
	vertical-align: middle;
	float: none;
	height: auto;
	margin-top: 1.00em;
	margin-bottom: 1.00em;
	margin-left: 0.00em;
	margin-right: 0.00em;
	padding-top: 0.00em;
	padding-bottom: 6.00px;
	padding-left: 34.00px;
	padding-right: 5.00px;
}
Austin Wright

Flare 2022 r3 (18.2.8431.26678) :: TopNav HTML5 / PDF output
TheGreatAndPowerfulOz
Sr. Propeller Head
Posts: 131
Joined: Mon Apr 24, 2006 12:52 pm
Location: Glen Mills, PA

Re: p.note with left image and indented text

Post by TheGreatAndPowerfulOz »

David / all,

I did a little more reading in Flare's Help regarding the auto-number functionality and came up with the following for my printed output:

Code: Select all

@media print
{
	div.note
	{
		mc-auto-number-format: '{b}Note:{/b}';
		mc-auto-number-position: inside-head;
		padding-left: 5.00px;
	}
}
This serves to scoot the text contained the <div> element over to the left (whereas it's normally moved right 34 pixels to account for the image used in WebHelp output), and place the 'Note:' text above it all within the <div>.

This is a great solution for my printed output. Thanks for heading me in the right direction, Dave! :)
Austin Wright

Flare 2022 r3 (18.2.8431.26678) :: TopNav HTML5 / PDF output
Darci
Propeller Head
Posts: 14
Joined: Wed Apr 23, 2008 11:49 am

Re: p.note with left image and indented text

Post by Darci »

I apologize if this was already answered. I have done this creating a p.note tag. See the old posts at http://forums.madcapsoftware.com/viewto ... =12&t=4414.

You may have to play with the initial style to get the margins, padding and image setup just right. But once you do, you can just copy to create other similar styles with different images.
I also have p.caution, p.tip, p.stop, p.extra, etc. In Word, you can create a style for each one, but it doesn't matter what it looks like in Word; then when you import into Flare, you just map the similar named Word style to the preferred p.note or whatever style you want in your Flare CSS.

Then if you plan to output back to Word, the image won't show up in the output, but you can just creat a Word or Print style that doesn't try to include the Image OR in your Word document styles, you can create a matching style.

In the Flare back to Word output, you may have to do a find and replace to apply the different desired Word styles for your notes and cautions.

I hope this was helpful. At least for the WOrd-to-Flare process, I have been successfully using these styles and mapping into Flare for three years with no issues.

Thanks and have a great day!

Darci
Darci

Certified MadCap Advanced Developer, v8


"Improving the world, one word and one pixel at a time."
Post Reply