Pau*_*ius 14 customization latex
我真的不需要对默认文章文档类进行大量更改.我想要的只是:
也许,在这种情况下有一些可能有用的软件包?
god*_*byk 15
有许多软件包可以帮助您实现您正在寻找的结果.我在下面选择的包是我喜欢的包,但有不止一种方法可以做到.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{paulius-article}[2009/02/25 v0.1 Paulius' modified article class]
% Passes and class options to the underlying article class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
% Load LaTeX's article class with the `titlepage' option so that \maketitle creates a title page, not just a title block
\LoadClass[titlepage]{article}
% Redefine the page margins
% TODO: Adjust margins to your liking
\RequirePackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
% Remove the numbers from all the headings (\section, \subsection, etc.)
\setcounter{secnumdepth}{-1}
% To modify the heading styles more thoroughly use the titlesec package
%\RequirePackage{titlesec}
% Adjust the title page design
% NOTE: This is the default LaTeX title page -- free free to make it look like whatever you want.
% TODO: Add company name and logo somewhere in here.
\newcommand{\maketitlepage}{%
\null\vfil
\vskip 60\p@
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
{\large
\lineskip .75em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1.5em%
{\large \@date \par}% % Set date in \large size.
\end{center}\par
\@thanks
\vfil\null%
\end{titlepage}%
}
% This some before-and-after code that surrounds the title page. It shouldn't need to be modified.
% I've pulled out the part the actually typesets the title page and placed it in the \maketitlepage command above.
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small%
\let\footnoterule\relax%
\let \footnote \thanks%
\maketitlepage%
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
% TODO: If there are any other article modifications required, add them here.
% That's all, folks!
\endinput
Run Code Online (Sandbox Code Playgroud)
您需要阅读几何包的文档以调整边距.该titlesec包,如果你想(从刚刚关闭数除外)修改标题的外观可以使用.
标题页是LaTeX的默认标题页.您需要对其进行修改以添加公司名称和徽标.我已经从与标题页相关的所有其他代码中分离出"要打印的东西".您应该只需要更改\maketitlepage命令.在您的文档中,用于\maketitle打印标题页.
\documentclass{paulius-article}
\title{My New Document Class}
\author{Paulius}
\usepackage{lipsum}% provides some filler text
\begin{document}
\maketitle% Actually makes a title page
\section{Section Heading}
\subsection{Look no numbers!}
\lipsum[1-10]
\end{document}
Run Code Online (Sandbox Code Playgroud)
如果我错过了您的任何要求,请告诉我.
你从一开始
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classname}[2009/02/24]
\LoadClass{article}
Run Code Online (Sandbox Code Playgroud)
并在此之后添加任何自定义.
更新:我建议您阅读LaTeX2e用于类和包编写器:PDF,HTML.第3节(类或包的结构)中的示例应该是有用的.
有几点可能很有趣:
您可以\begin{document}通过重置控制长度来重新定义标题中的边距(即之前)\setlength{\textwidth}{6.80in},\setlength{\oddsidemargin}{0.0in}依此类推.
\section*{...}会给你未编号的部分.同样的\subsection*和\subsubsection*.如果您确实使用了这个技巧并且还想要工作引用,那么您可以查看如何在LaTeX中发出引用的文本内容?.
titlepage环境了吗?但也许最重要的是,回忆录课程可以为您提供所需的一切控制,而无需任何课堂攻击.查看文档.
或者使用CanBerkGüder的建议.