Add several latex snippets

This commit is contained in:
wancat
2022-03-18 14:23:35 +08:00
commit a973f31326
6 changed files with 107 additions and 0 deletions

4
latex/cjk.tex Normal file
View File

@@ -0,0 +1,4 @@
\usepackage[utf8]{inputenc}
\usepackage{xeCJK}
\setCJKmainfont{TW-Kai}
\setCJKmonofont{Noto Sans Mono CJK TC}

22
latex/code.tex Normal file
View File

@@ -0,0 +1,22 @@
\usepackage{listings}
\usepackage{xcolor}
\lstset{ % General setup for the package
language=C,
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\small,
frame=tb,
tabsize=4,
columns=fixed,
showstringspaces=false,
showtabs=false,
keepspaces,
commentstyle=\color{gray},
keywordstyle=\color{blue}
}
\lstinputlisting[linerange={41-51}]{week4-4.ino}
\begin{lstlisting}
\end{lstlisting}

7
latex/figure.tex Normal file
View File

@@ -0,0 +1,7 @@
\usepackage{graphicx}
\begin{figure}[h]
\includegraphics[width=0.7\linewidth]{ripple.jpg}
\centering
\caption{漣波計數器電路圖}
\end{figure}

23
latex/general.tex Normal file
View File

@@ -0,0 +1,23 @@
\documentclass[12pt,a4paper]{article}
\usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]{geometry}
\usepackage{xurl}
\author{Your name}
\title{Title}
\begin{document}
\maketitle
\newpage
\section{單元名稱LED 特效燈}
\section{實習步驟}
\begin{itemize}
\item Icarus Verilog Wiki: Getting Started \url{https://iverilog.fandom.com/wiki/Getting_Started}
\item Icarus Verilog Wiki: GTKWave \url{https://iverilog.fandom.com/wiki/GTKWave}
\item Verilog HDL 教學講義 \url{https://hom-wang.gitbooks.io/verilog-hdl/content/index.html}
\item Wikipedia: Adder \url{https://en.wikipedia.org/wiki/Adder_(electronics)}
\end{itemize}
\end{document}

23
latex/table.tex Normal file
View File

@@ -0,0 +1,23 @@
\usepackage{booktabs}
\begin{table}[h!]
\begin{center}
\caption{全加器真值表}
\begin{tabular}{c|c|c|c|c}
\toprule
A & B & $C_{in}$ & $C_{out}$ & S \\
\midrule
0 & 0 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 1 \\
0 & 1 & 0 & 0 & 1 \\
1 & 1 & 0 & 1 & 0 \\
0 & 0 & 1 & 0 & 1 \\
1 & 0 & 1 & 1 & 0 \\
0 & 1 & 1 & 1 & 0 \\
1 & 1 & 1 & 1 & 1 \\
0 & 0 & 0 & 0 & 0 \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

28
latex/titlepage.tex Normal file
View File

@@ -0,0 +1,28 @@
\begin{titlepage}
\begin{center}
\vspace*{1cm}
\Huge
\textbf{臺北科技大學}
\vspace{0.5cm}
\textbf{機電整合實驗三}
\vspace{1.5cm}
\textbf{}
\vspace*{\fill}
\begin{flushleft}
\large
110 學年度第 2 學期\\
智慧自動化控制科 三年級\\
學號1082B0004、1082B0006 \\
姓名:劉予安、林宏信\\
課程名稱:機電整合與實習\\
授課老師:李政宏 博士\\
\end{flushleft}
\end{center}
\end{titlepage}