Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

codingfarm

Latex 작성 팁 본문

그리고/기타

Latex 작성 팁

scarecrow1992 2020. 2. 29. 01:07

정렬하기

$\text{\begin(align*)}$ $\text{\end(align*)}$ 그리고 $\text{&=} $ 를 이용해서

등호를 기준으로 수식을 정렬시킨다. 

$\text{ \displaystyle \begin{align*}
f(x) &=  ax + by+ cz \\
&=2x + 3y + 4z
\end{align*}}$

 

$ \displaystyle \begin{align*}
f(x) &=  ax + by+ cz \\
&=2x + 3y + 4z
\end{align*}$

 

 

괄호크기 자동으로 조절하기

$\text{\left[}$ 와 $\text{\right]}$ 로 괄호를 형성하면 내부 수식에 따라 크기가 자동으로 변한다.

$\text{\displaystyle \left[
\frac{a}{b}
\right]
\;\;
\left[a+b\right]}$

 

$\displaystyle \left[
\frac{a}{b}
\right]
\;\;
\left[a+b\right]$

 

 

위아래줄 정렬하기

아래와 같은 사용방법을 통해서 &를 기준으로 자동으로 크기를 나눠가면서 정렬하게된다.

&로 괄호를 씌운다는 느낌으로 쓰는게 편하며 모든 줄에서는 &의 갯수가 같은게 직관적이다

$\displaystyle 
\begin{align*}
&\text{ \begin{align*}}\\
&\text{&x+& &a+b+c& &+d+e\\}\\
&\text{&x+x+x+& &a+b& &+c\\}\\
&\text{&x+x+x+x+x+x+x+& &a+b+c+a+b+c& &+d+e+f}\\
&\text{\end{align*}}
\end{align*}$

$\displaystyle  
\begin{align*}\\ 
&x+& &a+b+c& &+d+e\\\\ 
&x+x+x+& &a+b& &+c\\\\ 
&x+x+x+x+x+x+x+& &a+b+c+a+b+c& &+d+e+f\\ 
\end{align*}$

 

가령 아래 식처럼 $\Rightarrow$와 $=$ 2개를 기준으로 동시에 정렬하고 싶을경우엔

$\Rightarrow$와 수식 시작부분 사이의 공백을 $& &$로 묶어준후에 $=$를 기준으로 정렬 시키면 된다.

$$\begin{align*} \Rightarrow& &\dfrac{a^2+s^2}{a^2} \int _0^\infty e^{-st} \sin (at) dt &= \dfrac{1}{a}\\  \Rightarrow& &\int_0^\infty e^{-st} \sin (at)dt &=\dfrac{a}{s^2+a^2} \end{align*}
$$

 

$$aaaaaaaaaaaaaaaabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz$$

Comments