We've rolled out some improvements to our formatting engine today, and wanted to let everyone know how to take advantage of them.
For a full specification of formatting on Brilliant, you can review the full formatting guide.
The two new things you'll probably want to know about:
It is now possible to use tables in problems and notes on Brilliant.
This code:
1 2 |
|
produces this:
1 | 2 | 3 | 4 |
a | b | c | d |
There is also a new method for code blocks. Previously, it was necessary to use four spaces before any line of code, like this:
Type this:
1 2 3 |
|
Get this:
1 2 3 |
|
However, we have a new method, which produces the same output and is easier to work with. Now you may simple add three backticks ( ` ) on the lines before and after your code, and you'll get the same result:
Type this:
```
print "Hello World!"
for x in range(5):
print x
```
Get this:
1 2 3 |
|
In addition, the new system allows syntax highlighting for C, Python, and Java code (and many others). Just add the language name in lowercase (c++
or cpp
instead of C++
and javascript
instead of JavaScript
) after the first line of backticks.
Type this:
```python
#A comment
print "Hello World!"
for x in range(5):
print x
```
Get this:
1 2 3 4 |
|
We're excited about these improvements and hope they'll be helpful to you.
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
PSA: It took me a minute to figure this out, a backtick on your keyboard is the key under the escape key. It is the unshifted version of the ~.
Log in to reply
I think I've done too many code reviews, haha, this is a compulsive comment saying that:
Which also happens to add a space implicitly.
Log in to reply
Hm, I didn't know that about the comma. I'll use that in the future. I tend to just use spaces at the end of parts of a concatenation.
Log in to reply
you can instead do:
Log in to reply
Log in to reply
print "something"
rather thanprint("something")
) but for the function this is how I would implement it roughly (Note that I didn't actually look up what it takes to print to the stdout at a lower level, I'm just guessing it's something likesys.print
):*args
grabs all arguments that aren't accounted for and puts them into a list for you to use in the function.**kwargs
does the same for extra keyword arguments.Log in to reply
There is one problem-
When I use this code
I got this
Notice, the third line 'It does nothing.' doesn't have four spaces before it as I wanted. It's not that a big problem but it would enhance readability if you could solve it.
Log in to reply
Cool! Let's see:
Being proficient with LATEX, let's see how that compares with a LaTeX table:
1a2b3c4d
What do you guys think?
Log in to reply
We wanted to offer an easy alternative for those who do not know latex. Typing a bunch of || is much easier than memorizing the array / align environments.
Log in to reply
Also, since we render LATEX on our servers rather than in the browser and display it as an image most of the time, if you have a large table, it'll end up being a lot slower to display/more annoying to work with on some people's computers/internet connections.
Log in to reply
or is Latex still displayed as an image?
Log in to reply
Log in to reply
i think it is outdated because i can copy posted Latex text letter by letter.
i assume if it were a pic, i would not be able to do this.
Log in to reply
Log in to reply
@Percy Jackson @num IC
Yeah, we updated how LATEX is rendered and now render it into code that browsers can understand rather than images on our servers. This means it should be faster for everyone to load even LATEX blocks that take up a lot of screen space.
Log in to reply
Log in to reply
:-)
Log in to reply
Hi, I fixed your comment, you were using normal single quotation marks ' instead of "backticks" which are under the escape key on most keyboards (you may have encountered the tilde ~ more often).
Great update! Keep up the good work and thank you very much, Brilliant.
Can you add IDE (in example: Sphere Engine) into the Computer Science section?
Log in to reply
That is interesting, we will consider that but it probably would not be a high priority feature, we may add a link to http://ideone.com/ for people to use (sorta like we have a link to the Daum Equation Editor from our formatting guide (for users who use the chrome browser since it's a chrome plugin) even though we don't have immediate plans to add any kind of "easy LATEX editor" to Brilliant.)
Also: the syntax highlighting code for C++ is c++ (or cpp) (I've edited your comment so that your code will be properly highlighted). Basically, all of the "codes" are the name of the language in lower case.
Log in to reply
thanks, but I hope the experience will be like CodeForces or any other similar website
How to use the LaTex code has been addressed, too? I read many answers not appearing as examples in the formatting guide, such as this one
\sqrt{2}
cool..
Log in to reply
``` C++
include<iostream>
int main(){ std::cout<<"testing2"<<endl; return 0; } ```