Last active
May 19, 2018 05:41
-
-
Save atuanpham/33bb80378610aaf9fa6eac4290dced30 to your computer and use it in GitHub Desktop.
Centering Equations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "centering equations" | |
output: | |
pdf_document: default | |
classoption: fleqn | |
header-includes: | |
- \setlength{\mathindent}{0pt} | |
- \setlength{\parindent}{0pt} | |
--- | |
This is some text | |
This is the equation I would like left aligned: | |
\[ | |
h(t_{ij}) = Pr[ T_i = j| T_i \geq j | | |
\] | |
This is the equation I would like centred: | |
\[ | |
\makebox[\linewidth]{$h(t_{ij}) = Pr[ T_i = j| T_i \geq j |$} | |
\] | |
\noindent | |
\makebox[\linewidth]{centered text} | |
This is a set of equations to align centred: | |
\[ | |
\makebox[\linewidth]{$\displaystyle | |
\begin{aligned} | |
f(x) &= ax^2 + bx + c \\ | |
ax^2 + bx + c &= g(x) | |
\end{aligned} | |
$} | |
\] | |
From: https://tex.stackexchange.com/a/390656 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment