レポート用LaTeXテンプレ
report.tex
\documentclass[a4paper,titlepage]{jarticle} %titlepageで表紙が作れる
\usepackage{amsmath}
\usepackage{physics}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[dvipdfmx]{color}
\usepackage{multicol} %表の縦連結
\usepackage{longtable}
\usepackage{here} %大文字Hで表と図の場所を確定させる
\usepackage{url} %urlは\url{}で
\usepackage{tikz} %tikz(作図)使えるように
\usepackage{fancyhdr}
\usepackage{siunitx}
\usepackage{comment}
\usepackage{lastpage} %pageref{LastPage}で最終ページがわかる
\usepackage{ifthen} %ifthenelse{条件}{条件一致時の実行内容}{elseの実行内容}
\usepackage{otf} %ローマ数字は\ajroman{n}か\ajRoman{N}
\usetikzlibrary{intersections,calc,arrows.meta} %tikz使えるように
\input{|"rm platex*.fls"} %余計なファイル消す
\usepackage[top=20truemm,bottom=20truemm,left=15truemm,right=15truemm]{geometry}
\parindent = 0pt
\renewcommand{\thesection}{#\arabic{section}} %セクションを#1,2にする
\renewcommand{\thesubsection}{\arabic{subsection}}
\renewcommand{\thesubsubsection}{設問\arabic{subsubsection}} %(i),(ii)なら\roman
%図hogeと打つのがめんどくさいので
\newcommand\figref[1]{(図~\ref{fig:#1})}
\newcommand\tabref[1]{(表~\ref{tab:#1})}
\makeatletter %計算式のラベルを(1.1)に.計算式の参照は\eqref{eq:hoge}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\@addtoreset{equation}{section}
\makeatother
\makeatletter %minipageで表と図を混ぜた時のために
\newcommand{\figcaption}[1]{\def\@captype{figure}\caption{#1}}
\newcommand{\tblcaption}[1]{\def\@captype{table}\caption{#1}}
\makeatother
\pagestyle{fancy} %ヘッダフッタ使う時
\rfoot{\ifthenelse{\value{page}=\pageref{LastPage}}{以上}{次ページへ}}
\rhead{学籍番号と名前}
\lhead{}
\cfoot{\thepage/\pageref{LastPage}}
\renewcommand{\headrulewidth}{0pt} %線を消す
\begin{document}
%タイトル
\title{科目名}
\author{学籍番号・名前}
\date{}
\maketitle
%\thispagestyle{empty} %1ページ目のページ番号を消す
\thispagestyle{fancy} %1ページ目はデフォルトのスタイルになってしまう.
\section{1章}
本文
\begin{comment} %大きなコメントアウト
\begin{figure}[H] %表と図のminipage
\begin{tabular}{cc}
\begin{minipage}{.6\linewidth}
\centering
\includegraphics[width=.75\linewidth]{hoge.png}
\vspace*{-0.5cm} %下のキャプション離れすぎ
\figcaption{hoge}
\label{fig:hoge}
\end{minipage}
\begin{minipage}{.4\linewidth}
\centering
\tblcaption{hoge}
\label{tab:hoge}
\begin{tabular}{ccc}
表
\end{tabular}
\end{minipage}
\end{tabular}
\end{figure}
\end{comment}
\begin{thebibliography}{300}%参考文献 数字は適当
\bibitem{hoge}
hoge著hoge \url{https://hogehoge}
\end{thebibliography}
\end{document}