Text FormattingEnvironment with Frame?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
LaTexLearner
Posts: 139
Joined: Tue Mar 10, 2015 11:06 am

Environment with Frame?

Post by LaTexLearner »

I would like to make a custom environment that puts a frame around text, i.e. I'd like to put the frame thing in the second environment here. Any type of frame that is really easy to see when scanning the pages will do.

Code: Select all

\newenvironment{myitemize}
{ \begin{itemize}
    \setlength{\itemsep}{3pt}
    \setlength{\parskip}{0pt}
    \setlength{\parsep}{0pt}     }
{ \end{itemize} 

\newenvironment{DN}
{\par\vspace{0.2\baselineskip}\noindent\\Do Now:\begin{myitemize}}
{\end{myitemize}}
Is that possible?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Environment with Frame?

Post by Johannes_B »

The packages tcolorbox and mdframed might be just what you are looking for.
They are very easy to customize as well.

Of course, the LaTeX kernel provides a simple mechanism for frames as well, keyword here is framebox.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply