{framed} is about framed document elements, e.g., boxes and environments. A popular package is {mdframed}.

learn more… | top users | synonyms

9
votes
3answers
561 views

Align text on top of a framebox

I am trying to create a series of boxes so that my students can input there id number for there final exam. \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \newsavebox{\idbox} ...
4
votes
1answer
1k views

Indentation in \leftbar Environment

How do I control/remove the indentation automatically generated in the \leftbar environment? \documentclass[11pt,letterpaper]{amsbook} \usepackage{xcolor} \definecolor{lightgray}{gray}{0.90} ...
1
vote
1answer
279 views

endless loop with mdframed

The following code leads to an endless loop. pdflatex is at 100% CPU and the log is constantly increasing with number counted upwards. \documentclass{article} \usepackage{mdframed} \begin{document} ...
10
votes
1answer
1k views

Shaded continuous across new enumerate environment

I'm trying to write up solutions where I include the original problem text, in a light gray shaded box. I had been creating the shading with the 'framed' package shaded environment, but some of the ...
2
votes
1answer
706 views

Draw red box around verse

This is a follow-up question to: How to center a verse horizontally I am using the solution given by @Herbert. Is there a way to put a color box around selected few verses I desire?
6
votes
3answers
2k views

How can one prevent \fbox from running off the page?

I am using the \fbox command to box a large chunk of text: \fbox{Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the ...
17
votes
6answers
6k views

Text in squared box

I'd like to bot a square box around some text. I'd like to denote a labelled object of size 1, in combinatorics this is often symbolised by something like \boxed{1}. It would be nicer if the box was a ...
8
votes
1answer
733 views

Black and white emphasis for \boxed?

I am using \boxed to place emphasis on important equations in an assignment I am typing up, and would like to give the final answer a bit of extra emphasis. I'm using \begin{equation} ... ...
5
votes
3answers
1k views

Placing text and equations inside a box

I have a paragraph that contains text, inline equations and centred equations, and I'd like to put the whole thing in a box that's centred horizontally in the page. It's a key paragraph, so I wanted ...
15
votes
1answer
1k views

How to choose which sides of the border to draw in a `framebox`?

If, for example, you only want to draw the top and bottom border of a box, or perhaps the left and bottom only, is there a simple package to do this or must one resort to using tables or heavy-weight ...
4
votes
2answers
2k views

Wrap a wrapfigure and text by a border?

Is it possible to wrap a wrappicture with some text nearby by a frame?
41
votes
8answers
10k views

Highlight elements in the matrix

I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square): $$ A = \begin{bmatrix} \fbox{0} & ...
4
votes
1answer
1k views

Including multiple figures/subfigures within an fbox (minipage)

From what I understand, it's pretty much impossible to include floats within an fbox/minipage. I basically want a paragraph of framed text with a couple of subfigures included within the frame. Any ...
4
votes
1answer
526 views

Suppress top skip between own frame environment and itemize

I need to typset a book with a given definition of {itemize} and I added a {framed} environment by using mdframed. If the first line inside {framed} is normal text everything is fine but if it ...
8
votes
4answers
872 views

How can I insert a framed box inside a table?

I'm trying to accomplish the result in shown in following picture. So far I have tried : \begin{tabular}[h]{cm{5cm}m{5cm}c} fingerprint & Signature1 & \rule{5cm}{.5pt} & fingerprint ...
5
votes
3answers
2k views

fbox in tabular throws missing endgroup

I have to draw a border around my tables, so I'm using \fbox{} (is there a better way?). It works when using a threeparttable but with the normal tabular latex throws an error stating Missing ...
6
votes
2answers
170 views

Frame environment with fixed size given by numbers of characters and lines

I would like to make one framed environment with the following behavior. Only the last 8 lines of the content must be displayed. If the content have more than 8 lines, a gentle warning must be ...
12
votes
2answers
868 views

Gray box around figure with a separate gray box around caption

My university requires that all figures in a thesis follow this pattern: I'm very new to LaTeX, so far my best attempt has been this: \begin{SCfigure} \colorbox{darkgray}{ ...
13
votes
3answers
36k views

How to put a framed box around text + math enviroment

I am looking for something like \fbox but it seems that you cannot use it when a math environment is included. However its not only a math environment (then you could use \boxed I know) but also text, ...
4
votes
1answer
350 views

How to make boxes occupy two columns in twocolumn environment, without using float in LaTeX?

I am trying to create a new document class, similar to books, but with two columns and where new chapters always starts in a new page, printing the chapter name inside a box that should occupy two ...
13
votes
4answers
8k views

box around theorem statement

Is there an easy way to put a box around a theorem in LaTeX? For example to state an important theorem. I tried using page 20 of the ntheorem documentation ...
13
votes
4answers
1k views

Creating stackoverflow like tags

I'm trying to create stackoverflow like tags. Currently I'm using an \fbox{text} to create the tags, which works, but not all boxes have the same height (it seems that letters like 'p' make a box take ...
11
votes
4answers
5k views

LaTeX is putting a border around my figures

I'm trying to embed a few images in a figure, but LaTeX keeps putting a border around three of the sides. Is there any way for me to keep it from adding this border? The code that I used to create ...
7
votes
3answers
2k views

A beautiful border style

I need a border style that has a nice appearance. I've found something like this: \documentclass{book} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathmorphing} ...
2
votes
1answer
1k views

Frame on lstlisting opened on the bottom when code longer than one page [duplicate]

In my \lstset I have: \lstset{ language=Java, % the language of the code basicstyle=\sffamily\large, % the size of the fonts that are used for the code %numbers=left, ...
6
votes
5answers
619 views

Formatting new environment with borders

I have defined myself a new environment as below: \newenvironment{myquote}{\list{}{\leftmargin=0.3in\rightmargin=0.3in}\item[]}{\endlist} What I would like to do here is to be able to format this ...
23
votes
1answer
2k views

How to place a shaded box around a section label and name

In working with a publisher, I need to format section headings like this (using ASCII art): +-----+-------------------------------------+ | 1.2 | Section name | ...
15
votes
1answer
9k views

How to draw frame with rounded corners around box

Is it possible to simply draw a frame around a box which has rounded corners, and be able to control frame width, frame color, frame radius, box background colour (preferably without having to use the ...
6
votes
2answers
566 views

how to eliminate the horizontal spacing of the frame in the framed package?

I'm using the framed package and I found it difficult to adjust the width of a frame to adapt to the current environment, e.g. if I use a shaded environment within the enumerate environment, I will ...
4
votes
1answer
542 views

Issue with \newenvironment and framed and quotation

\documentclass[a4paper,10pt]{article} \usepackage{framed} \usepackage{lipsum} \newenvironment{nb} {\begin{framed}\begin{quotation}} {\end{framed}\end{quotation}} \begin{document} \begin{nb} ...
3
votes
2answers
5k views

Frame around minipage containing listing in beamer

I am working on the sheets of a course on LaTeX and would like to have several sheets in which you see on the left an example of a source document and on the right its output. I have this working now ...
17
votes
4answers
421 views

Frame with only crosses in two opposite corners

Is there one package to produce frames looking like the one above in the following ASCII example ? I don't want dashed lines. | ...
5
votes
2answers
829 views

Make all figures and tables framed by default? [duplicate]

Possible Duplicate: Rounded corner colored box around figure I'm interested in having all of my \begin{figure} and \begin{table} environments automatically get framed. Is there any way to ...
5
votes
1answer
440 views

mdframed: Put a line below the frame title and give it a shaded background

I like to use mdframed to make a framed environment with an optional title. The title has to be in its own box with a gray background, like this: I hope that this is possible. MWE ...
11
votes
4answers
5k views

Creating Page Border for Single Page only

I am digitizing a book and there is only a single page which has page border as shown in the attached image. How can I create border to a single page? Is there a library where I can choose a border ...
4
votes
1answer
776 views

How to avoid background / frame break in code listings with math / mathescape?

I have lots of C++ sources with LaTeX formulas in the comments. Ideal for using the listings packages to pretty print the source. However, most of the formulas break either, the background or the ...
5
votes
2answers
1k views

Framed minipage of dependent dimensions

I am trying to prepare handouts of a ppt (I know). I would like a slide to be shown on the left half of a page and comments regarding it in a framed box of the same size as the slide on the right ...
3
votes
1answer
577 views

Automatically framing (or drawing the bounding box of ) a PStricks non-text object

Is there a command or macro that can draw and automatically size the bounding rectangle of a pstricks object, for example a circle -- framing it tightly in effect, even when the object undergoes ...
4
votes
3answers
1k views

framed equations

I'm aware of possibilities to frame an "important" equation in Latex as the one suggested in mathmode for instance but I thought it would be nice to have a dedicated environment instead of putting ...
9
votes
2answers
2k views

Framed text with a float in it

I'd like to frame the text between \startfoo and \stopfoo, but there is a float in it. \documentclass{article} \begin{document} \startfoo \begin{figure}[h] some float with a \caption{...} ...
1
vote
1answer
162 views

Is there a “proper” way to fix alignment of text in a \framebox?

The \framebox command aligns its contents vertically centered, but this has a tendency to produce results that are extremely visually displeasing. Case in point: \documentclass{article} ...
4
votes
2answers
483 views

listings: framebox shows breaks in font

Using the listings package in LaTeX seems to put lines in the frame box. This happens for all frame box options and if I use a shadow box it is even more apparent... Is there any way I can stop this ...
0
votes
3answers
3k views

Margins in \framebox

I have the following code: \documentclass{article} \usepackage{tikz} \begin{document} \framebox{\begin{tikzpicture}[color=black, line width=0.4mm] \draw (0,0) rectangle (5mm,5mm); ...
4
votes
1answer
1k views

How to make the frame dashed?

I am using \begin{framed} ... \end{framed} in my presentation, does anyone know how to make the frame dashed?
6
votes
3answers
1k views

Smaller frame with listings

I am using listings to put java code in my beamer slides. Sometimes, I want to frame the code but I do not want the frame to occupy the whole width of the page. I want the frame to occupy only the ...
2
votes
4answers
474 views

Debugging - any packages that will draw individual line (and word) frame boxes?

I was just wandering if there is a package (or an option to a package, like \usepackage[showframe]{geometry}) that could emphasize/draw borders(/lines/frame) around each (and every) word; and/or each ...
13
votes
3answers
16k views

Border or frame around figure

I'd like to place a border / frame around my figure. The figure is a bunch of equations: \begin{figure}[ht] \[ eqn 1 \] \[ eqn 2 \] \[ eqn 3 \] \caption{\label{myfig} My caption.} ...
11
votes
2answers
1k views

Different colorcoded theorems

I'm using this code to frame my theorems: \documentclass[a4paper,12pt]{scrreprt} \usepackage[table]{xcolor} \usepackage{latexsym} \usepackage{amsmath} \usepackage[amsmath,thmmarks,framed]{ntheorem} ...
3
votes
1answer
659 views

pdfpages package and \fbox collision

There seems to be a collision between pdfpages package and other packages that use \fboxrule, \fboxsep, etc. Here is an example: Using frame=true: \documentclass[a4paper,11pt]{article} ...
1
vote
2answers
606 views

Latex escape interrupts frame of listing

I am (ab)using a framed listings environment include an enumeration environment (by escaping to latex). This compiles fine but in the resulting pdf the frame around the listing is interrupted. ...