Science Forums

# Latex Practice Ground

## Recommended Posts

Using LaTeX in your posts shows attention to detail, which will win the admiration of your peers!

And it just looks so pretty :hihi:

##### Share on other sites

• 4 weeks later...
• Replies 85
• Created

#### Popular Days

$E = mc^2 \left ( \sqrt{\frac{1}{1-\frac{v^2}{c^2}}}-1 \right )$

now \ is \\ the \\\ time

##### Share on other sites

$E = mc^2 \left(\sqrt{\frac{1}{1-\frac{v^2}{c^2}}}-1 \right )$

now is the time

for all good men to quote some latex...

##### Share on other sites

ok whenever quoting, please use the double backslash.

in a quote will be taken as a command, and not rendered will be taken as a and if you need 2 backslashes, you, just like in sql, must escape both, so simple :thumbs_up

##### Share on other sites

Problem is, when you are quoting someone, it is generally their code (not yours) that now needs fixing, and to be perfectly frank, I don't want to have to be bothered to fix someone else's code when all I'm doing is responding to it.

I type text in my own posts.

I don't edit other peoples quotes.

##### Share on other sites

i figure it's a courtesy thing, Pyro, if i care about one's post, and happen to see that they posted a broken quote, i may go in and fix it, out of my respect for either them, or the topic.... depends on my mood, really...

##### Share on other sites

i figure it's a courtesy thing, Pyro, if i care about one's post, and happen to see that they posted a broken quote, i may go in and fix it, out of my respect for either them, or the topic.... depends on my mood, really...

No, I agree with your sentiment, and out of courtesy, I absolutely would fix it, but it was correct before hitting quote... so, in essence, the other user never posted a broken quote, the faulty hypography vbulletin infrastructure did when it couldn't handle the back slash correctly within the quote tags.

I'm just saying, it's really annoying, and ought to be fixed (somehow). Can you imagine if every time you quoted straight text you had to go through and edit it to put it back to its original state?

i f*(ure it's a courtesy t--==g, error, if i *733about one/s post|| and happen to see that they posted a 993K3n quOTe|| i may go in and fix it|| out of my respect f4r either them|| or 903 top212.... depends on my mood|| really...

I'm just easily frustrated by technology issues that cause functionality to not work the way it's supposed to. No worries. It just makes the Hypo user experience less enjoyable. Who cares about that? :eek:

##### Share on other sites

i could make something happen, just not this or next week, preparing for a HUGE conference in NYC next week... :eek:

i may make a new tag for latex in quotes, like quotex and that's how you'd use latex in quotes.... i have to look at it, answer may be a hell of a lot simpler...

##### Share on other sites

I think that deserves its own entry in the word inventions thread...

Quotex. :hyper:

You're the man, alex. No worries. Have fun at the conference.

Hmmm... On second thought, it does kinda sound like a panty liner, doesn't it? :eek:

##### Share on other sites

Hmmm... On second thought, it does kinda sound like a panty liner, doesn't it? :cheer:

Nah, sounds more like jock itch ointment... :eek:

Thank God I never got in a fight. All of the jock dudes hated me, but all of their girlfriends thought I was nice so they wouldn't touch me. It was infuriating to them, :hyper:

Buffy

##### Share on other sites

• 3 weeks later...
$E = mc^2 left ( sqrt{frac{1}{1-frac{v^2}{c^2}}}-1 right )$

now is the time

Testing.

##### Share on other sites

• 5 months later...

Hello Don. I can help you with this latex problem if you like.

When you reply to this message, try typing the following in the message window:

$a^x + b^y + c^z$

then hit "preview". It should render like this:

$a^x + b^y + c^z$

The idea is as follows. While you're writing your post you can put math tags around a math equation. The math tags look like so: $...$. If you put a properly formatted equation between two math tags where I've put the three ellipsis points, the computer will try to render it as a beautified image.

Once you understand the idea of the tags, the only challenge is learning how to write in Tex format which can be understood and rendered properly by the computer. We can get to that challenge, but first let's make sure we have the math tags part down. Once again, write this in your post exactly:

$a^x + b^y + c^z$

After you hit "preview" or "reply", it will render the bit between the math tags as a Latex equation.

~modest

##### Share on other sites

$a^x+b^y+c^z$

I got it! :thumbs_up :computerkeys: This is great!

Now, how do I write: $T(a/T)^((xln(a)/(ln(T))-1)/(ln(a)/(ln(T))-1))$

so that the term is not on one line and requires fewer parenthesis ?

Or, am I "getting ahead of myself" ?

Don.

##### Share on other sites

The "\frac" command lets you do fractions, i.e. "\frac{a}{b}" gives you

$\frac{a}{b}$

##### Share on other sites

$a^x+b^y+c^z$

I got it! :thumbs_up :computerkeys: This is great!

Yep, superb. You've got the tags down which I think was half the battle you were facing.

Now, how do I write: $T(a/T)^((xln(a)/(ln(T))-1)/(ln(a)/(ln(T))-1))$

so that the term is not on one line and requires fewer parenthesis ?

Or, am I "getting ahead of myself" ?

Not at all ahead of yourself.

There are two important considerations involving LaTex. The first is the use of parentheses and the second is the use of commands (commands are functions, symbols, or special characters).

When I say parentheses, I'm not referring to the ordinary () kind. Those print normally and are in no way special. These: {} are special. They are usually called braces. They group together anything that's between them and they don't, themselves, render. I'll show you you what I mean.

To write T^(x^2+y^2) you would do this:

$T^{x^2+y^2}$

which renders like so:

$T^{x^2+y^2}$

The {} characters grouped together the x squared plus y squared part. You have to use those braces to group together that whole exponent. Even if you use normal parentheses, the special ones are also required:

$T^{(x^2+y^2)}$

renders as:

$T^{(x^2+y^2)}$

if you didn't use the braces, you would get this:

$T^(x^2+y^2)$

rendering as:

$T^(x^2+y^2)$

Notice the first character in the exponent (the left parentheses) is the only one it raised to superscript because we didn't tell it to group all of (x^2+y^2) together.

The next consideration involves the LaTex commands. They are fractions or roots or special characters... things that need more than ordinary keystroke characters to make. Erasmus points out probably the most important one above, the fraction command. There are a bunch of others which can be referenced at this link. Commands and special characters are preceded with a backslash. For example, the fraction command starts with a backslash:

$\frac{a}{b}$

renders as:

$\frac{a}{b}$

Anything in the first set of braces is put in the numerator and anything in the second set of braces is put in the denominator. To make things a bit more interesting:

$\frac{x\ln(a)}{\ln(T)}$

renders as:

$\frac{x\ln(a)}{\ln(T)}$

The commands used above are \frac and \ln. Looking, then, at the equation you asked about: T(a/T)^((xln(a)/(ln(T))-1)/(ln(a)/(ln(T))-1)) and starting with the base:

$T ( \frac{a}{T} )$

renders as:

$T ( \frac{a}{T} )$

and that doesn't look very good at all. The parentheses are too small, and that's something you'll run into. We need to use the special characters "\left(" and "\right)" any time we want to make bigger parentheses. This will look better:

$T \left( \frac{a}{T} \right)$

rendering as:

$T \left( \frac{a}{T} \right)$

Then we add the exponent:

$T \left( \frac{a}{T} \right)^{\left( \frac{ \frac{x \ln(a)}{ \ln(T)} -1}{ \frac{ \ln(a)}{ \ln(T)} -1} \right)}$

renders as:

$T \left( \frac{a}{T} \right)^{\left( \frac{ \frac{x \ln(a)}{ \ln(T)} -1}{ \frac{ \ln(a)}{ \ln(T)} -1} \right)}$

That is a difficult equation to put into LaTex and looks overwhelming. But, once you practice the basics, it becomes pretty intuitive. Your whole identity, complete with math tags is this:

$\frac{T}{T}a^x = T \left(\frac{a}{T}\right)^{\left(\frac{\frac{x\ln(a)}{\ln(T)}-1}{\frac{\ln(a)}{\ln(T)}-1}\right)}$

You can copy and paste that into whatever post you're writing. In fact, I just copied it from Craig's post which is a useful shortcut. If someone writes something in LaTex, you can hit "quote" under their post and you'll see the LaTex string in the quoted part of the message. The above renders like so:

$\frac{T}{T}a^x = T \left(\frac{a}{T}\right)^{\left(\frac{\frac{x\ln(a)}{\ln(T)}-1}{\frac{\ln(a)}{\ln(T)}-1}\right)}$

Again, that is a very overwhelming string of characters in that equation. I'd recommend starting with simple fractions and whatnot and working your way up. But, I do think you'll get the hang of it and your posts (and papers) will look so much better for it.

The thread is here for practice and shout out any questions. :)

~modest

##### Share on other sites

another note on that, it is a lot easier to write in math like that, then it is to figure out from the string where things are, it also does not hurt to space things to make them easier to read

$\frac{T}{T} a^x = T \left( \frac{a}{T} \right) ^ {\left( \frac{ \frac{ x\ln(a ) }{ \ln(T) }-1 }{ \frac{ \ln(a) }{ \ln(T) } -1 } \right) }$

curly braces are used to indicate a block of a sort. left and right actually will extend any bracket to the height of the content inside

things that can be expanded/resized like that are:

[ ]

\{ \} - note they are escaped

( )

| - \vert or a vertical line

\| - \Vert or a double vertical line

/ - slash

\backslash

\langle \rangle

\uparrow

\downarrow

\updownarrow

a good habbit to get into is to type in a close bracket/parentheses, etc, right after you open them, and also draw a set if the function requires more then a single one ex i start with \frac{}{} and then arrow in to fill them... that way i wont forget if the second part of that wont happen for a bit

so to give you another example:

$\int cos(2x) e^{3x} dx = \frac{1}{3} cos(2x)e^{3x} + \frac{2}{3} \left[ \frac{1}{3} sin(2x) e^{3x} - \int 2cos(2x) \frac{1}{3} e^{3x} dx \right]$

##### Share on other sites

$\frac{T}{T}a^x = T \left(\frac{a}{T}\right)^{\left(\frac{\frac{x\ln(a )}{\ln(T)}-1}{\frac{\ln(a)}{\ln(T)}-1}\right)}$

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.