我正在尝试使用皇家化学学会的乳胶文章模板用于格式化我的手稿。
使用给定的模板,一切都运行良好。但是,当我尝试在摘要(使用包格式化mdframed
)后立即包含(非常理想的)自定义单列内容时,所有后续部分的排版都变得混乱。我在这里附上了排版混乱的 PDF。我试图插入的内容标题为“更广泛的背景”。
非常感谢任何帮助解决此问题的帮助。我不希望为更广泛的背景开始新的页面。我只想将更广泛的背景框架框放在摘要之后,然后继续进入简介部分,而无需在任何地方进行分页。
这是我的源代码。很抱歉,它有点太长了(大部分内容来自期刊模板本身)。除非下载并提取期刊模板中的图表,否则确切的代码将无法编译。但是,我只是在寻找一种概念验证方法,它可以在您可以选择使用的更简单的示例文档中发挥作用。
\documentclass[twoside,twocolumn,9pt]{article}
\usepackage{extsizes}
\usepackage[super,sort&compress,comma]{natbib}
\usepackage[version=3]{mhchem}
\usepackage[left=1.5cm, right=1.5cm, top=1.785cm, bottom=2.0cm]{geometry}
\usepackage{balance}
\usepackage{times,mathptmx}
\usepackage{sectsty}
\usepackage{graphicx}
\usepackage{lastpage}
\usepackage[format=plain,justification=justified,singlelinecheck=false,font={stretch=1.125,small,sf},labelfont=bf,labelsep=space]{caption}
\usepackage{float}
\usepackage{fancyhdr}
\usepackage{fnpos}
\usepackage[english]{babel}
\usepackage{array}
\usepackage{droidsans}
\usepackage{charter}
\usepackage[T1]{fontenc}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{setspace}
\usepackage[compact]{titlesec}
\usepackage{hyperref}
%%%Please don't disable any packages in the preamble, as this may cause the template to display incorrectly.%%%
\usepackage{epstopdf}%This line makes .eps figures into .pdf - please comment out if not required.
\usepackage{mdframed}
\definecolor{broader_background}{RGB}{230,226,214}
\newmdenv[linecolor=white,frametitle=Broader Context]{broadercontextbox}
\definecolor{cream}{RGB}{222,217,201}
\begin{document}
\pagestyle{fancy}
\thispagestyle{plain}
\fancypagestyle{plain}{
%%%HEADER%%%
\fancyhead[C]{\includegraphics[width=18.5cm]{head_foot/header_bar}}
\fancyhead[L]{\hspace{0cm}\vspace{1.5cm}\includegraphics[height=30pt]{head_foot/journal_name}}
\fancyhead[R]{\hspace{0cm}\vspace{1.7cm}\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}
\renewcommand{\headrulewidth}{0pt}
}
%%%END OF HEADER%%%
%%%PAGE SETUP - Please do not change any commands within this section%%%
\makeFNbottom
\makeatletter
\renewcommand\LARGE{\@setfontsize\LARGE{15pt}{17}}
\renewcommand\Large{\@setfontsize\Large{12pt}{14}}
\renewcommand\large{\@setfontsize\large{10pt}{12}}
\renewcommand\footnotesize{\@setfontsize\footnotesize{7pt}{10}}
\makeatother
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand\footnoterule{\vspace*{1pt}%
\color{cream}\hrule width 3.5in height 0.4pt \color{black}\vspace*{5pt}}
\setcounter{secnumdepth}{5}
\makeatletter
\renewcommand\@biblabel[1]{#1}
\renewcommand\@makefntext[1]%
{\noindent\makebox[0pt][r]{\@thefnmark\,}#1}
\makeatother
\renewcommand{\figurename}{\small{Fig.}~}
\sectionfont{\sffamily\Large}
\subsectionfont{\normalsize}
\subsubsectionfont{\bf}
\setstretch{1.125} %In particular, please do not alter this line.
\setlength{\skip\footins}{0.8cm}
\setlength{\footnotesep}{0.25cm}
\setlength{\jot}{10pt}
\titlespacing*{\section}{0pt}{4pt}{4pt}
\titlespacing*{\subsection}{0pt}{15pt}{1pt}
%%%END OF PAGE SETUP%%%
%%%FOOTER%%%
\fancyfoot{}
\fancyfoot[LO,RE]{\vspace{-7.1pt}\includegraphics[height=9pt]{head_foot/LF}}
\fancyfoot[CO]{\vspace{-7.1pt}\hspace{13.2cm}\includegraphics{head_foot/RF}}
\fancyfoot[CE]{\vspace{-7.2pt}\hspace{-14.2cm}\includegraphics{head_foot/RF}}
\fancyfoot[RO]{\footnotesize{\sffamily{1--\pageref{LastPage} ~\textbar \hspace{2pt}\thepage}}}
\fancyfoot[LE]{\footnotesize{\sffamily{\thepage~\textbar\hspace{3.45cm} 1--\pageref{LastPage}}}}
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\arrayrulewidth}{1pt}
\setlength{\columnsep}{6.5mm}
\setlength\bibsep{1pt}
%%%END OF FOOTER%%%
%%%FIGURE SETUP - please do not change any commands within this section%%%
\makeatletter
\newlength{\figrulesep}
\setlength{\figrulesep}{0.5\textfloatsep}
\newcommand{\topfigrule}{\vspace*{-1pt}%
\noindent{\color{cream}\rule[-\figrulesep]{\columnwidth}{1.5pt}} }
\newcommand{\botfigrule}{\vspace*{-2pt}%
\noindent{\color{cream}\rule[\figrulesep]{\columnwidth}{1.5pt}} }
\newcommand{\dblfigrule}{\vspace*{-1pt}%
\noindent{\color{cream}\rule[-\figrulesep]{\textwidth}{1.5pt}} }
\makeatother
%%%END OF FIGURE SETUP%%%
%%%TITLE, AUTHORS AND ABSTRACT%%%
\twocolumn[
\begin{@twocolumnfalse}
\vspace{3cm}
\sffamily
\begin{tabular}{m{4.5cm} p{13.5cm} }
\includegraphics{head_foot/DOI} & \noindent\LARGE{\textbf{This is the title$^\dag$}} \\%Article title goes here instead of the text "This is the title"
\vspace{0.3cm} & \vspace{0.3cm} \\
& \noindent\large{Full Name,$^{\ast}$\textit{$^{a}$} Full Name,\textit{$^{b\ddag}$} and Full Name\textit{$^{a}$}} \\%Author names go here instead of "Full name", etc.
\includegraphics{head_foot/dates} & \noindent\normalsize
{
augue. Donec eros nisi, imperdiet quis, volutpat ac, sollicitudin sed, arcu. Aenean vel mauris.
Mauris tincidunt. Nullam euismod odio at velit. Praesent elit purus, porttitor id, facilisis
in, consequat ut, libero. Morbi imperdiet, magna quis ullamcorper malesuada, mi massa pharetra
lectus, a pellentesque urna urna id turpis. Nam posuere lectus vitae nibh. Etiam tortor orci,
sagittis malesuada, rhoncus quis, hendrerit eget, libero. Quisque commodo nulla at nunc. Mauris
consequat, enim vitae venenatis sollicitudin, dolor orci bibendum enim, a sagittis nulla nunc
quis elit. Phasellus augue. Nunc suscipit, magna.
} \\
\end{tabular}
\end{@twocolumnfalse} \vspace{0.6cm}
]
%%%END OF TITLE, AUTHORS AND ABSTRACT%%%
\vspace{-20mm}
\begin{@twocolumnfalse}
\vspace{1mm}
\sffamily
\begin{tabular}{p{18cm}}
\begin{broadercontextbox}[backgroundcolor=broader_background]
% lorem{{{ Non suscipit gravida, velit enim aliquam quam, nec condimentum orci augue vel magna.
Nulla facilisi. Donec ipsum enim, congue in, tempus id, pulvinar sagittis, leo. Donec et elit
in nunc blandit auctor. Nulla congue urna quis lorem. Nam rhoncus pede sed nunc. Etiam vitae
quam. Fusce feugiat pede vel quam. In et augue.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Phasellus mollis dictum nulla. Integer vitae neque vitae eros fringilla rutrum. Vestibulum in
pede adipiscing mi dapibus condimentum. Etiam felis risus, condimentum in, malesuada eget,
pretium ut, sapien. Suspendisse placerat lectus venenatis lorem. Sed accumsan aliquam enim.
Etiam hendrerit, metus eu semper. % lorem}}}
\end{broadercontextbox}
\end{tabular}
\end{@twocolumnfalse}
%%%FONT SETUP - please do not change any commands within this section
\renewcommand*\rmdefault{bch}\normalfont\upshape
\rmfamily
\section*{}
\vspace{-1cm}
%%%FOOTNOTES%%%
\footnotetext{\textit{$^{a}$~Address, Address, Town, Country. Fax: XX XXXX XXXX; Tel: XX XXXX XXXX; E-mail: [email protected]}}
\footnotetext{\textit{$^{b}$~Address, Address, Town, Country. }}
%Please use \dag to cite the ESI in the main text of the article.
%If you article does not have ESI please remove the the \dag symbol from the title and the footnotetext below.
\footnotetext{\dag~Electronic Supplementary Information (ESI) available: [details of any supplementary information available should be included here]. See DOI: 10.1039/b000000x/}
%additional addresses can be cited as above using the lower-case letters, c, d, e... If all authors are from the same address, no letter is required
\footnotetext{\ddag~Additional footnotes to the title and authors can be included \textit{e.g.}\ `Present address:' or `These authors contributed equally to this work' as above using the symbols: \ddag, \textsection, and \P. Please place the appropriate symbol next to the author's name and include a \texttt{\textbackslash footnotetext} entry in the the correct place in the list.}
%%%END OF FOOTNOTES%%%
%%%MAIN TEXT%%%%
The main text of the article\cite{Mena2000} should appear here.
\section{Introduction}
% lorem{{{ Lobortis faucibus mi. Aenean vitae risus ut arcu malesuada ornare. Maecenas nec
erat. Sed rhoncus, elit laoreet sagittis luctus, nulla leo faucibus lectus, vitae accumsan est
diam id felis. Nunc dui pede, vestibulum eu, elementum et, gravida quis, sapien. Donec blandit.
Donec sed magna. Curabitur a risus. Nullam nibh libero, sagittis vel, hendrerit accumsan,
pulvinar consequat, tellus. Donec varius dictum nisl. Vestibulum suscipit enim ac nulla. Proin
tincidunt. Proin sagittis. Curabitur auctor metus non mauris. Nunc condimentum nisl non augue.
Donec leo urna, dignissim vitae, porttitor ut, iaculis sit amet, sem.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per. % lorem}}}
\subsection{Tables}
Tables typeset in RSC house style do not include vertical lines. Table footnote symbols are lower-case italic letters and are typeset at the bottom of the table. Table captions do not end in a full point.\cite{Arduengo1992,Eisenstein2005}
\begin{table}[h]
\small
\caption{\ An example of a caption to accompany a table}
\label{tbl:example}
\begin{tabular*}{0.48\textwidth}{@{\extracolsep{\fill}}lll}
\hline
Header one (units) & Header two & Header three \\
\hline
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
10 & 11 & 12 \\
\hline
\end{tabular*}
\end{table}
Adding notes to tables can be complicated. Perhaps the easiest method is to generate these manually.\footnote[4]{Footnotes should appear here. These might include comments relevant to but not central to the matter under discussion, limited experimental and spectral data, and crystallographic data.}
\end{document}
答案1
您的示例太长,而且由于缺少图形,因此无法编译。
但是如果你把你的框也放在 \twocolumn 的可选参数中,它应该可以工作,如下所示:
\documentclass[twoside,twocolumn]{article}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{lipsum,}
\usepackage{mdframed}
\definecolor{broader_background}{RGB}{230,226,214}
\newmdenv[linecolor=white,frametitle=Broader Context]{broadercontextbox}
\begin{document}
\twocolumn[%
{% important to protect the [] of the framed box
\begin{tabular}{l}
Abstract tabular ...
\end{tabular}
\vspace{0.6cm}
\begin{tabular}{p{18cm}}
\begin{broadercontextbox}[backgroundcolor=broader_background]
blala
\end{broadercontextbox}
\end{tabular}%
}
]%end of \twocolumn
\lipsum
\end{document}