2

I'd like to obtain a similar effect as in the picture below: a shaded box with paragraphs that are indented after the first line. I've tried to use \tcolorbox, but hanging indents do not behave correctly in that environment for some reason:

\documentclass{article}
\usepackage[skins]{tcolorbox}
\begin{document}

\begin{tcolorbox}[enhanced,width=5in,center upper,
drop fuzzy shadow southeast,
boxrule=0.4pt,sharp corners,colframe=black!80!black,colback=white!10]

\medskip

\begin{center}Works Cited \end{center}

\hangindent1cm{
Abrams, Robert E.. Landscape and Ideology in American Renaissance
Literature: Topographies of Skepticism. Cambridge: Cambridge UP, 2004.
Print.}

\hangindent1cm{Agamben, Giorgio. Homo Sacer: Sovereign Power and Bare
 Life. Trans. Daniel Heller-Roazen. Stanford: Stanford UP, 1998.
 Print.}

 \end{tcolorbox}

 \end{document} 

enter image description here

  • Do you think this is a duplicate ? tex.stackexchange.com/questions/316809/… – percusse Sep 15 '16 at 17:55
  • Have you got access to PDF files of your resources ? Why are you working with images ? – Majid Abdolshah Sep 15 '16 at 17:57
  • I just want to create the effect of an embedded document within my document, with a drop shadow. As I said above, using images is not ideal. I was hoping to just code this somehow and avoid using images altogether. Also: my attempt to use \tcolorbox reveals a problem with the package: it doesn't allow hanging indents to work properly for some reason. – Linter Sep 15 '16 at 18:00
  • Your code works for me! – Ignasi Sep 15 '16 at 18:27
  • What about this: tex.stackexchange.com/questions/11272/… – gilu Sep 15 '16 at 19:54
1

Your \hangindent does what it should, but you have additionally activated centering (center upper is one of the parameters of the tcolorbox). As you can see, your lines are centered, but the lines after the first one are additionally indented by 1cm.

Start your box with

\begin{tcolorbox}[enhanced,width=5in,%center upper,
drop fuzzy shadow southeast,
boxrule=0.4pt,sharp corners,colframe=black!80!black,colback=white!10]

(center upper has been deactivated by comment sign), and you get

enter image description here

  • Ah! Thank you. My LaTex skilz are limited. This makes perfect sense. – Linter Sep 16 '16 at 14:35

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.