Citizendium Forums
November 24, 2009, 10:19:58 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: POSTING RULES FOR MAIN CZ BOARDS: (1) The CZ Forums are Citizens-only (a "Citizen" is a Citizendium member). Non-Citizens may use only the "Non-member discussion" and "General help" boards, but still must register before posting (it's easy!). Non-Citizen posts elsewhere will be summarily deleted. (2) All must now use their own real names. To edit your displayed name, click on Profile > Account Related Settings. (3) Citizens must now link to their CZ user pages. To edit your signature, click on Profile > Forum Profile Information.
Click here to return to the wiki
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Getting character data from a text document to format exactly as written  (Read 2291 times)
Howard C. Berkowitz
Forum Regular
****
Posts: 1763


« on: August 23, 2008, 09:51:22 AM »

Please see the Transmission Control Protocol article, section "Segment fields".  You'll have to look at it in edit mode to see what I'm trying to do, but, essentially, the source of the material I want to paste is an "ASCII picture". I am guessing that at least some combination of nowiki and code will make this happen, and I hit one random combination that got the latter part to display correctly -- but could not get it to work for the entire graphic.

Protocol field diagrams of this type are a standard convention in IETF specifications, which are public domain.  There are other places where I really would like to cut, paste, and issue a few metacommands, rather than have to build the graphic in a draw package, produce a PNG, upload, and then go through the image sizing and positioning details.

Help!
Logged

http://en.citizendium.org/wiki/User:Howard_C._Berkowitz

Prime Minister, you can't take the bull by the horns if you're grasping the nettle. I mean, if you grasped the nettle with one hand, you could take the bull by one horn with the other hand, but not by both horns because your hand wouldn't be big enough, and if you took a bull by only one horn it would be rather dangerous because...' (Yes Prime Minister II, pp. 221-2)
Derek Harkness
Forum Regular
****
Posts: 543


« Reply #1 on: August 23, 2008, 08:49:26 PM »

It's simple really. To make text preformated and using a mono-spaced font (such as courier) just put a space " " before each line or else wrap the whole thing inside <pre> and </pre> tags.

I've done it for you.
Logged

Howard C. Berkowitz
Forum Regular
****
Posts: 1763


« Reply #2 on: August 23, 2008, 09:36:25 PM »

It's simple really. To make text preformated and using a mono-spaced font (such as courier) just put a space " " before each line or else wrap the whole thing inside <pre> and </pre> tags.

I've done it for you.

Thanks much! Your more comprehensive text here cleared up my confusion in edit mode; I misread your note to mean that both the space and <pre></pre> tags were needed.

In restrospect, you've explained why I would get weird formatting when I'd accidentally put a space in front of text, and it would disappear off the right margin. Since there were no hard carriage rerturns as there are for the RFC, there was nothing to tell the formatting engine to end the line.
Logged

http://en.citizendium.org/wiki/User:Howard_C._Berkowitz

Prime Minister, you can't take the bull by the horns if you're grasping the nettle. I mean, if you grasped the nettle with one hand, you could take the bull by one horn with the other hand, but not by both horns because your hand wouldn't be big enough, and if you took a bull by only one horn it would be rather dangerous because...' (Yes Prime Minister II, pp. 221-2)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!