更改参考部分的字体大小和缩进

更改参考部分的字体大小和缩进

我正在为一个会议写一篇论文。他们提供了一个 LaTeX 样式的文件,但编译的参考部分与他们自己的要求不同。他们要求字体大小为 8,无缩进,索引号应该有一个方括号,如[1] xxx

另一方面,我的编译输出是字体大小 10,有缩进,没有方括号,所以它就像1. xxx

有人能看一下样式文件并告诉我在哪里修复了这个问题吗?我找不到任何与字体大小、缩进或括号相关的内容。我对 LaTeX 样式文件不太了解。

我无法上传文件所以我必须在这里发布整个样式文件代码:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   File: osameet2.sty                %
%                  Date: March 21, 2007               %
%                                                     %
%       (c) 2007 Optical Society of America           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{osameet2}[2007/03/21 LaTeX package for submission to OSA's conferences]

%% packages
\usepackage{cite}
\RequirePackage{geometry}
\usepackage{color}
\usepackage{graphicx}
%% fonts
\usepackage{mathptmx,courier,textcomp}
\usepackage[scaled=.92]{helvet}

\geometry{letterpaper,nohead,margin=1in} %% uses geometry.sty
\parindent1em %% em tied to font
\parskip0pc
\linespread{1}
\pagestyle{empty}
\sloppy

%%Title page elements

\newcommand\MEETtitle[1]{\LARGE \bf \hskip2.25pc \parbox{.8\textwidth}{ \noindent%
   \LARGE \bf \begin{center} #1 \end{center}\rm } \vskip.1in \rm\normalsize }

\newcommand\MEETauthor[1]{\hskip2.25pc \parbox{.8\textwidth}{ \noindent%
   \normalsize \bf \begin{center} #1 \end{center}\rm } \vskip-1pc }

\newcommand\MEETaddress[1]{\hskip2.25pc \parbox{.8\textwidth}{ \noindent%
   \footnotesize \it \begin{center} #1 \end{center}\rm }  \normalsize \vskip-.2cm }

\newcommand\MEETemail[1]{\vskip-.3cm \parskip0pc\hskip2.25pc \footnotesize%
   \parbox{.8\textwidth}{\begin{center}\textit{#1}  \end{center} } \normalsize  \vskip-.2cm}

\newcommand\url[1]{\textcolor{blue}{\underline{#1}}}

\newcommand\homepage[1]{\vskip-1pt \parskip0pc\hskip2.25pc \footnotesize %% CHANGE 8-3-99
   \parbox{.8\textwidth}{\begin{center}\it \textcolor{blue}{\underline{#1}} \rm \end{center} } \normalsize\vskip-.2cm}

\newcommand\ocis[1]{\vskip-2.75pc \begin{center}\parbox{.8\textwidth}{\footnotesize\bf OCIS codes: \ \rm #1 \hfill} \end{center}\vskip3pt}%

\let\title\MEETtitle
\let\author\MEETauthor
\let\affil\MEETaddress
\let\address\MEETaddress
\let\email\MEETemail
\let\pacs\ocis

\renewenvironment{abstract}%%
{\vskip1pc\noindent\begin{center} \begin{minipage}{.8\textwidth} {\bf Abstract: \ } }
{ \\ \vskip-.75pc \noindent \small \copyright \, \number\year \hskip.05in
   Optical Society of America \\ \hfil \end{minipage}\end{center}\normalsize\vskip-1.75pc}%

%%Various customizations

\renewcommand\maketitle{\vskip0pt} %%deactivates \maketitle in LaTeX
\def\affiliation{\address}
\def\onlinecite{\citeonline}
%Fig. and Table Labels

\renewcommand\figurename{Fig.}
\def\fps@table{h}%\def\fps@table{!htbp}
\renewcommand\tablename{Table}

%% New caption command
\newcommand\@MaxCapWidth{5.5in}
\setlength\belowcaptionskip{.1in}
\setlength\abovecaptionskip{.15in}
\long\def\@makecaption#1#2{%
  \normalsize
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1. #2}%
  \ifdim \wd\@tempboxa >\@MaxCapWidth
    \hskip.5in\parbox{5.5in}{#1. #2}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip\normalsize}

%%References

\renewcommand\refname{\normalsize References \rm}
\setlength\bibindent{.3in}
\renewenvironment{thebibliography}[1]
     {\section*{\refname
        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
      \list{\@arabic\c@enumiv .}
           {\settowidth\labelwidth{.25in}%
            \leftmargin\labelwidth
  \setlength{\parsep}{0pc}
  \setlength{\labelsep}{0.5em}
  \setlength{\itemsep}{0.05pc}%{-0.06in}
  \setlength{\listparindent}{0in}
  \setlength{\itemindent}{0in}
  \setlength{\leftmargin}{.3in}
  \setlength{\rightmargin}{0in}
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m \normalsize}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist \vskip.2in}
\let\@openbib@code\@empty
\newcommand\OSAJNLReferences{\thebibliography{}}
\newcommand\OSAJNLReflinks{\thebibliography{}}
\newcommand\References{\thebibliography{}}
\newcommand\references{\thebibliography{}}
\let\endOSAJNLReferences\endthebibliography
\let\endOSAJNLlinks\endthebibliography
\let\endReferences\endthebibliography

%%Section parameters
\renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad }
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}

\renewcommand\section{\@startsection {section}{1}{0pt}%
                                   {-2.5ex plus -1ex minus -.2ex}%
                                   {1.3ex plus .2ex}%
                                   {\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{0pt}%
                                     {-2.25ex plus -1ex minus -.2ex}%
                                     {1ex plus .2ex}%
                                     {\normalsize\itshape}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{0pt}%
                                     {-2.25ex plus -1ex minus -.2ex}%
                                     {1ex plus .2ex}%
                                     {\small\upshape}}

\frenchspacing

\hyphenation {ac-cord-ing
           allow
           back-scat-ter
           back-scat-te-ring
           back-scat-tered
           scat-te-ring
           Based based
           cases
           cen-tered
           changed
           co-incide
           con-cerning
           con-ven-tional
           de-creased
           de-po-lar-iz-ation
           de-tector de-tectors
           de-vi-ation
           dis-cussion
           dis-tribu-tion
           dis-tribu-tions
           dis-trib-ute
           dis-trib-uted
           Ehhalt
           extinc-tion
           found
           Geest-hacht
           ground
           Hink-ley
           il-lus-trated
           il-lus-trate
           Intro-ducing
           Klap-heck
           lati-tude
           measure-ment
           measure-ments
           meas-ured
           measuring
           mixing
           north-east
           orig-inated
           op-er-ating
           out-flow
           pres-ence
           primary
           rather
           rela-tive
           sig-nal
           sig-nals
           solid
           tem-pera-ture
           Tem-pera-ture
           trans-ported
           tropo-pause
           Tropo-pause
           tropo-sphere
           Tropo-sphere
           tube
           tubes
           Values
           varies
           Weather}

\def\opex{ Opt.\ Express }
\def\ao{ Appl.\  Opt.\ }
\def\ap{ Appl.\  Phys.\ }
\def\apa{ Appl.\  Phys.\ A }
\def\apb{ Appl.\  Phys.\ B }
\def\apl{ Appl.\ Phys.\ Lett.\ }
\def\apj{ Astrophys.\ J.\ }
\def\bell{ Bell Syst.\ Tech.\ J.\ }
\def\jqe{ IEEE J.\ Quantum Electron.\ }
\def\assp{ IEEE Trans.\ Acoust.\ Speech Signal Process.\ }
\def\aprop{ IEEE Trans.\ Antennas Propag.\ }
\def\mtt{ IEEE Trans.\ Microwave Theory Tech.\ }
\def\iovs{ Invest.\ Ophthalmol.\ Visual\ Sci.\ }
\def\jcp{ J.\ Chem.\ Phys.\ }
\def\jmo{ J.\ Mod.\ Opt.\ }
\def\jon{J.\ Opt.\ Netw.\ }
\def\josa{ J.\ Opt.\ Soc.\ Am.\ }
\def\josaa{ J.\ Opt.\ Soc.\ Am.\ A }
\def\josab{ J.\ Opt.\ Soc.\ Am.\ B }
\def\jpp{ J.\ Phys.\ (Paris) }
\def\nat{ Nature (London) }
\def\oc{ Opt.\ Commun.\ }
\def\ol{ Opt.\ Lett.\ }
\def\pl{ Phys.\ Lett.\ }
\def\pra{ Phys.\ Rev.\ A }
\def\prb{ Phys.\ Rev.\ B }
\def\prc{ Phys.\ Rev.\ C }
\def\prd{ Phys.\ Rev.\ D }
\def\pre{ Phys.\ Rev.\ E }
\def\prl{ Phys.\ Rev.\ Lett.\ }
\def\rmp{ Rev.\ Mod.\ Phys.\ }
\def\pspie{ Proc.\ SPIE\ }
\def\sjqe{ Sov.\ J.\ Quantum Electron.\ }
\def\vr{ Vision Res.\ }
\def\cleo{ {\it Conference on Lasers and Electro-Optics }}
\def\assl{ {\it Advanced Solid State Lasers }}
\def\tops{ Trends in Optics and Photonics }

%% end osameet2.sty

答案1

您需要重新定义thebibliography样式文件中定义的环境(我发现他们提供的文件不能满足他们的要求,这有点奇怪);完整的示例包括必要的重新定义:

\documentclass{article}  
\usepackage{osameet2}  

\makeatletter
\renewcommand\@biblabel[1]{\fontsize{8}{9.6}\selectfont[#1]}
\renewenvironment{thebibliography}[1]
     {\section*{\refname
        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
  \setlength{\parsep}{0pc}
  \setlength{\labelsep}{0.5em}
  \setlength{\itemsep}{0.05pc}
  \setlength{\listparindent}{0in}
  \setlength{\itemindent}{0in}
  \setlength{\rightmargin}{0in}
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m\fontsize{8}{9.6}\selectfont}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist \vskip.2in}
\makeatother

\begin{document}  
\section{Test Section}
\cite{A}
\begin{thebibliography}{9}
\bibitem{A} test A.
\end{thebibliography}
\end{document}

在此处输入图片描述

相关内容