Code snippets for print vs web

4 views
Skip to first unread message

Ben Mansheim

unread,
Feb 19, 2012, 8:21:49 AM2/19/12
to author-...@googlegroups.com
Anyone have suggestions for how to handle presenting code snippets in print and web?

My inclination would be to put it in a grey box (ie table cell). However the box can only be 16 cm wide in print and will require long lines to wrap, whereas it can be much longer on a web page to avoid wrapping lines. In AIT, the table width is set the same for both print and web.

Looking forward to your creative replies.

Ben

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
Ben Mansheim
b...@mansheim.com
home 077-440-3105
cell 052-691-6188
US 401-441-5473 (however we are still 7 hours ahead of Eastern time)

Phil Americus

unread,
Feb 19, 2012, 8:45:02 AM2/19/12
to author-...@googlegroups.com
Why not just use a "code" style and give the text a gray background in the "Web" tab for the style? (FYI: This is similar to the Note style)

Regards,
Phil
--
----------------------------------------------------------------------------
Note: I have a new cellphone number: 054-520-3658
----------------------------------------------------------------------------

Phil Americus | Senior Technical Writer
Mobile: 054-520-3658

Ben Mansheim

unread,
Feb 19, 2012, 9:22:44 AM2/19/12
to author-...@googlegroups.com
If I do that, then the background color be with the text,
Instead of creating a nice even block of grey.

That's a good try but not exactly what I'm looking for.


#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
Ben Mansheim
b...@mansheim.com
home 077-440-3105
cell 052-691-6188
US 401-441-5473 (however we are still 7 hours ahead of Eastern time)


Yehuda Rock

unread,
Feb 19, 2012, 9:32:35 AM2/19/12
to author-...@googlegroups.com

Ben, in Word you need to apply Shading to the Paragraph rather than to Text (I think this should be the only option when modifying the pgph style).

Miriam Lottner

unread,
Feb 20, 2012, 1:46:59 AM2/20/12
to author-...@googlegroups.com

Why not just modify the help style to size accordingly in HTML?

This can be done and we do it for other customers (for table widths also-here you want a table width of X in PDF but Y in HTML).

Miriam

 

Miriam Lottner | CEO 

T: 077.200.6818  M: 054-530-2308

mir...@tech-tav.com |  www.tech-tav.com | www.tech-tav.com/technical-writing-blog

 

tech-tav-sig-file.gif

image001.gif

Ben Mansheim

unread,
Feb 20, 2012, 2:38:51 AM2/20/12
to author-...@googlegroups.com
Hi all,

Sorry, it was a false alarm. I published a test of both the Word and HTML and the table is extended in the HTML to contains all of the text without wrapping.

Thanks for you attention, though.


Ben

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
Ben Mansheim
b...@mansheim.com
home 077-440-3105
cell 052-691-6188
US 401-441-5473 (however we are still 7 hours ahead of Eastern time)


image001.gif
Reply all
Reply to author
Forward
0 new messages