search fix

Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts

Tuesday, 12 May 2015

How to get = to align in LaTeX

There may be instances where a few lines of equations look bad because their equal signs are not aligned, like this one:


The way to do it is to start by declaring you are starting LaTeX:

[latex]

Then tell it you are using \begin{align}

[latex]
\begin{align}

Then put in the first line of LaTeX code with an & where you want to align it, so in our case, before the = sign:

[latex]
\begin{align}
y &= 3(x)^4(2x -5)

At the end of the line, put a space backslash backslash ( \\). This makes a line break.


[latex]
\begin{align}
y &= 3(x)^4(2x -5) \\

Then you might want an empty line to separate the next line more, put another space backslash backslash ( \\).

[latex]
\begin{align}
y &= 3(x)^4(2x -5) \\
 \\

Put in the next lines of math similarly, remembering the & before the =.

[latex]
\begin{align}
y &= 3(x)^4(2x -5)\\
\\
\dfrac {\delta y}{\delta x}&=3x^4(2)+(2x-5)12x^3 \\
\\
&=6x^4+24x^4-60x^3 \\
\\
&=30x^4-60x^3 \\

At the end, close alignment with \end{align} and close LaTeX with [/latex]

[latex]
\begin{align}
y &= 3(x)^4(2x -5)\\
\\
\dfrac {\delta y}{\delta x}&=3x^4(2)+(2x-5)12x^3 \\
\\
&=6x^4+24x^4-60x^3 \\
\\
&=30x^4-60x^3 \\
\end{align}
[/latex]

The finished product will look like this:


Monday, 20 April 2015

Trick WordPress into accepting a minus sign

MS Word has a few different symbols that look like a minus, and only one is acceptable in Word Press





So once in Word Press, delete whatever looks like a minus, and retype a minus in it's place





How to make an apostrophe in LaTeX ^\prime

How do you do an apostrophe in LaTeX without using a "package" (which I don't think our Word Press supports), make a superscript prime symbol, as in


Friday, 17 April 2015

\small to fit regular font size

Maybe LaTeX is made in Texas (if so I won't "mess" with them), but their regular size is a bit big.

To compensate, put a \small infront:


Thursday, 16 April 2015

LaTeX Equation too big?

One time I found that my LaTeX equation was too big for the Equation box!


What to do is to take remove the box (and the close div tags)


Then it will look like this:

LaTeX endash

Using http://hostmath.com/ I found that the hyphen on the keyboard produces a space emdash space in LaTeX


However, by adding \text it nicely changes it into an endash with no surrounding spaces!