修改文章类文档定义的命令

修改文章类文档定义的命令

因此,我尝试在现有文章类文件中添加或删除几行,以制作类似的东西NEWarticle.cls。原始类我使用了以下命令行,这给了我下面的图像:

\documentclass[12pt, twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage{KSOlecture}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LO]{\slshape\leftmark}
\fancyhead[RE]{\slshape\rightmark}
\fancyhead[RO,LE]{\oldstylenums{\thepage}}
\fancyfoot[RO,LE]{\scriptsize\copyright\oldstylenums{\the\year} Name}
\fancyhfoffset[RE,LO]{\oddsidemargin}
\fancyhfoffset[RO,LE]{\marginparwidth}
\fancypagestyle{first}{
 \fancyhf{}
 \fancyfoot[R]{\scriptsize\copyright\oldstylenums{\the\year} Name}
 \fancyfoot[C]{\oldstylenums{\thepage}}
 \fancyfootoffset{\marginparwidth}
 \fancyheadoffset{0pt} }
\renewcommand{\headrulewidth}{0.25pt}

\newcommand{\Com}[1]{\smash{\tikz[baseline=(C.base)]
            \node[rectangle,draw,thin,minimum width=1.3em,minimum height=1.3em,inner sep=0pt] (C) {#1};}}

\begin{document}
\title{The Postulates of Quantum Mechanics}
\author{}
\date{\oldstylenums{17}--\oldstylenums{29} January \oldstylenums{\the\year}}
\maketitle
\thispagestyle{first}

Blah blah blah...
\end{document}

在此处输入图片描述

我想renewcommand在原始文章类\maketitle命令中执行某种类型的操作,以制作出与下图完全一样的东西:

在此处输入图片描述

例如:

\documentclass[12pt,twoside]{article}
%other commands and packages...
\begin{document}
\lecturenumber{30} %I want it to use the \Com command
\title{Quantum Mechanics: Motivation and Paradoxes}
\author{}
\date{\oldstylenums{17}--\oldstylenums{29} January \oldstylenums{\the\year}}
\sources{stuff stuff stuff} %Probably use a description environment
\maketitle
\thispagestyle{first}

STufffffff
\end{document}

澄清一下:article.cls 中有一段代码用于创建标题页。我想稍微修改一下这些代码,以创建带有引文的图像。为了对 article.cls 进行更改,我必须创建一个新的类,该类的标题为 NEWarticle.cls。所以,我的问题是,如何更改 article 类设置的定义和样式,以便制作我想要的东西?

相关内容