0

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

  • 1
    The basic \fbox does that: presumably you want something more complex? – Joseph Wright Apr 18 '17 at 14:22
  • 1
    Any why the clause no new packages when your life gets 100% easier using things like tcolorbox or mdframed? – daleif Apr 18 '17 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 Apr 18 '17 at 14:54
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.

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.