1

I'm sorry if this is off-topic. I am using the TexMaths extension in LibreOffice and I'm attempting to center an equation. However, the equation simply gets displayed and I am unable to alter its horizontal position. So I tried to do this through LaTex but I am unable to get that to work as well. This is what I have so far:

\begin{center}
\[f(x) = \left\{
  \begin{array}{ll}
    sin(x) & : 0 \le x \le 2\pi\\
    -2sin(\dfrac{x}{2}) & : 2\pi < x \le 6\pi\\
    4sin(x + 2\pi) & : 6\pi < x \le 14\pi\\
    sin(x) & : x \ge 14\pi
  \end{array}
\right.
\]
\end{center}

But this still doesn't center it.

8
  • 3
    Equations embedded inside \[...\] are always centered. No need of center environment. BTW this is off topic. And also it is \sin not sin!
    – Harish Kumar
    Sep 5, 2014 at 22:42
  • Ah, ok. It must be a LibreOffice issue then. I will also change sin to \sin. Sorry I'm a complete tex noob! :)
    – vivin
    Sep 5, 2014 at 22:44
  • 1
    No problem. Let the question be there. in case if somebody pops up who are willing to answer....
    – Harish Kumar
    Sep 5, 2014 at 22:46
  • to center the equation you just need to click on the "centered" button (default shortcut Crtl+E) like you would do for any normal text. Note that you don't need to put the math content inside \[...\] because texmaths already does that for you.
    – dcmst
    Sep 5, 2014 at 23:47
  • @dcmst Please make an answer.
    – Harish Kumar
    Sep 6, 2014 at 0:56

0

You must log in to answer this question.

Browse other questions tagged .