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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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