mirror of
https://github.com/ElegantLaTeX/ElegantPaper.git
synced 2026-01-26 12:24:37 +08:00
add bibstyle option
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
%!TEX program = pdflatex
|
%!TEX program = pdflatex
|
||||||
% Full chain: pdflatex -> bibtex -> pdflatex -> pdflatex
|
% Full chain: pdflatex -> bibtex -> pdflatex -> pdflatex
|
||||||
\documentclass[11pt,en,authoryear]{elegantpaper}
|
\documentclass[11pt,en,bibstyle=unsrt]{elegantpaper}
|
||||||
|
|
||||||
\title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers}
|
\title{ElegantPaper: An Elegant \LaTeX{} Template for Working Papers}
|
||||||
\author{Ethan DENG \\ Fudan University \and Dongsheng DENG \\ PA Technology}
|
\author{Ethan DENG \\ Fudan University \and Dongsheng DENG \\ PA Technology}
|
||||||
@@ -57,7 +57,7 @@ Default \LaTeX{} commands and environments are all the same in this template\foo
|
|||||||
|
|
||||||
|
|
||||||
\subsection{Bibliography}
|
\subsection{Bibliography}
|
||||||
This template used \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer} under the option \lstinline{lang=en}. Citation example: ~\cite{en3} used data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
|
This template used \hologo{BibTeX} to generate the bibliography, the default bibliography style is \lstinline{aer} under the option \lstinline{lang=en}. Citation example: ~\citep{en1,en2,en3} used data from a major peer-to-peer lending marketplace in China to study whether female and male investors evaluate loan performance differently.
|
||||||
|
|
||||||
If you want to use \hologo{BibTeX}, you must create a file named \lstinline{wpref.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{wpref.bib} file, and cite the bibkey in the \lstinline{tex} file. Note that \hologo{BibTeX} has to be added.
|
If you want to use \hologo{BibTeX}, you must create a file named \lstinline{wpref.bib}, and add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{wpref.bib} file, and cite the bibkey in the \lstinline{tex} file. Note that \hologo{BibTeX} has to be added.
|
||||||
|
|
||||||
|
|||||||
@@ -25,11 +25,32 @@
|
|||||||
\DeclareVoidOption{authoryear}{\ekv{cite=authoryear}}
|
\DeclareVoidOption{authoryear}{\ekv{cite=authoryear}}
|
||||||
\DeclareVoidOption{super}{\ekv{cite=super}}
|
\DeclareVoidOption{super}{\ekv{cite=super}}
|
||||||
|
|
||||||
|
\DeclareStringOption[apalike]{bibstyle}
|
||||||
|
|
||||||
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{article}}
|
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{article}}
|
||||||
\ProcessKeyvalOptions*\relax
|
\ProcessKeyvalOptions*\relax
|
||||||
\LoadClass{article}
|
\LoadClass{article}
|
||||||
|
|
||||||
|
% settings for the hyperref and geometry
|
||||||
|
\RequirePackage[
|
||||||
|
left=1in,
|
||||||
|
right=1in,
|
||||||
|
top=1in,
|
||||||
|
bottom=1in,
|
||||||
|
headheight=0pt,
|
||||||
|
headsep=0pt]{geometry}
|
||||||
|
\setlength{\headsep}{5pt}
|
||||||
|
|
||||||
|
\RequirePackage{hyperref}
|
||||||
|
\hypersetup{
|
||||||
|
pdfborder={0 0 0},
|
||||||
|
colorlinks=true,
|
||||||
|
linkcolor={winered},
|
||||||
|
urlcolor={winered},
|
||||||
|
filecolor={winered},
|
||||||
|
citecolor={winered},
|
||||||
|
linktoc=all,
|
||||||
|
}
|
||||||
|
|
||||||
\RequirePackage{amsthm}
|
\RequirePackage{amsthm}
|
||||||
\RequirePackage{amsmath}
|
\RequirePackage{amsmath}
|
||||||
@@ -70,19 +91,6 @@
|
|||||||
\definecolor{commentcolor}{RGB}{0,100,0}
|
\definecolor{commentcolor}{RGB}{0,100,0}
|
||||||
\definecolor{frenchplum}{RGB}{190,20,83}
|
\definecolor{frenchplum}{RGB}{190,20,83}
|
||||||
|
|
||||||
% settings for the hyperref and geometry
|
|
||||||
\RequirePackage{hyperref}
|
|
||||||
\hypersetup{
|
|
||||||
pdfborder={0 0 0},
|
|
||||||
colorlinks=true,
|
|
||||||
linkcolor={winered},
|
|
||||||
urlcolor={winered},
|
|
||||||
filecolor={winered},
|
|
||||||
citecolor={winered},
|
|
||||||
linktoc=all,
|
|
||||||
}
|
|
||||||
\RequirePackage[left=1in, right=1in, top=1in, bottom=1in,headheight=0pt,headsep=0pt]{geometry}
|
|
||||||
\setlength{\headsep}{5pt}
|
|
||||||
|
|
||||||
% add the \email cmd
|
% add the \email cmd
|
||||||
\newcommand\email[1]{\href{mailto:#1}{\nolinkurl{#1}}}
|
\newcommand\email[1]{\href{mailto:#1}{\nolinkurl{#1}}}
|
||||||
@@ -175,7 +183,7 @@
|
|||||||
\newcommand{\keywords}[1]{\vskip2ex\par\noindent\normalfont{\bfseries Keywords: } #1}
|
\newcommand{\keywords}[1]{\vskip2ex\par\noindent\normalfont{\bfseries Keywords: } #1}
|
||||||
\newcommand\figref[1]{{\bfseries Figure~\ref{#1}}}
|
\newcommand\figref[1]{{\bfseries Figure~\ref{#1}}}
|
||||||
\newcommand\tabref[1]{{\bfseries Table~\ref{#1}}}
|
\newcommand\tabref[1]{{\bfseries Table~\ref{#1}}}
|
||||||
\bibliographystyle{aer}
|
\bibliographystyle{\ELEGANT@bibstyle}
|
||||||
}{\relax}
|
}{\relax}
|
||||||
|
|
||||||
\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}}
|
\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB |
Binary file not shown.
@@ -1,27 +0,0 @@
|
|||||||
# This file is the source file of the scatter.pdf
|
|
||||||
# source page: https://matplotlib.org/gallery/shapes_and_collections/scatter.html
|
|
||||||
import numpy as np
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
|
|
||||||
# Fixing random state for reproducibility
|
|
||||||
np.random.seed(19680801)
|
|
||||||
|
|
||||||
|
|
||||||
N = 50
|
|
||||||
x = np.random.rand(N)
|
|
||||||
y = np.random.rand(N)
|
|
||||||
colors = np.random.rand(N)
|
|
||||||
area = (30 * np.random.rand(N))**2 # 0 to 15 point radii
|
|
||||||
|
|
||||||
ax = plt.subplot(111)
|
|
||||||
ax.scatter(x, y, s=area, c=colors, alpha=0.5)
|
|
||||||
|
|
||||||
# Hide the right and top spines
|
|
||||||
ax.spines['right'].set_visible(False)
|
|
||||||
ax.spines['top'].set_visible(False)
|
|
||||||
|
|
||||||
# Only show ticks on the left and bottom spines
|
|
||||||
ax.yaxis.set_ticks_position('left')
|
|
||||||
ax.xaxis.set_ticks_position('bottom')
|
|
||||||
|
|
||||||
plt.savefig('scatter.pdf', transparent=True)
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 218 KiB |
Reference in New Issue
Block a user