-
Notifications
You must be signed in to change notification settings - Fork 34
/
sample.tex
101 lines (87 loc) · 2.14 KB
/
sample.tex
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
% ref
% https://students-tech.blog/post/tectonic.html#%E6%97%A9%E9%80%9F%E6%9B%B8%E3%81%84%E3%81%A6%E3%81%BF%E3%81%9F%E3%81%84
% class
\documentclass[a4paper,12pt,xelatex,ja=standard]{bxjsarticle}
% packages
%% mathematical notations
\usepackage{amsthm,amsmath,amssymb,amsfonts} % mathematical notations
\usepackage{bm} % bold character
\usepackage{latexsym} % more mathematical notations
\usepackage{physics} % physical notations
%% graphs
\usepackage[dvipdfmx]{graphicx, xcolor} % graph
\usepackage{circuitikz} % for circuit elements
\usepackage{float} % positioning of graphs
\usepackage{siunitx} % SI units
\usepackage{tikz} % graphic elements
\usepackage{wrapfig} % must be after float package.
%% type system
\usepackage{bussproofs} % proof tree
%% code
\usepackage[ruled,vlined]{algorithm2e} % pseudo code
\usepackage{listings} % source code
% Basic information
\title{xxx 年度解答・解説}
\author{作者}
\date{\today}
\begin{document}
\maketitle
\section{見出し}
X 年の問題は易化しました。
\subsection{回路図}
\begin{figure}[H]
\begin{center}
\begin{circuitikz}[american currents]
\draw (0,0)
to[sV=$E$] (0,2)
to[short] (2,2)
to[european resistor=$R$] (2,0)
to[short] (0,0);
\draw (2,2)
to[short] (4,2)
to[L=$L$] (4,0)
to[short] (2,0);
\draw (4,2)
to[short] (6,2)
to[C=$C$] (6,0)
to[short] (4,0);
\end{circuitikz}
\caption{RLC 並列回路}
\end{center}
\end{figure}
\subsection{証明木}
\begin{prooftree}
\AxiomC{A}
\AxiomC{B}
\AxiomC{C}
\TrinaryInfC{D}
\end{prooftree}
\subsection{擬似コード}
\begin{algorithm}[H]
\SetAlgoLined
\KwResult{Write here the result }
initialization\;
\While{While condition}{
instructions\;
\eIf{condition}{
instructions1\;
instructions2\;
}{
instructions3\;
}
}
\caption{How to write algorithms}
\end{algorithm}
\subsection{ソースコード}
\begin{lstlisting}[language=c++]
#include <iostream>
int main(){
std::cout << "Hello, world!" << std::endl;
return 0;
}
\end{lstlisting}
\subsection*{なんか書いとけ!!!}
\[
E = mc^2
\]
\end{document}