目前分類:Commands (30)

瀏覽方式: 標題列表 簡短摘要

如果文章內容有分成好幾個章節,擔心一個tex檔,包含太多內容在裡面,過於複雜的話。可以選澤用input或include把各個部分拆開來存。

 

使用方式很簡單,

(1) 只要把想分開的內容,存進一個chap_1_1.tex。

(2) 再用

\include{chap_1_1}

\input{chap_1_1}

就可以了。(使用include/input時,不需要加.tex。)

 

文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Command:

\underline{ xxx }

xxx 預輸入的文字。


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Command:

\textbf{ xxx }

xxx = 預輸入的文字。


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Step 1:

改字的方法,一開始要在文件的上方加上

\usepackage{color}

使用 color 這個 package

 

Step 2:

在要改的文字加上 : { \color{red} 要修改成紅色的文字 }

 

Step 3:

顏色有 red(紅), white(白), black(黑), green(綠), blue(藍), cyan(青), magenta(洋紅ㄥ紅紫), yellow(黃) 可以設定。

文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Example 2 : (multicolumn)

x1.png


Code:

x2.png

Package:

x3.png


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Example 4:

x2.png


Code:

x1.png

Package:

x3.png


ytl0821 發表在 痞客邦 留言(0) 人氣()

Example 3:

t2.png


Code:

t1.png

Package:

t3.png


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Algorithm example 1:

Screen Shot 2017-09-16 at 12.34.40 AM.png

Code:

Screen Shot 2017-09-16 at 12.35.01 AM.png

Package:

Screen Shot 2017-09-16 at 12.35.30 AM.png


Algorithm example 2:

Screen Shot 2017-09-16 at 12.34.51 AM.png

Code:

Screen Shot 2017-09-16 at 12.35.08 AM.png

文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Example of inserting a table into LaTeX document:

x1.png


Code:

x2.png


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Example for inserting  a figure into document:

x3.png


Code:

(1)

x4.png

(2) Package:

x5.png


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

另一種更簡單的方法讓數學符號從黑色換成其他顏色。

 

Example 2:

Screen Shot 2017-09-12 at 1.21.33 AM.png


Code:

Screen Shot 2017-09-12 at 1.22.31 AM.png


文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

以下範例是將方程式的某些數學符號從黑色換成其他顏色,可以用來強調方程式中改變的地方或想強調的地方。


Example:

Screen Shot 2017-09-12 at 1.12.45 AM.png

Code:

Screen Shot 2017-09-12 at 1.14.29 AM.png


\documentclass{article}
\usepackage[usenames, dvipsnames]{color}

\definecolor{myred}{RGB}{255, 0, 0}
\definecolor{mygreen}{RGB}{0, 255, 0}

文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

Case 1:

x1.png


Code:

\documentclass[12pt,a4paper]{article}
 
\usepackage{stackengine}

% define link-line - start -
\stackMath
\def\rldp{2.0ex}
\def\rlht{1.0ex}

文章標籤

ytl0821 發表在 痞客邦 留言(0) 人氣()

  • Aug 11 Fri 2017 00:03
  • Figure

Examples:

Case (1) (for two-column):

First part:

\usepackage{float}
\usepackage{multicol}

Second part:

\begin{figure}[H]
  \includegraphics[width=0.45\textwidth]{frog.eps}
  \caption{Frog .}
\end{figure}

ytl0821 發表在 痞客邦 留言(0) 人氣()

  • Aug 10 Thu 2017 14:25
  • Table

Examples:

\begin{enumerate}

\item
\begin{tabular}{ l c r }
 1 & 2 & 3 \\
 4 & 5 & 6 \\
 7 & 8 & 9 \\
\end{tabular}

\item
\begin{tabular}{ l | c | r }

ytl0821 發表在 痞客邦 留言(0) 人氣()

Commands:

Step 1. \usepackage{multicol}

Step 2.

\begin{multicols}{#}    - # = 2 -> two-column, if # = 3 -> three-column.

...

\end{multicols}

 

Example:

\documentclass[a4paper]{article}

%% Language and font encodings

ytl0821 發表在 痞客邦 留言(0) 人氣()

Commands:

Screen Shot 2017-08-09 at 14.41.46.png

 

Example:

{\tiny sans-serif family}, {\scriptsize boldface}, {\footnotesize upright shape}

 

Result:

Screen Shot 2017-08-09 at 14.45.25.png


ytl0821 發表在 痞客邦 留言(0) 人氣()

Commands:

Screen Shot 2017-08-09 at 14.37.51.png

 

Example:

\textsf{\textbf{sans-serif family, boldface, upright shape}}\\
\textrm{\textsl{roman family, medium, slanted shape}}

 

Result:

Screen Shot 2017-08-09 at 14.36.48.png

 

ytl0821 發表在 痞客邦 留言(0) 人氣()

Commands:

\begin{flushleft}    \end{flushleft} - to typeset the text between them exactly at the left of the page. 靠左
\begin{flushright}    \end{flushright} - to typeset the text between them exactly at the right of the page. 靠右
\begin{center}    \end{center} - to typeset the text between them exactly at the center of the page. 置中

 

Example:

\begin{flushleft}First line.\\[10pt] Second Line.\end{flushleft}
\begin{flushright}Third line.\\[10pt] Fourth Line.\end{flushright}
\begin{center}Fifth line.\\[10pt] Sixth Line.\end{center}

 

ytl0821 發表在 痞客邦 留言(0) 人氣()

Command:

\\[12pt] - to increase the vertical distance between the lines.

 

Explain:

One can also give an optional argument to \\ to increase the vertical distance between the lines.

 

Example:

First line. \\[20pt] Second Line.

 

Result:

ytl0821 發表在 痞客邦 留言(0) 人氣()

1 2