Ask your own question, for FREE!
LaTeX Practicing! :) 24 Online
OpenStudy (theeric):

How do some people have code in a box? I feel like I knew and used this at one time, but I now forget. The box is shaded dark gray and text appears normal. Thanks in advance!

thomaster (thomaster):

`i think you mean these boxes? :P` You can create them by writing your code or text bewteen 2x ` It's the same key on your keyboard as the ~ above the tab and below the Esc button.

OpenStudy (theeric):

`ah, thank you!` `public static void main(String args[])`

OpenStudy (theeric):

Is there any feature that colors code for specific languages? I think \(\LaTeX\) can do it. I'll research. Thanks!

thomaster (thomaster):

\(\Large\LaTeX\) can probably do that but not here :P This site uses mathjax, and there are only limited functions available.

thomaster (thomaster):

But you can color your code manually

OpenStudy (theeric):

Okay, thanks!

thomaster (thomaster):

`\(\color{>color<}{text}\)`

OpenStudy (theeric):

Gotcha! And I can't use mathjax in the `s, right? `\[\]` So I do it normally and in \] or \) and color it. Thank you!

thomaster (thomaster):

You can also use ``` Some code will be colored, like this: ``` <html> <body> <h1>hello</h1> <script language="JavaScript"> document.write("Hello"); </script> </body> </html> ``` ``` public class Hello { public static void main(String [] args) { System.out.println("Hello"); //comment } } ```

OpenStudy (theeric):

Thank you! I thought OS had a feature like that!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!