[math]LaTeX[/math] General

ITT [math]\LaTeX[/math] related things:
>pls halp how do I use [math]\LaTeX[/math]???
First check the Veeky Forums guide:
sites.google.com/site/scienceandmathguide/
>what's the code for symbol x?
Use this for the rest of your life:
detexify.kirelabs.org/classify.html
>how do make x look better?
>do you guys prefer to use x or y?
>what's the difference between using x and y?
>etc
Newbie questions are also okay, just put some effort into researching your question first since the answer is probably everywhere.

Other urls found in this thread:

tex.stackexchange.com/questions/17502/what-is-the-correct-pronunciation-of-tex-and-latex
twitter.com/NSFWRedditGif

how do you pronounce latex ?

I don't think the mods are too keen on LaTeX-specific threads, but we'll see what happens. In the meantime, I'm not the OP, and I've devised some Veeky Forums - specific best practices for formatting TeX on this board.

1. Always Always Always begin your code with \displaystyle, which has the global effect of enlarging large operators such as Summations, fractions, and integral signs. This simultaneously makes your product look much better, and it also /makes it more legible on this forum/.

2. Never Never Never allow back-slash characters, denoting such-and-such as in the above, to be /immediately preceded/ by any other characters. Veeky Forumss' TeX implementation frequently breaks and complains when you don't add space. You might get away with it one time, but it /will/ bite you someplace else. For example...

DO THIS: ( \frac{5}{7} ) = ( \frac{10}{14} )

NOT THIS: (\frac{5}{7})=(\frac{10}{14})

In particular, note how in the latter case, the left parentheses immediately abut the backslashes which declare the fractions. This is what Veeky Forums's solution hates. It may happen that you can plug in this particular shorter version of the above and have it format correctly, but even if that instance works, it does not disprove the best practice I've just described. I've had lines of code fail on here enough times, and diagnosed other anons' code with same /one/ problem, to know that I'm right about this. Add spaces.

Ripped right from stackexchange:
Let the creators of TeX and LaTeX answer:

Donald Knuth wrote in the first chapter of his *TeXbook*:

> English words like ‘technology’ stem
> from a Greek root beginning with the
> letters τεχ...; and this same Greek
> word means *art* as well as
> technology. Hence the name TeX, which
> is an uppercase form of τεχ.
>
> Insiders pronounce the χ of TeX as a
> Greek chi, not as an ‘x’, so that TeX
> rhymes with the word blecchhh. It’s
> the ‘ch’ sound in Scottish words like
> *loch* or German words like *ach*; it’s a
> Spanish ‘j’ and a Russian ‘kh’. When
> you say it correctly to your computer,
> the terminal may become slightly
> moist.

Leslie Lamport wrote in the first chapter of his book *LaTeX: A document Preparation System*:

> One of the hardest things about LaTeX
> is deciding how to pronounce it.This
> is also one of the few things I'm not
> going to tell you about LaTeX, since
> pronunciation is best determined by
> usage, not fiat. TeX is usually
> pronounced *teck*, making *lah*-teck,
> and *lay*-teck the logical choices;
> but language is not always logical, so
> *lay*-tecks is also possible.

tex.stackexchange.com/questions/17502/what-is-the-correct-pronunciation-of-tex-and-latex

>I don't think the mods are too keen on LaTeX-specific threads
I was hoping that this wasn't the case, which is why I tried to filter out the newbie questions and try and get some "productive" discussion going instead that everyone can hopefully enjoy.

Thanks for the Veeky Forums specific contribution - if people practice that frequently their own code in whatever compiler they use will be much more readable too.

Some advice on the differential operator in integrals:

People tend to do:

[math]\iint f(x)dxdy[/math]
\iint f(x)dxdy

which is quite bad style since the differentials [math]dx[/math] and [math]dy[/math] look like they're being multiplied with [math]f(x)[/math].

One may try to make this look slightly better by using \mathrm:

[math]\iint f(x) \mathrm{d}x \mathrm{d}y[/math]
\iint f(x) \mathrm{d}x \mathrm{d}y

which does make it clearer, but the multiplication problem still remains.

The best way to fix this is to use \mathop:

[math]\iint f(x) \mathop{dx} \mathop{dy}[/math]
\iint f(x) \mathop{dx} \mathop{dy}

And we can add \mathrm for a final touch up:

[math]\iint f(x) \mathop{\mathrm{d}x} \mathop{\mathrm{d}y}[/math]
\iint f(x) \mathop{\mathrm{d}x} \mathop{\mathrm{d}y}

> 1
Don't start your code with displaystyle unless you have a good reason.
Use [eqn] tags for big equations you want to take up a whole line and [math] tags for inline expressions.
A better reason for using displaystyle is if you cannot read a numerator.
Typing something like \frac{\displaystyle [some ugly repeating fraction}{x+1}

2. Ha. I always wondered why people did this.
I usually finish up my LaTeX with a space like (\frac {a}{b}). Its good practice for when you want to write [math] \omega t[/math] not as \omegat

They've allowed them before. LaTeX practice threads and such.
I usually do \int f \, \mathrm{d} x which I saw in some forum. I gotta try that sometime

I'm working on my first paper at the moment. How important is it to use LaTex? Some people seem to think it is but none of my supervisors use it.

>A better reason for using displaystyle is if you cannot read a numerator.
Even better is to use \dfrac

>They've allowed them before. LaTeX practice threads and such.
Hopefully this one generates good enough discussion then!

>I usually do \int f \, \mathrm{d} x which I saw in some forum. I gotta try that sometime
I'm generally a big fan of \, because of weird spacing issues in some circumstances (it's comparable to using ... instead of \ldots).

It's GREAT practice and will help you a lot later on.
You'll pick it up quickly and it'll save so much time.
Your documents will also look much sexier!
As always, you don't need to memorise anything, you'll automatically remember things that you type often as you use them, and anything that you don't know you can easily look up.

>I'm generally a big fan
correction, this should say "I'm generally NOT a big fan"

Thank you op. Exactly whAt I needed actually

I think \dfrac just forces the fraction to be \displaystyle
Does it really force the numerator and denomonator?


[math] \frac{\lim_n s_n}{\lim_n t_n} [/math]
[math] \dfrac{\lim_n s_n}{\lim_n t_n} [/math]
[eqn] \frac{\displaystyle \lim_n s_n}{\displaystyle \lim_n t_n} [/eqn]
[eqn] \frac{\lim_n s_n}{\lim_n t_n} [/eqn]
[eqn] \dfrac{\lim_n s_n}{\lim_n t_n} [/eqn]

>I think \dfrac just forces the fraction to be \displaystyle
Yep it does - but that's what I thought you wanted. Apologies on the misunderstanding.

Nope, wrong. Always Always Always start your code with \displaystyle /when writing something on Veeky Forums; do it reflexively, as I explained.

.....Theres a reason it outputs the way it does.
Just use eqn tags dude

>dxdx and dydy look like they're being multiplied

well duhh, it's because that is exactly what is happening there

HIROCOPTER FIX FUCKING LATEX ON Veeky Forums INSTEAD OF ADDING A GAZILLION NEW BOARDS NOBODY WANTS

What is latex?

[math]F(Y_t) - F(Y_0) = \int_0^t F'(s) \mathrm{d}X_s + \frac{1}{2} \int_0^t F''(s) \mathrm{d}\langle X \rangle_s [/math]

tellement beau :bave:

typesetting language for writing sexy maths

But that's not what we want mathematically - dx and dy aren't variables we want to multiply together, that's not what integrals mean.

>when I write dx/dy I'm diving dx by dy
>when I write [math]\int[/math] I'm multiplying a squiggly line by stuff
highschool?

>he thinks there are ANY mods or janitors who even look at Veeky Forums
this is the one board where you can post cp and won't get banned for it I bet. literally no one in charge is reading it, or any of the reports

[eqn]F(Y_t) - F(Y_0) = \int_0^t F'(s) \mathop{\mathrm{d}X_s} + \frac{1}{2} \int_0^t F''(s) \mathop{\mathrm{d}\langle X \rangle_s}[/eqn]

[math]\text{ }^{\color{#511da7}{\displaystyle\text{w}}}\text{ }^{^{^{\color{#4136c0}{\displaystyle\text{h}}}}}\text{ }^{^{^{^{^{^{\color{#3e56cd}{\displaystyle\text{a}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{\color{#4274cd}{\displaystyle\text{t}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{\color{#4b8dc1}{\displaystyle\text{'}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#57a0ad}{\displaystyle\text{s}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#66ae94}{\displaystyle\text{ }}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#78b67c}{\displaystyle\text{u}}}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#8ebb66}{\displaystyle\text{p}}}}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#a5bd55}{\displaystyle\text{ }}}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#bbbb48}{\displaystyle\text{b}}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{^{^{\color{#cfb440}{\displaystyle\text{i}}}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{^{^{\color{#dea53b}{\displaystyle\text{t}}}}}}}}}}}}}\text{ }^{^{^{^{^{^{^{^{^{\color{#e58e36}{\displaystyle\text{c}}}}}}}}}}}\text{ }^{^{^{^{^{^{\color{#e56e30}{\displaystyle\text{h}}}}}}}}\text{ }^{^{^{\color{#df4828}{\displaystyle\text{e}}}}}\text{ }^{\color{#da2121}{\displaystyle\text{s}}}[/math]

It's beautiful.