Adding code in box on the forum

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
gfd43tg
Gold Member
Messages
949
Reaction score
48
Hello,

I am taking MATLAB this summer and will be having a number of questions on this forum about all my bugged code when I make it. Before I begin, I was wondering how do people add those ''code boxes'' when they make a thread that shows all their code within the post.

Thanks

Example: Post #2 in https://www.physicsforums.com/showthread.php?t=756681
 
Physics news on Phys.org
Just use [noparse]
Code:
[/noparse] tags:

[noparse]
Code:
Matlab
   code
[/noparse]

displays as

Code:
Matlab
   code
 
  • Like
Likes   Reactions: 1 person