1

Is there a solution to make a frame around an environment without using any new packages? (with boxes or something)

3
  • 1
    The basic \fbox does that: presumably you want something more complex?
    – Joseph Wright
    Commented Apr 18, 2017 at 14:22
  • 1
    Any why the clause no new packages when your life gets 100% easier using things like tcolorbox or mdframed?
    – daleif
    Commented Apr 18, 2017 at 14:31
  • "The basic \fbox does that: presumably you want something more complex? – Joseph Wright" - I want add a frame in \newenvironment options
    – user131525
    Commented Apr 18, 2017 at 14:54

1 Answer 1

1

Using just the LaTeX kernel for example

\documentclass{article}
\newsavebox\mybox
\newenvironment{framedbox}
  {\begin{lrbox}{\mybox}}
  {%
    \end{lrbox}%
    \fbox{\usebox{\mybox}}%
  }
\begin{document}

\begin{framedbox}
  Hello world
\end{framedbox}

\end{document}

though I'm not clear on what the content to be boxed up actually is.

You must log in to answer this question.

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