Skip to content

Instantly share code, notes, and snippets.

@spaghetti-source
Created December 25, 2013 20:39
Show Gist options
  • Save spaghetti-source/8126745 to your computer and use it in GitHub Desktop.
Save spaghetti-source/8126745 to your computer and use it in GitHub Desktop.
my tex template
%{{{
\documentclass[a4paper,11pt]{article} % single column
%\documentclass[a4paper,11pt,twocolumn]{article} % two columns
\usepackage[dvipdfmx]{graphicx}
\usepackage{latexsym}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{enumerate}
\usepackage{multirow}
\usepackage{algorithm,algpseudocode}
%\usepackage{showkeys} % debug labels and references
\setlength{\oddsidemargin}{-1in}
\setlength{\topmargin}{-1in}
\addtolength{\oddsidemargin}{20mm}
\setlength{\textwidth}{170mm}
\setlength{\headheight}{10mm}
\setlength{\headsep}{10mm}
\setlength{\textheight}{257mm}
\setlength{\columnsep}{15mm}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% Theorem Environments; use common counter
\theoremstyle{definition}
\newtheorem{theorem} {Theorem}
\newtheorem{lemma} [theorem] {Lemma}
\newtheorem{proposition}[theorem] {Proposition}
\newtheorem{corollary} [theorem] {Corollary}
\newtheorem{example} [theorem] {Example}
\newtheorem{remark} [theorem] {Remark}
% reset counter when section changed
\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}
% enumeration
\renewcommand{\labelenumi}{(\arabic{enumi})}
\renewcommand{\labelenumii}{(\alph{enumii})}
% my definitions
\renewcommand{\vec}[1]{\mathbf{#1}}
\newcommand{\ceil}[1]{\lceil #1 \rceil}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
% footnoterule
\renewcommand{\footnoterule}{
\vspace*{2mm} \hrule width \columnwidth \vspace*{2mm}}
\newcommand{\finbox}{\hspace*{\fill}$\rule{0.2cm}{0.2cm}$}
% ToDO List
\makeatletter
\newcounter{todo}
\def\TODO#1{\refstepcounter{todo}
\addcontentsline{loc}{todo}{\thetodo. #1} {{\bf [TODO \thetodo: #1]} }}
\def\l@todo#1#2{\par\noindent #1\hfill #2}
\def\listoftodos{\section*{TODOs} \@starttoc{loc} \medskip \hrule \medskip}
\makeatother
%}}}
\title{template}
\author{Takanori MAEHARA\footnote{maehara@prefield.com}}
%\date{2012/9/XX}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
%\bibliographystyle{plain}
%\bibliography{main}
\begin{thebibliography}{99}
\bibitem{aaa} aaa
\end{thebibliography}
\vfill
\hfill (\jobname.tex, printed \the\year/\the\month/\the\day.)
\label{LastPage}
\end{document}
\endinput
% vim:foldmethod=marker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment