1

I am using floatrow package creating the box environment. if i declare the floatrow package in the tex file the normal figure framebox is affected.

MWE

\documentclass[twocolumn]{article}

\usepackage{graphics}
\usepackage{graphicx}
\usepackage{floatrow}%%%%%%%
\usepackage{lipsum}
\makeatother
\DeclareNewFloatType{Box}{%
  placement=htbp,%
  name=BOX,%
}%

\floatsetup[Box]{%
  style=BOXED,%
  capposition=top,%
  justification=justified}%



\newenvironment{BOX}[2][htbp]{%
\begin{Box}[#1]%
    \ifx\relax#2\relax\else\caption{\textbf{#2}\vspace*{-6.5pt}}\fi%
}{\end{Box}}%

\newenvironment{BOX*}[2][htbp]{%
  \begin{Box*}[#1]%
    \ifx\relax#2\relax\else\caption{\textbf{#2}\vspace*{-6.5pt}}\fi%
}{\end{Box*}}

\newcommand{\processfigure}[2]{\centering\fbox{\parbox{82mm}{\rightskip12pt\centering#1\vspace*{-3.5pt}\par\rightskip12pt%
\caption{#2}}}}%

\makeatletter

\begin{document}


\lipsum[1-5]

\begin{BOX}[!t]{The polymers were dissolved in dimethylsulfoxide (DMSO)}
The polymers were dissolved in dimethylsulfoxide (DMSO) at  The ratio polymer/DMSO was about 1:10 (mg/mL). After evaporation to around 1/3 of the original volume, the solution was spread on a glass plate, using a doctor-blade type equipment, and then put in the oven for the casting treatment at 120 for 24\,h. After the casting, membranes were stored at ambient humidity and peeled off (called in the following ``first treatment'').
\end{BOX}

\lipsum[6-10]


\begin{figure*}[!t]
\processfigure{Figure Placed here\vspace*{12pt}}
{\textbf{\boldmath Cross-link reaction for SPEEK (color code: gray C, yellow S, red O)}.\label{fig:1}}
\end{figure*}

\lipsum[11-15]

\end{document}

Before declare the floatrow package the figure environment output displayed below:

enter image description here

After declare the floatrow package the figure environment output displayed below:

enter image description here

Defined box environment using flotrow package displayed below

enter image description here

I don't know what is the reason to affect the figure environment if i am using floatrow package. Please advice.

3

You're already using the floatrow package, which permits you to have boxed figures simply declaring

\floatsetup[figure]{style=BOXED,captionskip=25pt}

I've added a captionskip since you want some spacing before the caption.

Then, instead of using

\begin{figure*}[!t]
\processfigure{Figure Placed here\vspace*{12pt}}
{\textbf{\boldmath Cross-link reaction for SPEEK (color code: gray C, yellow S, red O)}.\label{fig:1}}
\end{figure*}

with your custom command \processfigure to construct a box around the figure, simply use a \ffigbox in this way:

\begin{figure*}[!t]
\ffigbox[82mm]
{Figure Placed here}
{\caption{\textbf{\boldmath Cross-link reaction for SPEEK (color code: gray C, yellow S, red O)}}\label{fig:1}}
\end{figure*}

MWE

\documentclass[twocolumn]{article}

\usepackage{graphicx}
\usepackage{floatrow}%%%%%%%
\usepackage{lipsum}

\DeclareNewFloatType{Box}{%
  placement=htbp,%
  name=BOX,%
}%

\floatsetup[Box]{%
  style=BOXED,%
  capposition=top,%
  justification=justified}%



\newenvironment{BOX}[2][htbp]{%
\begin{Box}[#1]%
    \ifx\relax#2\relax\else\caption{\textbf{#2}\vspace*{-6.5pt}}\fi%
}{\end{Box}}%

\newenvironment{BOX*}[2][htbp]{%
  \begin{Box*}[#1]%
    \ifx\relax#2\relax\else\caption{\textbf{#2}\vspace*{-6.5pt}}\fi%
}{\end{Box*}}


\floatsetup[figure]{style=BOXED,captionskip=25pt}

\begin{document}


\lipsum[1-5]

\begin{BOX}[!t]{The polymers were dissolved in dimethylsulfoxide (DMSO)}
The polymers were dissolved in dimethylsulfoxide (DMSO) at  The ratio polymer/DMSO was about 1:10 (mg/mL). After evaporation to around 1/3 of the original volume, the solution was spread on a glass plate, using a doctor-blade type equipment, and then put in the oven for the casting treatment at 120 for 24\,h. After the casting, membranes were stored at ambient humidity and peeled off (called in the following ``first treatment'').
\end{BOX}

\lipsum[6-10]

\begin{figure*}[!t]
\ffigbox[82mm]
{Figure Placed here}
{\caption{\textbf{\boldmath Cross-link reaction for SPEEK (color code: gray C, yellow S, red O)}}\label{fig:1}}
\end{figure*}

\lipsum[11-15]

\end{document} 

Output:

enter image description here

  • i got the solution – Vetri Feb 26 '15 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.