Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

Text

Figure

Two Column Figure

1
2
3
4
5
6
7
8
9
\usepackage{subfig}
\begin{figure}[htbp]
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[]{}
\end{minipage}
\begin{minipage}[t]{0.5\linewidth}
\includegraphics[]{}
\end{minipage}
\end{figure}

Subfig

1
2
3
4
5
6
7
8
\begin{figure}[htbp]
\centering
\subfloat[\centering title1]{{\includegraphics[width=0.3\linewidth]{figure 1} }}
\quad
\subfloat[\centering title2]{{\includegraphics[width=0.3\linewidth]{figure 2} }}
\caption{caption1}
\label{1}
\end{figure}

Table

Cross Row Table

1
2
3
4
5
6
7
8
9
10
\usepackage{multirow}
\begin{table}[htbp]
\centering
\begin{tabular}{|c|c|}
\hline
\multirow{2}{*}{Cross It}&N\\
&N\\
\hline
\end{tabular}
\end{table}

Newline in Table

1
2
3
4
5
6
7
8
9
\usepackage{makecell}
\begin{table}[htbp]
\centering
\begin{tabular}{c}
\hline
\makecell{First Line\\Second Line}\\
\hline
\end{tabular}
\end{table}

Equation

Un-Italic

Code Display
$x+y$ \(x+y\)
$\rm x+y$ \(\rm x+y\)
$\text{x+y}$ \(\text{x+y}\)

Others

Two Column Document

1
2
3
4
5
6
7
\documentclass[UTF8,a4paper,14pt,twocolumn]{ctexart}
\begin{document}
\twocolumn[
\begin{@twocolumnfalse}
% something here may cross two column
\end{@twocolumnfalse}]
\end{document}
1
2
3
\usepackage[colorlinks,linkcolor=blue]{hyperref}
% include this package as the final one
\href{https://www.google.com}{Google}

Code Display

1
2
3
4
5
6
7
8
9
10
11
12
13
14
\usepackage{listings}
\lstset{numbers=left,
numberstyle=\tiny,
basicstyle=\small\ttfamily,
stringstyle=\color{purple},
keywordstyle=\color{red!25!green!33!blue!100}\bfseries,
commentstyle=\color{olive},
%directivestyle=\color{blue},
frame=shadowbox,
framerule=0pt,
backgroundcolor=\color{red!0.5!green!0.5!blue!0.5!},
rulesepcolor=\color{red!20!green!20!blue!20}}
\begin{lstlisting}[language={[ANSI]C}]
\end{lstlisting}

or a more convenient way:

1
2
3
4
5
6
\usepackage{listings}
\usepackage[cache=false]{minted}
\begin{minted}[frame=single, tabsize=4,breaklines=true,breakanywhere=true]{js}
print("\n")
\end{minted}
\mintinline{python}{print("\n")}

Tight List

1
2
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

Insert Author Info

1
2
3
4
5
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\hypersetup{
pdftitle={None},
pdfauthor={Nobody}
}

Rename Section/Subsection

1
2
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
  • \arabic (1, 2, 3, ...)
  • \alph (a, b, c, ...)
  • \Alph (A, B, C, ...)
  • \roman (i, ii, iii, ...)
  • \Roman (I, II, III, ...)
  • \fnsymbol (∗, †, ‡, §, ¶, ...)