Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 Forum Support
 Inserting code or formatted text in your post

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
francis.favorini Posted - Apr 16 2003 : 6:08:05 PM
Folks,

If you have source code or other text that you want formatted exactly as entered, you should use [code][/code] tags around it. This will preserve whitespace and line breaks exactly as they are. Long lines will not be broken.

The way you use these tags is similar to HTML. Place the text you want to be formatted in between the opening and closing tags. Like this:
[code]Text to be formatted[/code]

You can type the tags along with the text of your post or you can use the formatting buttons. Just select your text and click the button. When editing your post, you can change the Format Mode setting from Basic to Help or Prompt. Then click on one of the Format buttons for help or to be prompted for the formatting options.

There is a section in the FAQ which enumerates the formatting tags you can use. There is also a Forum Code link above the smilies on the posting page which has the same info.


Example without code tags

if (strncmp(P(end-2:end),'img',3) & exist(P2,'file')) | ...
strncmp(P(end-2:end),'hdr',3)
[DIM,VOX,SCALE,TYPE,OFFSET,ORIGIN,DESCRIP] = spm_hread(P);
else
V = readmrtest(P,'=>INFOONLY');
if ~isempty(V)
DIM = [getfield(V.info.dimensions,{1},'size'),...
getfield(V.info.dimensions,{2},'size'),...
getfield(V.info.dimensions,{3},'size')];
else
error(sprintf('Error reading %s.',P));
global DIM VOX SCALE TYPE OFFSET ORIGIN
DESCRIP = ['defaults'];
end
end


Example with code tags

if (strncmp(P(end-2:end),'img',3) & exist(P2,'file')) | ...
    strncmp(P(end-2:end),'hdr',3)
  [DIM,VOX,SCALE,TYPE,OFFSET,ORIGIN,DESCRIP] = spm_hread(P);
else
  V = readmrtest(P,'=>INFOONLY'); 
  if ~isempty(V)
    DIM = [getfield(V.info.dimensions,{1},'size'),...
        getfield(V.info.dimensions,{2},'size'),...
        getfield(V.info.dimensions,{3},'size')];
  else
    error(sprintf('Error reading %s.',P));
    global DIM VOX SCALE TYPE OFFSET ORIGIN
    DESCRIP = ['defaults'];
  end
end

-Francis

BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.44 seconds. Snitz Forums 2000