This is a guide for those who want to learn use or simple formatting. If you want to contribute on brilliant, then you should use in many cases. This makes your posts more readable.
When you don't know how to write a symbol, then use the Google. I will post there only the important symbols.
There are lots of guides, but I think my guide is the most readale and complete. Let's start the learning.
is a formatting(or markdown) language to format documents or write formulas. In this web page we can't format documents, therefore lots of commands isn't working.
This paragraph will help you to format your posts without . This is a markdown language, like HTML.
What you type What you get *italics*
or_italics_
italics **bold**
or__bold__
bold You can combine the two styles like these:
***Hello!***
*__Hello!__*
___Hello!___
All possible combinations are correct. Each will appear as Hello!.
See this example:
I love to do it
I love to do this
Now try it with two or more spaces at the end of the lines:
I love to do it
I
love
to
do
thisNow try to take empty spaces:
I love to do it
I
love
to
do
this
If you fil the empty lines with spaces you will get the same result. If you want to take more empty sapces you should use codes. But this isn't the section, so let's continue.
> It will appear like this quote
It will appear like this quote
Let's see some examples:
> This is an example
This is an example
Now try it with two or more spaces at the end of each lines:
> This is an example
This
is
an
exampleNow try to connect two quotes:
> This is > an example
This is
an exampleIf you want to separate them, then you should write something between them(this can be an empty code too):
> This is an > example
This is
an
example
- buletted
or* bulleted
or+ bulleted
and1. numbered
Usefull things:
- You always should take an empty line before and after the list(If you don't take before it, then it will appear like a simple text, but if you don't take after it, then the simple text will be
connected to the list) - You should take a space after the - sign
I will show the examples with only bulleted lists:
This isn't a - bulleted list - bulleted list - bulleted list continue - shifted list
This isn't a - bulleted list
bulleted list
bulleted list
continue
- shifted list
Let's see this one:
* It won't * break
It
won't
break
If you should write a date:
1956. Doesn't work 1956\. Yeah
- Doesn't work
1956. Yeah
[<link text>](<link>)
Link text will appear.
[I'm happy](https://translate.google.com/?hl=hu#view=home&%3Bop=translate&%3Bsl=en&%3Btl=hu&%3Btext=I'm%20happy.&op=translate&sl=en&tl=hu&text=I'm%20happy)
There is the empty link
[I'm empty](#)
If you should use a link many times you can define links:
[link][id1] [id1]: https://brilliant.org/discussions/thread/math-prove-marathon/ "Title"
You can use links in too, but this is unnecessary.
When you upload a picture, then you will get a code. You should only insert it, if you placed to the wrong place(or if you want to insert it to the comment section). But when you want to use a
picture from the internet, then you should only copy the link of the picture:
{: .<position>}
The position can be:
left
,center
,right
. If you delete the {} brackets, then it will be left aligned.Let's see an example for the three positions and how to combine links and pictures:
{: .left} [{: .center}](https://d.newsweek.com/en/full/520858/supermoon-moon-smartphone-photo-picture.jpg) Click to the picture! {: .right}
As you can see if the picture isn't center aligned, then the text after the picture's link will appear next to the picture.
The code of the gif files are the same.
You can give a title to your picture. It won't appear:
{: .<position>}
. You can define links to pictures too.
When we are talking about commands, then we use these:
`readln()`
readln()
We can take lots of
`
before it, but then we should take the same amount of this signs after it.If we want line breaks without break the code block:
```python print "This is the best sentence" ```
1print "This is the best sentence"
Sometimes the text after the code block doesn't appear. You should only place a title after the code and it will be good.
If you don't give the name of the programming language:
1print "This is the best sentence"
You should take an empty line before it. If the text after the code block doesn't appear, then take a
#
after the block.
If you take 4 spaces, then it will appear like you typed similar to the quote this will be if you take more than 4 spaces
||1||2||3|| ||4||wide column|| ||||||same|| ||other||table||:)|| ||longer||row||than||the first||
1 2 3 4 wide column same
other table :) longer row than the first
We can create 6 different titles(we can close them, but this is unnecessary):
# I'm your ego ## This is sometimes underlined ## ### I'm your IQ #### Interesting ##### Nothing ##### ###### Thin-king
I'm your ego
This is sometimes underlined
I'm your IQ
Interesting
Nothing
Thin-king
_ =Shift and `-`
If under a text we take a-
or=
these will make a title. If we take an empty line, then these won't:_ title 1 = title 2 - -- * * * * - -
title 1
title 2
@<name>
When you start the typing to mention somebody, then the web page will give you options. If you don't choose one, then it won't work. You should choose the correct option. If the web page don't give you the required name, then continue the typing or try to type the name another way(for example without space).
Idea from Percy Jackson
[[show-hide-button|<Button text>]] [[start-hidden]] <Content> [[end-hidden]]
You can use buttons only in notes, but you can't use nested buttons.
The interpreter should distinct the codes, so we should mark them. We can mark two types of placement:
- \(<code>\)
- \[<code>\]
The first type of placement will appear like this , but the second will like this . Both codes are placed into the sentence, but the second makes a break line before and after itself and the second is center aligned.
Spaces sometimes are allowed, sometimes they are necessary but sometimes they are unallowed. Let's see the rules:
Rule Example code How will ppear Between the brackets the spaces are unallowed \ ( 1+3\ ) \ ( 1+3\ ) In a command the spaces don't allowed \(\ta n(x)\) After a command if the next character is a letter, then the space is necessary \(\tanx\) In other cases the spaces are allowed \(3+4 = 7\) Line breaks are allowed when spaces are allowed \(1 + 3 = 4\) But these spaces won't appear. There you can see how to take a space:
Code Appearance Note \,
\:
\;
\!
If you take more \!
:~
Or you can insert a text or outside the brackets you can take one space. With these codes you can take longer spaces.
You can make special spaces:
|{\kern 1pt} |{\kern 10pt} |{\kern 100pt}|\\ |\hspace{1pt} |\hspace{10pt} |\hspace{100pt}|
is a given length like and . In (and in web building) there are other units, but the main units are:
Let's see how to make line breakes with special length:
4\\[30px]5
You can give not integer numbers and negative numbers also.
54 5\hspace{0.7px}4 5\hspace{-4px}4
Here is some information about other length:
5 in
5 cm
5 cc
5 nc
5 pc
5 em
5 ex
5 mm
5 dd
5 nd
5 px
5 bp
5 pt
5 sp
What you type What you get Note 2=2
1+2
4*6
If you use other commands, then it will appear better 4\times6
If you are on mobile, then maybe you can find it at the symbols 4\cdot6
8/4
you can use other commands too 8\div4
On mobile you can write it without code \frac{8}{4}
You can use modificators. \frac 123
will be{3\choose2}
\binom{3}{2}
2^3
If you want to write , than you should write 2^{33}
, without the { and } brackets it will appear like this2^{3^3}
If you don't write brackets: 2^3^3 A_1
Same way as ^
if you want to write more characters you should use { and } bracketsA_{1_2}
\sqrt{3}
\sqrt[4]{5}
\parallel
\perp
After the basic operators let's see some often used commands. There are some built in functions like
\tan
,\log
,\gcd
,\mod
.... We can avoid them, but using them is easier. Let's see anexample:
\tan(x)=1
andtan(x)
will appear like and .
\left ( \right )
\left \| \right \|
\left [ \right ]
\left \langle \right \rangle
\left \{ \right \}
\left \lfloor \right \rfloor
\left | \right |
\left \lceil \right \rceil
Sometimes we should use modificators. Let's see an example: . As you can see this is too small. The modificators help us to set the size of the operators.
If we use the
\displaystyle
modificator before each fraction, then it will set the size automatically:
\displaystyle\frac{\displaystyle\frac{2}{\displaystyle\frac{5}{6}+7}+3}{4^8}
This is a long way to solve this problem, so we can use
\dfrac{}{}
. We will get the same result. With fractions there are some more modificators. Let's see all of them in one table:
Code Appearance \frac{2+\frac{1}{5}}{\frac{7}{6}+4}
\displaystyle\frac{2+\displaystyle\frac{1}{5}}{\displaystyle\frac{7}{6}+4}
\dfrac{2+\dfrac{1}{5}}{\dfrac{7}{6}+4}
\cfrac{2+\cfrac{1}{5}}{\cfrac{7}{6}+4}
\tfrac{2+\tfrac{1}{5}}{\tfrac{7}{6}+4}
Here is two examples with :
Code Appearance 2\mod4
2\bmod4
2\pmod4
The
\displaystyle
won't do anything.In some cases the
\displaystyle
works only. Let's see some examples(I wrote the modificators before the operators):
Original Modificated Sometimes modificators cause some problem:
You can try the
\displaystyle
won't help. When we use brackets we use the\left
and the\right
modificators:
\left ( \dfrac{\dfrac{4}{6}+2}{1} \right )
But sometimes we use only one bracket(usually when we are working with a matrix). Let's see an example:
\left | \dfrac{\dfrac{4}{6}+2}{1}
\left | \dfrac{\dfrac{4}{6}+2}{1} As you can see it's not working perfectly. When we start a bracket with a modificator then we should mark the pair of it and same way we can't end a bracket if we didn't marked the pair of it. The solution is easy:
\left | \dfrac{\dfrac{4}{6}+2}{1} \right.
You can make left and center aligned equations already. But sometimes we make lots of modifications on only one side of the equation. Let's see that:
\begin{align} A&=(4x+5)^2-8\\ &=16x^2+40x+25-8\\ &=16x^2+40x+17 \end{align}
& means that where will the lines aligned. So the next characters after the & signs will make a straight vertical line. The \ signs means the line break. We should not take a line break after these signs, when we write the code, but if we take we can modificate easier it. We can use
align*
too, but it doesn't make anything. Let's see an interesting example:\begin{align} 1&=333&=333&=22&=22&333&=22&=1\\ 1&=22&22&=333&=22&1&=1&=22&=5&=1\\ 4444&=1&=1&=1&=333&333&=4444&=1&=22&=55555\\ &&&&4444\\ 22 \end{align}
- Only each second & will be aligned into a line
- We can skip lines with more & signs
- Not only the = can make a straight line
Only the often used special characters:
\rightarrow
\Rightarrow
\leftarrow
\Leftarrow
\uparrow
\Uparrow
\downarrow
\Downarrow
\pm
\mp
\leq
\geq
\lfloor
\rfloor
\lceil
\rceil
\therefore
\because
\angle
\triangle
\equiv
\approx
\in
\ni
\ll
\gg
\neq
|x|
,|=AltGr+W
\infty
As you can see there are modifications of the arrows. If you start with a big letter you will get a double arrow. You can use modificators too:
long
,leftright
,updown
There are lots of characters. I won't write all of them. Here you can see more characters.
Let's see the big operators:
\int
\iint
\oint
\sum
\prod
\bigcap
\bigcup
\Alpha
and\alpha
and \Nu
and\nu
and \Beta
and\beta
and \Xi
and\xi
and \Gamma
and\gamma
and \Omicron
and\omicron
and \Delta
and\delta
and \Pi
,\pi
and\varpi
, and \Epsilon
,\epsilon
and\varepsilon
, and \Rho
,\rho
and\varrho
, and \Zeta
and\zeta
and \Sigma
,\sigma
and\varsigma
, and \Eta
and\eta
and \Tau
and\tau
and \Theta
,\theta
and\vartheta
, and \Upsilon
and\upsilon
and \Iota
and\iota
and \Phi
,\phi
and\varphi
, and \Kappa
,\kappa
and\varkappa
, and \Chi
and\chi
and \Lambda
and\lambda
and \Psi
and\psi
and \Mu
and\mu
and \Omega
and\omega
and
{}'
{}''
\dot{}
\ddot{}
\hat{}
\check{}
\grave{}
\acute{}
\tilde{}
\breve{}
\bar{}
\vec{}
\not{}
^{\circ}
\widetilde{}
\widehat{}
\overleftarrow{}
\overrightarrow{}
\overline{}
\underline{}
\overbrace{}
\underbrace{}
\overset{}{}
\underset{}{}
\xrightarrow[]{}
\xleftarrow[]{}
In every case the first brackets contain the
123
. You can see we can't useoverset
andunderset
at the same time. Instead we can use arrays and matrices. The brackets can contain arrows also:And there is one interesting thing:
\boxed{12.5}=\fbox{12.5}
And we can do this:
\cancel{123456789}
\text{}
between the brackets everything will appear.
\text{I'm happy...}
Code Appearance Code Appearance \textnormal{}
\mathnormal{}
\textup{}
\boldsymbol{}
Note: with this code we can print bold symbols: \textbf{}
\mathbf{}
\textit{}
\mathit{}
\textrm{}
\mathrm{}
\textsf{}
\mathsf{}
\textrm{}
\mathrm{}
\texttt{}
\mathbb{}
\textmd{}
\mathcal{}
\mathfrak{}
These are unnecessary codes, you shouldn't learn them. As you can see only the text formats will display the spaces.
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
If we place the code in a title:
There are built in colores:
\red{}
,\blue{}
,\green{}
,\orange{}
etc.
We can use
\color{}
. Between the brackets we should give the name of the color. This will be active until you don't change the color again.There are two ways to give the color:
\color{red}
,\color{blue}
,\color{black}
- With hexadecimal code:
\color{#<code>}
Let's see an example to the second: If our color is the basic red, then with RGB()
coloring:
So the code will be
\color{#FF0000}
:Let's see a complex color:
#4DA3EC
Here you can set the color and get the code of it.
If we use the
color
command between two{ }
brackets, then the text after the brackets won't be colored:{\color{green}green}black
Let's see an interesting example:
\color{red}red{\color{green}green}unknown
We can use
\textcolor{}
also:\textcolor{red}{red}
\textcolor{red}red
But we can make color boxes:
\colorbox{blue}{black\color{#FFFFFF}white}
And we can make color boxes with border:
\fcolorbox{red}{blue}{\text{The text command include the whole text, but the brackets are necessary}}
Matrices are similar to tables and to the aligned equations. & means the next column an \ means the next row(If \ is annoying, then you can use
\cr
):\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{matrix}
Like with tables, there you can skip columns and you can make longer rows than the first:
\begin{matrix} 1 & 2 & 3\\ 1 & 2 & 3 & 4 & 5\\ &&3&&5 \end{matrix}
You can see if we won't write a whole line we can skip the & symbols. And you can see also that I taked a line break, but it doesn't displayed.
Let's see the types of the matrices:
pmatrix
\begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{pmatrix}
bmatrix
\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}
Bmatrix
\begin{Bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{Bmatrix}
vmatrix
\begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{vmatrix}
Vmatrix
\begin{Vmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{Vmatrix}
But we can use special matrices too:
\left\{\left. \begin{matrix} 1 & 3 & 5\\ 7 & 4 & 9 \end{matrix}\right |\right.
But we can place a matrix into another matrix:
\begin{matrix} 1 & \begin{matrix} 2 & 3\\ 4 & 5 \end{matrix}\\ 6 & 7 \end{matrix}
We can insert horizontal lines into the matrix with
\hline
:\begin{matrix} 2 & 4\\ \hline 5 & 6 \end{matrix}
If we need a vertical line, then we should use two matrices or use an array. Let's see the arrays.
The arrays are similar to matrices, but when we begin an array, then we should give the align of each colummn:
\begin{array}{<align>} <array> \end{array}
<align>
can be:
- c - center
- l - left
- r - right
If we have more columns than that we have declared we will get an error message. But we can skip the empty columns. Let's see an example:
\begin{array}{lcr} 7777777 & 4444 & 666666\\ 4444 & 1\\ 22&&999999999 \end{array}
Now let's see how to insert a vertical line:
\begin{array}{c|c} 1 & 2\\ 3 & 4\\ 5 & 6\\ \end{array}
\begin{cases} y=1 & x=5 \\ y=2 & x=4 \\ y=3 & x=3 \\ y=4 & x=2 \\ y=5 & x=1 \end{cases}
You can't add new columns. But if you insert a matrix, then you can solve it.
There are lots of dots. Here you can see the main codes(from wikibooks):
\dots
Generic dots (ellipsis), to be used in text (outside formulae as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command. \ldots
The output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level. \cdots
These dots are centered relative to the height of a letter. There is also the binary multiplication operator, \cdot, mentioned below. \vdots
vertical dots \ddots
diagonal dots
This web page doesn't support all codes. Therefore we can't use lots of not mathematical codes. I think only basic formatting, chemical equations and square drawing are supported. Let's see the chemical equations:
You can already write chemical equations:
\text{CH}_4+2\text{O}_2\rightarrow2\text{H}_2\text{O}+\text{CO}_2
But this can be easier:
\ce{CH4 + 2O2 -> 2H2O + CO2}
Here you can see the main things(these are the examples from there):
\ce{H2O}
\ce{CrO4^2-}
\ce{A <--> B}
\ce{A ->[x_i] B}
\ce{CO2 + C -> 2 CO}
\ce{A\bond{~--}B\bond{~=}C\bond{-~-}D}
Spaces are necessary
And the square drawing:
\rule[raise]{width}{height}
\rule{78pt}{.4cm}\color{red}\rule[.2cm]{24px}{2 mm}\hspace{-24px}\color{blue}\rule{24px}{2mm}
For more information see: 3.2. Spaces and line breaks
- Don't write a lot of text in . This can be annoying, and in small screens others can't read your text
- Make your code always readable. If you have an error, then you can edit it quickly
- If you can't follow your brackets, then take line breaks or spaces
- Remember to check the spaces after each codes
- Always check the end of the code. If your code doesn't end, your will face many errors.
- Use readable font size, but not too big (
\LARGE
is usually too big).- Use the Preview button before you post something. The sometimes doesn't displayed. Use any online editor to see your codes
- If you have written a lot of code, then save it, as the web page doesn't always save your codes.
- Don't copy codes from others
You can make symbols with negative spaces, rectangles, characters.... There are two examples from my note about programming tasks:
Make a special symbol and I will include it
And the big question:
\LaTeX
Here is a cool website, where you can make equations without learning codes.
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
Excellent LaTeX formatting guide! I am saving this one...
Log in to reply
Thank you! I'm working on this yet
Log in to reply
Don't worry. I put it in my saved collection!
Huhh! I extended it.
Log in to reply
I hope this is better
Log in to reply
Now this is complete :) Maybe some codes are missing, but I think I finished it
Log in to reply
Log in to reply
Golden ratio
@Jeff Giff Here is a new formatting guide for Radmaths !
Log in to reply
@Jeff Giff See what will happen if you click to the link to this guide. Delete your link's last section from there: ?from_notification=...
Log in to reply
And thank you!
Red Maths LOL :)
Log in to reply
Its RADMaths, but...
Log in to reply
Log in to reply
Log in to reply
Log in to reply
there you can understand it
I think he can use the rad word. FromLog in to reply
Log in to reply
redmath is rad. BTW this isn't important
Log in to reply
Great! The only one with the cases, which I once spent AN HOUR looking for :P
Log in to reply
Thank you!
WHA WHAAA WHAAAAAAAAAAAAAAAA! How much time do you have? I've got 30 minutes a day to update my guide lol, this one is way better. Awesome @Páll Márton - This deserves to be turned into a Latex wiki, maybe you should ask Brilliant Mathematics, Calvin Lin, or someone else.......................
Log in to reply
Yeah, I have a lot of time. But I think the wiki page is better. I wanted to make an example, where you should search the error, but this take a lot of time
Log in to reply
Yours is better than wiki page, as you have more than what the wiki has, just ask some moderator or something dude, this is good stuff
Log in to reply
LATEX. There you can see more codes. But you are right, because some codes are missing.
The wiki page is about onlyWait... the mod and bmod. Wrong code.
Log in to reply
Why? If you write only
\mod
then it won't work, but~\mod~
modLog in to reply
No, look- a≡bmodn,amodn,a(modn) , mod, bmod, pmod
Log in to reply
a\equiv b \mod n,a \bmod n, a\pmod n
so the codes are good.Log in to reply
Log in to reply
Log in to reply
Log in to reply
⟨1∣ \bra{1}, for qubits
Jeff Giff isn't annoying in a He-is-a-idiot kind of way
More like a Leo-kind-of-way, so nothing bad about it :)
facepalm isn't funy, its funny :)
The jokes were courtesy of Leo, but they were pretty non-funny, if that's even a word.
Happy 7.27 day!
Before you ask what 7.27 day is its today 7/27/2020, why you may ask, because a super complex number like pi has a day, why not 7.27 :)
@Páll Márton - How do you make that box, where latex doesn't work, the one where you write your syntax, and the one where you wrote the latex commands for greeks letters as an example, your guide is very long, so i didn't find it LOL
Log in to reply
2.7. and 2.8. Code blocks and Formatted box :)
Log in to reply
Ctrl+f
Got it, thanks!
@Páll Márton
Log in to reply
Yeah.
Log in to reply
You are welcome!
@Percy Jackson Should I make the whole note with buttons? I think you can use it easier if you should press only a button to see the content.
Log in to reply
buttons- 2.13 :)
Yeah, it would seem easier to just click what you want to read instead of scrolling. Nice job on the buttons, and thanks for the mention! Buttons can only be used in notes and wikis, not even problems so change that last statement a bit @Páll Márton :)
@Brilliant Mathematics There is a problem with this note. I have a document with the code of it. It is working, but there isn't. Can you help me? This is a very common problem. Once at the daily chalanges and once under @Percy Jackson's note. Thank you! P.S.: Who should I mention next time if I have a similar problem?
Log in to reply
Thanks. I've fixed it for you by removing the following text.
2.3. Quote}\\[-5px]\hspace{300px}\)]]
Yes, this is a common problem. Our engineers are on it. I will set-up a note to let other users notify me in 10 minutes.
Log in to reply
@ Páll Márton, here you go!
Log in to reply
[[show,-hide-button
Log in to reply
@Páll Márton!
Now your Guide is even betterLog in to reply
Log in to reply
Really the best LATEX formatting. My saved and bookmarked page for referring LATEX. :) @Páll Márton
Log in to reply
Thank you!
You can also use \LaTeX{} ⇒ LATEX.
Log in to reply
but \LaTeX is easier and shorter to type.
Log in to reply
Yeah. The \LaTeX{} is one \LaTeX command and an empty block {}
Log in to reply
is the page itself done in Latex? if so: how do u print a backslash and opening brackets just as text?
like this "\(" . if i use \backslash it creates a thin backslash: \ but how do i write a normal one like this: \
Log in to reply
On a normal QWERTY keyboard, the backslash is usually above the enter key.
Log in to reply
;-) ;-) if i write \ in a latex block, then it is not shown because it is a special symbol.
my question is how to show a "normal" backslash like this: \
in a latex block and not a thin one like this: \
\(\) without spaces \ \ ( \ ) ( \ \ )
Log in to reply
\(\) u are great ty
ty again. is there a similar solution for the centering brackets: []?
when i try: \ \ [ \ ] [ \ \ ] without spaces. it creates this: \[\]
\(\) - Thnx @Páll Márton (no activity)
@Percy Jackson
What do the measurement abbreviations stand for?
Log in to reply
px = pixel :)
Thank you SO MUCH! I was wondering how to write LATEX for so long...
Log in to reply
He’s gone from brilliant anyways :/