Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Forum Support
 Inserting code or formatted text in your post
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

francis.favorini
Forum Admin

USA
618 Posts

Posted - Apr 16 2003 :  6:08:05 PM  Show Profile  Visit francis.favorini's Homepage  Reply with Quote
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

IT Director, Brain Imaging and Analysis Center
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.46 seconds. Snitz Forums 2000