Created
September 10, 2021 13:50
-
-
Save AllanChain/7575fb414298478fd81e1463d121b357 to your computer and use it in GitHub Desktop.
A LaTeX Class for Modern Physics Lab - 北大近代物理实验报告 LaTeX 类 修改版本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
% MpLtX --- a LaTeX Class for Modern Physics Lab | |
% Copyright (C) 2013 Modern Phys. Lab, School of Phys., Peking Univ. | |
% | |
% MpLtX is a template for experiment report of Modern Physics Lab in | |
% Peking University. This template depends on the "revtex4.2" package from | |
% APS Journals <http://publish.aps.org/revtex/revtex-faq> | |
% | |
% To use this template, you should open the package download from APS Journals' | |
% website as above and follow instructions from the README file in the package. | |
% | |
% LaTeX is marvelous for math formulae composition. However, the script grammar | |
% is rather difficult to handle. Maybe at the beginning, it's convenient to | |
% generate a pretty document. The deeper you went, more weird grammar you got. | |
% Before you found out the whole fantesy-like world built by Knuth, Lamport and | |
% numerous contributors, you would get numerous strange errors unclearly | |
% reported by compiler. | |
% | |
% Anyway, a lot of people wish to find a general document system which is both | |
% easy to use and strong enough to conveniently DIY. Word is easy to use. | |
% However, Word can not produce perfect document in art --- the position and | |
% size are not well calculated. By the way, it's such a pain to do simple but | |
% repeating work in Word such as formating title, generate large data table | |
% and etc. These works can be easily done in LaTeX if you know a little about | |
% programming. HTML is a easy-to-use language to create static document. It is | |
% compatible on all the machines currently because all you need is a simple | |
% browser (Firefox, Chrome or IE). In HTML5, the latest version of HTML, you | |
% can do colorful presentation about the report. You can present dynamic | |
% figures to present your idea clearly. However, the biggest problem for HTML | |
% is that this never renders a beautiful math formula in a simple way. HTML | |
% indeed has a math engine named as MathML. But this guy is notorious for its | |
% unreadable script grammar. So HTML+TeX --- the project MathJax, becomes a | |
% candidate of our dream communication media or e-document form. However, it is | |
% still under development. If you are interested in Java, JLaTeXMath package may | |
% be also a proper one since it provides a LaTeX renderer in Java. | |
% | |
% This template is modified by students in Peking University. | |
% I am Sun Sibai. Cao Chuanwu shared the draft on RenRen Network. However, | |
% the draft did not match the requirement at all. It seems that Cao Chuanwu | |
% did not modified the style from package. He just put the origin content | |
% into LaTeX format. | |
% I changed the style to satisfy the format requirement and fixed some problem | |
% about the incompatibility within the packages. | |
% | |
% So, if you have suggestions, please improve this template with your power. We | |
% will be always glad to see our work useful, popular and wonderful! | |
% | |
% This template has been tested in TeXLive 2012 with the command: | |
% $ xelatex mpltx.tex | |
% compile twice. | |
% | |
% Anyone can modify this template, but don't forget to list the previous | |
% developers and add yourself in. | |
% | |
% Allan Chain <[email protected]> Converted template to class | |
% Sun Sibai <[email protected]> | |
% Cao Chuanwu <> | |
% | |
\NeedsTeXFormat{LaTeX2e}[1996/12/01] | |
\ProvidesClass{mpltx}[2021/09/10 v1.0e Modern Physics Lab Report LaTeX document class] | |
\LoadClass[aps,pre,12pt,onecolumn,showpacs,showkeys]{revtex4-2} | |
\RequirePackage{ctex} | |
\RequirePackage{setspace,dcolumn} | |
\RequirePackage{subfig} | |
\RequirePackage{hyperref} | |
\RequirePackage{graphicx,psfrag,epsfig} | |
\RequirePackage[font=small,format=plain,labelfont=bf,textfont=it,justification=raggedright,singlelinecheck=false]{caption} | |
\RequirePackage{amsmath,amsfonts,amssymb,amsthm,bm} | |
\RequirePackage{geometry} | |
\RequirePackage[mathscr]{eucal} | |
%\RequirePackage{background} %Waterstamp package | |
%\SetBgContents{...的实验报告} %Waterstamp to prevent copying | |
%\SetBgScale{5} %Waterstamp setting | |
\input{size12.clo} | |
\hypersetup{colorlinks=true} | |
\geometry{top=2.54cm,bottom=2.54cm,left=3cm,right=3cm} | |
\renewcommand\appendixname{附录} | |
\renewcommand\abstractname{}%摘要 | |
\renewcommand\tablename{表} | |
\renewcommand\figurename{图} | |
\linespread{1.6} | |
\renewcommand{\labelenumi}{\alph{enumi}.} | |
\leftmargini=20mm | |
\def\@pacs@name{\songti\zihao{-4}{\bf PACS码:}} | |
\def\@keys@name{\songti\zihao{-4}{\bf 关键词:}} | |
\def\Dated@name{日期:} | |
\def\Received@name{\zihao{-5}{接收} } | |
\def\Revised@name{\zihao{-5}{修订} } | |
\def\Accepted@name{\zihao{-5}{采纳} } | |
\def\Published@name{\zihao{-5}{发表} } | |
\def\frontmatter@title@format{\centering\bf\heiti\zihao{3}} | |
\def\frontmatter@title@below{\vspace{15mm}} | |
\def\frontmatter@authorformat{\centering\fangsong\zihao{4}} | |
\def\frontmatter@authorbelow{\vspace{2mm}} | |
\def\frontmatter@affiliationfont{\songti\zihao{-4}} | |
\def\frontmatter@abstractfont{\songti\zihao{-4} \parindent 2em\relax \adjust@abstractwidth} | |
\def\frontmatter@preabstractspace{10mm} | |
\def\frontmatter@postabstractspace{10mm} | |
\def\section{ | |
\@startsection | |
{section} | |
{1} | |
{\z@} | |
{0.8cm \@plus1ex \@minus .2ex} | |
{0.5cm} | |
{ | |
\zihao{4}\bfseries | |
} | |
} | |
\def\subsection{ | |
\@startsection | |
{subsection} | |
{2} | |
{\z@} | |
{.8cm \@plus1ex \@minus .2ex} | |
{.5cm} | |
{ | |
\zihao{-4}\bfseries | |
} | |
} | |
\def\subsubsection{ | |
\@startsection | |
{subsubsection} | |
{3} | |
{\z@} | |
{.8cm \@plus1ex \@minus .2ex} | |
{.5cm} | |
{ | |
\fangsong\zihao{-4}\bfseries | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment