我正在尝试获取符合期刊规范的 LaTeX 样式(PDF)
我使用了一种revtex
经过多次调整的文档样式,并且得到了接近所需的输出,但我被命令创建的一些特定内容卡住了\maketitle
。我的问题非常相似,所以希望其中一个问题的解决方案能指引我解决所有问题。
- 是否可以使用环境
\abstract{}
,但让其在打印的摘要前加上粗体“ABSTRACT:”前缀,而不是仅仅打印摘要? - 中有一个
\keywords{}
环境revtex
,但默认情况下它会以常规摘要字体显示“关键词:”。我想修改它以符合期刊的规范(大写,粗体) - 是否可以更改
\date{}
显示方式(例如,将前缀从“日期:”更改为“于...呈现”之类的内容)
代码如下:
\documentclass[a4paper,twocolumn,notitlepage, %
superscriptaddress,showkeys,nopacs, %
jmp,10pt]{revtex4-1} % "9pt" doesn't actually do anything because revtext has only 10,11,12pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Attempt to get a style or template working that matches requirements
% at the two links below:
% http://www.jsae.or.jp/taikai/manuscript_sample_e.pdf
% http://www.jsae.or.jp/taikai/manu_guide_e.pdf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Various packages that I intend to use in my document - kept here to pre-empt package conflicts
\usepackage{lipsum}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage{dcolumn}
\usepackage{hyperref}
\usepackage{tabularx} % To produce tables with long text
\usepackage[capitalise,noabbrev]{cleveref} % http://www.howtotex.com/packages/automatic-clever-references-with-cleveref/
\usepackage{epstopdf} % http://tug.org/pipermail/texworks/2010q2/002895.html
%%% Set page margins
% Left, right, bottom margins set directly. Top margin set to 20mm + 5mm header-separation
\usepackage[left=18mm,top=20mm,right=18mm,bottom=25mm,includehead,nofoot,headheight=0pt,headsep=5mm]{geometry}
%%% Get numeration of headings with full context (ie, 2.1.3 SubSubsection)
\def\thesection{\arabic{section}}%
\def\thesubsection{\arabic{section}.\arabic{subsection}}%
\def\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}%
\def\theparagraph{\arabic{paragraph}}%
\def\thesubparagraph{\theparagraph.\arabic{subparagraph}}%
\setcounter{secnumdepth}{5}%
%%% Set heading font, style and placement
\usepackage{titlesec}
\titleformat*{\section}{\bfseries\filcenter\MakeUppercase}
\titleformat*{\subsection}{\bfseries}
\titleformat*{\subsubsection}{\bfseries}
%%% Set heading spacing
\titlespacing{\section}{0pt}{1.5em}{0.25em}
\titlespacing{\subsection}{0pt}{1em}{0em}
\titlespacing{\subsubsection}{0pt}{1em}{0em}
%%% Settings to explicitly place text in the top-right corner
\usepackage[absolute]{textpos}
\TPGrid{14}{4}
\textblockorigin{194mm}{10mm} % Start 16mm from the right (210mm) paper edge, 10mm down
\begin{document}
%%% Selects "small" font. For 10pt articles, 9pt is the /small font size
\small
%%% Specify fonts for title and authors' text. The title gets the JSAE recieptNo attached to it.
\newcommand{\JSAEtitle}[1]{\title{\fontsize{10.95}{10.5}\selectfont \hspace{-100pt} \JSAEreceiptnoWprefix{}\hspace{10pt} \fontsize{17.28}{16}\selectfont \textmd{#1}}}
\newcommand{\JSAEauthor}[1]{\author{\fontsize{11}{11}\selectfont \textbf{#1}}}
\newcommand{\JSAEreceiptnoWprefix}{\JSAEreceiptnoPrefix{}-\JSAEreceiptno{}}
%%%%%%% USER INPUT %%%%%%%
% The user must place a JSAEreceiptno, JSAEreceiptnoPrefix, JSAEtitle, and any number of JSAEauthors.
\newcommand{\JSAEreceiptno}{00000000}
\newcommand{\JSAEreceiptnoPrefix}{000}
\JSAEtitle{A sample template for JSAE articles}
\JSAEauthor{J. T. Ripper}
\affiliation{Bethlem Royal Psychiatric Hospital\\
10-2 Gobancho, Chiyoda, Tokyo, 102-0076, Japan (E-mail: [email protected])}
\JSAEauthor{Bugs Bunny} \affiliation{Looney Tunes}
\JSAEauthor{Daffy Duck} \affiliation{Looney Tunes}\affiliation{Warner Brothers}
%%%%%%% USER INPUT %%%%%%%
\begin{abstract}
The abstract is here. \lipsum[1]
\end{abstract}
%%%%%%% USER INPUT %%%%%%%
\pacs{23.23.+x, 56.65.Dy}
\keywords{nuclear form; yrast level}
\date{December 2005}
\maketitle
%%% Place the JSAE receipt no in the top right corner
\begin{textblock}{2}[1,0](0,0)
\begin{flushright}
\fontsize{12}{12} \vspace{-10pt} \textbf{\JSAEreceiptno{}}
\end{flushright}
\end{textblock}
%%% Tweak the line spacing to match what seems to the be the spacing specification
\setlength{\baselineskip}{14pt}
\section{Introduction}
The manuscript elements have been formatted for you
through the “styles” capability of the software. To use the styles,
select the text you wish to apply a style to, then, using the mouse,
point to the style box on the toolbar. Click once on the
downward pointing arrow to the right, and select the appropriate
style.
\section{Methods}
\subsection{First subsection}
\lipsum[7]
\subsection{Next subsection}
\lipsum[1]
\subsubsection{Now a subsubsection}
\lipsum[1]
\section{Results}
\lipsum[3-4]
\appendix
\section{Optional appendix}
The appendix section itself is optional and rarely used. The \verb+\appendix+ command signals that all following sections are appendices,
so \verb+\section{title text}+ after \verb+\appendix +will set {title text} as an appendix heading (an empty {title text} is permitted).
For a single appendix, use a \verb+\appendix*+ followed by \verb+\section{title text}+ command to suppress the appendix letter in the section heading.
\end{document}
附言:我尝试控制最终输出还比较新……我意识到我所做的大部分工作都可能被视为获得美观输出的黑客手段。我欢迎关于如何“做得更好”的建议。
答案1
对于关键字和日期,你可以说
\def\@keys@name{\textbf{KEYWORDS: }}
\def\Dated@name{Presented on: }
对于摘要,你必须讲述revtex
更多的事情:
\@booleantrue\preprintsty@sw
\def\frontmatter@abstractheading{\noindent\textbf{ABSTRACT: }}
\g@addto@macro\abstract{\ignorespaces}
如果布尔\preprintsty@sw
值为 false(如您的情况),则摘要没有标题。然后我们重新定义默认标题,但我们还需要abstract
忽略其后的行尾。
因此,最后,文档的开头可能是
\documentclass[a4paper,twocolumn,notitlepage, %
superscriptaddress,showkeys,nopacs, %
jmp,10pt]{revtex4-1} % "9pt" doesn't actually do anything because revtext has only 10,11,12pt
\makeatletter
\def\@keys@name{\textbf{KEYWORDS: }}
\def\Dated@name{Presented on: }
\@booleantrue\preprintsty@sw
\def\frontmatter@abstractheading{\noindent\textbf{ABSTRACT: }}
\g@addto@macro\abstract{\ignorespaces}
\makeatother
但请注意,nopacs
并jmp
返回
LaTeX Warning: Unused global option(s):
[nopacs,jmp].
所以应该将其移除。
为了获得像示例中的隶属关系编号,您可以尝试在之前添加以下代码\makeatother
,但我不保证它没有副作用。
\def\frontmatter@makefnmark{\@thefnmark)~}
\def\@affil@present@script@#1{%
\@ifx{\relax#1}{%
\@ifx{\@tempa\@empty}{%
\aftergroup\false@sw
}{%
\textsuperscript{\bfseries\expandafter\@affilcomma\@tempa\relax\relax}%
\aftergroup\true@sw
}%
}{%
\@ifnum{#1=\z@}{}{\appdef\@tempa{{#1)}}}%
\@affil@present@script@
}%
}
答案2
把这写在你的序言中:
\usepackage{etoolbox}
\appto\abstract{\parindent 0pt \textbf{ABSTRACT: }\ignorespaces}
\makeatletter
\def\@keys@name{\textbf{KEYWORDS:} }
\def\Dated@name{Presented on }
\makeatother