7

Regarding various ways but most requires rigorous settings to embed a paragraph of words in a box or a frame with double-line box, I try to use a single commend to acquire the effect.

enter image description here

However, just as the picture has shown, the "doublebox" command in fancybox fails to wrap the words into paragraph. As for the "framed" command, it doesn't provide a "double-line" frame but actually wraps the paragraph instead.

Is there another command or a slight modification to the current code to warp a paragraph into a doubled-line frame(box)?

\documentclass[11pt]{article}
\usepackage{fancybox,framed}
\begin{document}
\doublebox{Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets—has grown from a niche area of microeconomics to a key component of economics.}\\

\begin{framed}
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets—has grown from a niche area of microeconomics to a key component of economics. 
\end{framed}
\end{document}
1
  • 1
    No, but you can make one easily enough using \doublebox and \parbox. Apr 23, 2016 at 4:02

2 Answers 2

5
\documentclass[11pt]{article}
\usepackage{fancybox,framed}
\begin{document}
\doublebox{%
\begin{minipage}{4in}
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets—has grown from a niche area of microeconomics to a key component of economics.
\end{minipage}}\\
\begin{framed}
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets—has grown from a niche area of microeconomics to a key component of economics. 
\end{framed}
\end{document}

doublebox

10

Here's a tcolorbox version (with 'minimal' options) and some example of usages

\documentclass[11pt]{article}
\usepackage[most]{tcolorbox}


\newtcolorbox{tcbdoublebox}[1][]{%
  enhanced jigsaw,
  sharp corners,
  colback=white,
  borderline={1pt}{-2pt}{black},
  fontupper={\setlength{\parindent}{20pt}},
  #1
}
\begin{document}


%\doublebox{Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets—has grown from a niche area of microeconomics to a key component of economics.}\\

\begin{tcbdoublebox}
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets has grown from a niche area of microeconomics to a key component of economics. 
\end{tcbdoublebox}


\begin{tcbdoublebox}[drop shadow]
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets has grown from a niche area of microeconomics to a key component of economics. 
\end{tcbdoublebox}


\begin{tcbdoublebox}[title={With a title}]
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets has grown from a niche area of microeconomics to a key component of economics. 
\end{tcbdoublebox}

\begin{tcbdoublebox}[colback={white!40!yellow}]
Over the past twenty years, the study of industrial organization—the analysis of imperfectly competitive markets has grown from a niche area of microeconomics to a key component of economics. 
\end{tcbdoublebox}


\end{document}

enter image description here

6
  • Is it possible to make the inner frame line-width thinner?
    – Howard
    Apr 23, 2016 at 17:19
  • 1
    @Howard: boxrule=0.5pt (for example)
    – user31729
    Apr 23, 2016 at 17:19
  • @Howard: Why this acceptance hopping -- this is not really kosher!
    – user31729
    Apr 23, 2016 at 17:22
  • The first one did it with only a "slight modification" which answered the question. But your alternative solution provides customization to handle various situations which I think its more useful. Thanks a lot!
    – Howard
    Apr 23, 2016 at 17:30
  • How do I remove indentation inside the box?
    – weilam06
    Apr 6, 2020 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .