我有一个使用下面显示的样式文件的文档。
我想增加普通部分文本使用的字体大小。
我该在样式文件中做哪些更改才能增加字体大小?
我不想问这样的非一般性问题,但这是我第一次使用 TeX,我现在有点赶时间,我想有经验的 TeX 用户可以快速告诉我。
以下是样式文件和工作示例。我正在尝试增加文本的字体大小之内example.tex 的简介部分。
acm.sty:
% Formatting commands to conform to ACM Conference Proceedings
% Adapted from 'official' ACM style file by Matt Welsh, 16 July 2001
% This version adapted for 10point fonts, Matt Welsh, 20 June 2002
\makeatletter
% For ACM formatting specifications
\newfont{\ixpt}{ptmr at 9pt}
\newfont{\ninept}{ptmr at 9pt}
\newfont{\ttlfnt}{phvb at 18pt}
\newfont{\aufnt}{phvr at 12pt}
\newfont{\affaddr}{phvr at 10pt}
\newfont{\eaddrfnt}{pcrb at 10pt}
\newfont{\secfnt}{ptmb at 12pt}
\newfont{\subsecfnt}{ptmri at 11pt}
\def\small{\@setsize\small{9pt}\ixpt\@ixpt
\abovedisplayskip 7.6pt plus 3pt minus 4pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2pt%
\belowdisplayshortskip 3.6pt plus2pt minus 2pt
\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
\itemsep \parsep}}
%\def\small{\@setsize\small{9pt}\viiipt\@viiipt
%\abovedisplayskip 7.6pt plus 3pt minus 4pt%
%\belowdisplayskip \abovedisplayskip
%\abovedisplayshortskip \z@ plus2pt%
%\belowdisplayshortskip 3.6pt plus2pt minus 2pt
%\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
%\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
%\itemsep \parsep}}
% For ACM copyright space
\newfont{\crnotice}{ptmr at 8pt}
\def\ftype@copyrightbox{8}
\def\copyrightspace{
\@float{copyrightbox}[b]
\begin{center}
\setlength{\unitlength}{1pc}
\begin{picture}(20,6) %Space for copyright notice
\put(0,-0.95){\crnotice{\@toappear}}
\end{picture}
\end{center}
\end@float}
\def\@toappear{} % Default setting blank - commands below change this.
\long\def\toappear#1{\def\@toappear{\parbox[b]{20pc}{\baselineskip 9pt#1}}}
%% MDW
%\toappear{\the\boilerplate\par
%{\confname{\the\conf}} \the\confinfo\par \the\copyrightetc.}
%
\newif\if@ll % to record which version of LaTeX is in use
\expandafter\ifx\csname LaTeXe\endcsname\relax % LaTeX2.09 is used
\else% LaTeX2e is used, so set ll to true
\global\@lltrue
\fi
\if@ll% allow use of old-style font change commands in LaTeX2e
\@maxdepth\maxdepth
%
%\DeclareOldFontCommand{\rm}{\ninept\rmfamily}{\mathrm}
\DeclareOldFontCommand{\rm}{\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
\fi
%
\if@ll
\renewcommand{\rmdefault}{cmr} % was 'ttm'
\renewcommand{\@ptsize}{}
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{10.5\p@}
\abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip 6\p@ \@minus 3\p@
\belowdisplayshortskip 6\p@ \@minus 3\p@
\let\@listi\@listI
}
\else
\def\@normalsize{%changed next to 9 from 10
%\@setsize\normalsize{9\p@}\ixpt\@ixpt
\@setsize\normalsize{10\p@}\xpt\@xpt
\abovedisplayskip 6\p@ \@plus2\p@ \@minus\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip 6\p@ \@minus 3\p@
\belowdisplayshortskip 6\p@ \@minus 3\p@
\let\@listi\@listI
}%
\fi
\if@ll
\newcommand\tensize{\@setfontsize\tensize\@xpt{10\p@}}
\renewcommand\scriptsize{\@setfontsize\scriptsize\@viipt{8\p@}}
\renewcommand\tiny{\@setfontsize\tiny\@vpt{6\p@}}
\renewcommand\large{\@setfontsize\large\@xiipt{14\p@}}
\renewcommand\Large{\@setfontsize\Large\@xivpt{18\p@}}
\renewcommand\LARGE{\@setfontsize\LARGE\@xviipt{20\p@}}
\renewcommand\huge{\@setfontsize\huge\@xxpt{25\p@}}
\renewcommand\Huge{\@setfontsize\Huge\@xxvpt{30\p@}}
\else
\def\tensize{\@setsize\tensize\@xpt{10\p@}}
\def\scriptsize{\@setsize\scriptsize{8\p@}\viipt\@viipt}
\def\tiny{\@setsize\tiny{6\p@}\vpt\@vpt}
\def\large{\@setsize\large{14\p@}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18\p@}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{20\p@}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25\p@}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
\fi
\normalsize
% Section headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%need a 12 pt font size for section and abstract headings
\def\secsize{\@setsize\secsize{12pt}\xiipt\@xiipt}
%need a 11 pt font size for subsection headings
\def\subsize{\@setsize\subsize{11pt}\xipt\@xipt}
\def\section{\@startsection {section}{1}{\z@}{-10\p@ \@plus -4\p@ \@minus -2\p@}%
{4\p@}{\secsize\bf}}
\def\subsection{\@startsection {subsection}{2}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}%
{4\p@}{\subsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-8\p@ \@plus -2\p@ \@minus -\p@}%
{4\p@}{\subsecfnt}}
% Zap space before \paragraph
\def\paragraph{\@startsection {paragraph}{4}{\z@}{8pt plus 1pt minus 1pt}
{-1em}{\normalfont\normalsize\bfseries}}
\makeatother
% Remove some of the space around figure captions
\setlength\abovecaptionskip{-0.1in}
%\setlength\belowcaptionskip{-0.1in}
双列.sty:
% twocolumn.sty 27 Jan 85
\twocolumn
\sloppy
\flushbottom
\parindent 1em
\leftmargini 2em
\leftmarginv .5em
\leftmarginvi .5em
\oddsidemargin 30pt
\evensidemargin 30pt
\marginparwidth 48pt
\marginparsep 10pt
\textwidth 410pt
示例.tex:
\documentclass{article}
\usepackage{program}
\usepackage{acm} % ACM proceedings formatting
\usepackage{times} % Use Adobe Times font set
\usepackage{epsfig,twocolumn}
\usepackage{url}
\usepackage[english]{babel} % mdw: Required to get good hyphenation on RH6.0
% (fixed in RH6.1)
\usepackage{graphicx}
\usepackage{color}
% DO NOT EDIT THE BELOW BLOCK OF CODE
\def\dsp{\def\baselinestretch{1.10}}
\dsp
\newcommand{\XXXnote}[1]{{\bf\color{red} XXX: #1}}
\setlength{\textheight}{9.25in}
\setlength{\columnsep}{0.33in}
\setlength{\textwidth}{7.4in}
\setlength{\footskip}{0.0in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\oddsidemargin}{-.45in}
\setlength{\parindent}{1pc}
\pagestyle{empty}
\begin{document}
\date{}
%%%%%%%%%%%% TITLE AND AUTHORS %%%%%%%%%%%%
% Title here
\title{\ttlfnt A Great Title for a Paper}
% Author names, affiliations, and e-mail below
\author{
{\aufnt Jhonny Walker} \\
{\affaddr Affiliation} \\
{\affaddr [email protected]}
}
\maketitle
%\copyrightspace
\thispagestyle{empty}
%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%
\subsection*{Abstract}
\begin{small}
This is the abstract of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.
\end{small}
%%%%%%%%%%%%% BODY OF PAPER %%%%%%%%%%%%%%
%%%%%%%%%%%%% INTRODCTION %%%%%%%%%%%%%%
\section{Introduction}
This is the text that I want to make largerr! This is the introduction of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.
\end{document}
答案1
一种粗略的方法是紧跟在 之后添加诸如 等命令。这样\large
,本地设置了大小的文档元素(例如章节标题和说明)将不受影响。请注意,以通常的方式(即)选择字体大小在这里不起作用,因为 中的代码会覆盖设置。\Large
\section{Introduction}
\documentclass[12pt]{article}
acm.sty
答案2
该包scrextend
向其他类提供了 KOMA-Script 类的几个功能。这些功能之一是更改字体大小\documentclass
。使用
\usepackage[fontsize=12pt]{scrextend}
某处后acm
不仅加载会发生变化\normalsize
,而且其他字体大小命令也会根据基本字体大小 12pt 进行更改:
\documentclass{article}
\usepackage{program}
\usepackage{acm} % ACM proceedings formatting
\usepackage[fontsize=12pt]{scrextend}% adds several KOMA-Script features like
% changing the document font size after
% \documentclass
\usepackage{times} % Use Adobe Times font set
\usepackage{epsfig,twocolumn}
\usepackage{url}
\usepackage[english]{babel} % mdw: Required to get good hyphenation on RH6.0
% (fixed in RH6.1)
\usepackage{graphicx}
\usepackage{color}
% DO NOT EDIT THE BELOW BLOCK OF CODE
\def\dsp{\def\baselinestretch{1.10}}
\dsp
\newcommand{\XXXnote}[1]{{\bf\color{red} XXX: #1}}
\setlength{\textheight}{9.25in}
\setlength{\columnsep}{0.33in}
\setlength{\textwidth}{7.4in}
\setlength{\footskip}{0.0in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\oddsidemargin}{-.45in}
\setlength{\parindent}{1pc}
\pagestyle{empty}
\begin{document}
\date{}
%%%%%%%%%%%% TITLE AND AUTHORS %%%%%%%%%%%%
% Title here
\title{\ttlfnt A Great Title for a Paper}
% Author names, affiliations, and e-mail below
\author{
{\aufnt Jhonny Walker} \\
{\affaddr Affiliation} \\
{\affaddr [email protected]}
}
\maketitle
%\copyrightspace
\thispagestyle{empty}
%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%
\subsection*{Abstract}
\begin{small}
This is the abstract of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.
\end{small}
%%%%%%%%%%%%% BODY OF PAPER %%%%%%%%%%%%%%
%%%%%%%%%%%%% INTRODCTION %%%%%%%%%%%%%%
\section{Introduction}
This is the text that I want to make largerr! This is the introduction of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.
\end{document}
结果是:
代替:
但是,如果您只想更改基本字体大小,而不更改或\normalsize
等附加大小,则可以在加载后简单地进行修补。但请注意,也应更改为,因为否则摘要的最后一段将设置为基线跳过,而不是:\large
\small
\normalsize
acm
\begin{small}…\end{small}
\begin{small}…\par\end{small}
\normalsize
\small
\documentclass{article}
\usepackage{program}
\usepackage{acm} % ACM proceedings formatting
\usepackage{xpatch}
\makeatletter
\xpatchcmd{\normalsize}{\@xpt{10.5\p@}}{{\@xiipt}{14\p@}}{}{}
\makeatother
\usepackage{times} % Use Adobe Times font set
\usepackage{epsfig,twocolumn}
\usepackage{url}
\usepackage[english]{babel} % mdw: Required to get good hyphenation on RH6.0
% (fixed in RH6.1)
\usepackage{graphicx}
\usepackage{color}
% DO NOT EDIT THE BELOW BLOCK OF CODE
\def\dsp{\def\baselinestretch{1.10}}
\dsp
\newcommand{\XXXnote}[1]{{\bf\color{red} XXX: #1}}
\setlength{\textheight}{9.25in}
\setlength{\columnsep}{0.33in}
\setlength{\textwidth}{7.4in}
\setlength{\footskip}{0.0in}
\setlength{\topmargin}{-0.25in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\oddsidemargin}{-.45in}
\setlength{\parindent}{1pc}
\pagestyle{empty}
\begin{document}
\date{}
%%%%%%%%%%%% TITLE AND AUTHORS %%%%%%%%%%%%
% Title here
\title{\ttlfnt A Great Title for a Paper}
% Author names, affiliations, and e-mail below
\author{
{\aufnt Jhonny Walker} \\
{\affaddr Affiliation} \\
{\affaddr [email protected]}
}
\maketitle
%\copyrightspace
\thispagestyle{empty}
%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%
\subsection*{Abstract}
\begin{small}
This is the abstract of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.\par
\end{small}
%%%%%%%%%%%%% BODY OF PAPER %%%%%%%%%%%%%%
%%%%%%%%%%%%% INTRODCTION %%%%%%%%%%%%%%
\section{Introduction}
This is the text that I want to make largerr! This is the introduction of the paper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper sapien. Pellentesque ut lacus sit amet magna ornare ultricies ac sed leo. Vestibulum gravida metus et massa ultricies placerat nec eu lacus. Fusce malesuada lorem sed nunc pulvinar malesuada. Vestibulum nec leo eu arcu convallis consectetur ut id metus. Praesent sagittis placerat nisi, ac semper lorem adipiscing vel. Donec ligula lectus, semper nec fringilla sit amet, sodales facilisis ante. Aliquam varius congue vestibulum. In hac habitasse platea dictumst. Nullam mi est, dignissim ac fermentum vitae, hendrerit sed metus. Nullam nec feugiat mauris.
\end{document}
还要注意,您的代码是 LaTeX、plainTeX、过时的软件包和黑客的丑陋混合体,我永远不会使用。