Questions tagged [framed]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
3k views

Self-defined Width of the Pseudocode Box with algorithmicx?

This post has beautifully shown how to make the algorithm pseudocode box as wide as one column or two columns. I am now writing a pseudocode with many if layers. So a one-column box cannot suffice. ...
3
votes
4answers
1k 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 ...
3
votes
1answer
2k views

How do I create a variant of the snugshade box from the framed package to wrap my definition environments in a blue box?

I'm already using snugshade to wrap my theorem environments in a grey box, but I'd like to have another bounding box just like snugshade to wrap my definitions in a blue box instead. Here is my code:...
13
votes
3answers
4k views

Framing section headings

I'm attempting to put a frame around my section headings. I am using the package mdframed which adds functionality to the framed package. It basically draws a box around an object, in an environment....
11
votes
4answers
4k views

Put a box around an item (homework)

I am using the enumerate environment to do homework. In the following, first I write out the question, then I write out the answers to the first two parts. What I'd like to do is have a box around ...
9
votes
2answers
7k views

Vertical spacing of framed environment

Here is an MWE that shows the problem: \documentclass{article} \usepackage{framed} \setlength{\FrameSep}{3pt} \setlength{\parindent}{0pt} \begin{document} \fbox{Foo} \fbox{Foo} \begin{framed} Foo ...
8
votes
4answers
15k views

How to use the quote environment inside a \framebox?

Now I run into a problem with frameboxes. Why is the following not valid LaTeX code? \framebox{ The following text was taken from: \begin{quote} Erik Pickles: How it will end \end{quote} } I get the ...
7
votes
1answer
1k views

Frames around few line of code in a algorithm

I want to put a box around lines of code and to add comments inside the box. This is what I want it to achieve: This is the example of code I am using for the algorithm. \documentclass{article} \...
7
votes
3answers
2k views

fbox without additional v-space

it's a little bit related to Non-invasive replacement for \fbox? , but not really. think: \documentclass[12pt]{article} \begin{document} \footnotesize \begin{tabular}{lc} a & 1\\ a & 1\\ ...
7
votes
3answers
3k views

Create Beamer-Theorem like boxes

I would like to create frames / boxes for equations or text like in the Beamer class: outisde of the beamer documentclass, for example in the article class. Is there any package or trick to do this? ...
6
votes
2answers
1k views

Nested boxes of different thickness

I would like to create nested boxes in LaTeX that look like this: I know how to create the outside boxes, but I don't know how to create the thick black box inside.
6
votes
1answer
747 views

boxed equation but framed only some sides

I need to box part of an equation, but I need the frame to be open one side. In the following MWE I would need the left part of the equation not to have the right frame of the box and the right part ...
6
votes
1answer
2k 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
3answers
651 views

Put a frame around all pages, except one, in a book

I am writing a book and would like to put a red, 5pt thick frame around all pages, except around one page in the middle of the book, which contains a figure that is bigger than the frame. The frame ...
5
votes
3answers
652 views

Continuing solution frame for exams

New edit: The proposed answer by magula, which used to work with version 2.5 of exam.cls no longer works with the current version 2.603. The following was included as a note for version 2.601: "We ...
5
votes
1answer
2k 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?
4
votes
1answer
3k 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} \...
3
votes
1answer
700 views

Setting a wavy sidebar

Is there a way to have framed.sty's sidebar environment to use a long wavy line, constructed, for example, using the mathabx.sty's \lfilet variable-sized delimiter?
3
votes
1answer
1k views

lrbox with border in beamer

Can I have border around a \lrbox in beamer? I have a minipage inside the lrbox. I know I can use \fbox. Update Sorry for the confusion. I need a border around the block of data, it is inside a ...
2
votes
2answers
107 views

How to frame text of different lines

I'm trying to reproduce this: I was able to reproduce everything but the frame below "John sleeps": I first tried using gb4e, but I didn't find a solution. Now, my examples are written by hand, ...
2
votes
1answer
2k views

Right margin discrepancy between framed and fbox/minipage

Here is an MWE which shows that something is weird in the framed package. \documentclass{article} \usepackage{lipsum} \usepackage{framed} \setlength{\FrameSep}{3pt} \setlength{\fboxsep}{3pt} \begin{...
1
vote
1answer
715 views

Draw page frame with words in margin

I am currently making exam papers using latex exam class. I would like to have the page frame with the word `Answer written in the margins will not be marked' on both margins, and the header or footer ...
1
vote
2answers
6k views

Questions about \fbox

I would like to put a text and a math formula inside a \fbox, but I got an error:ERROR: LaTeX Error: Something's wrong--perhaps a missing \item. Also the\\ did not work, so the text and the formula ...
12
votes
1answer
826 views

Page Bordering with an image?

I want a custom border for my document. I was thinking of doing something like this, creating a border with a graphics tool(only the outer frame) and then placing it in the beginning of the document, ...
9
votes
1answer
1k views

lstlisting border bug when breaking lines

I have a certain bug regarding listings. I have used the \lstset command to configure my lstlisting environment. Somehow, when I have a line that is too long to fit into one row the listing breaks ...
5
votes
1answer
740 views

How to prevent frames on each groupplot in TikZ/pgfplots

I want to do a group of plots. However, I set the option \tikzset{every picture/.style={framed} at the begin of my document, because I want a frame around all my pictures. What I get now is a frame ...
5
votes
3answers
637 views

Floats Analogue of framed

I have very little experience with LaTeX. So, pardon my ignorance, but is there a float equivalent of \framebox? Ideally, I'd like a simple construct for framed text that I can position at the top [t]...
4
votes
3answers
617 views

Remove par indent from environment

The real problem here is that I can't figure out how to modify an existing environment. The concrete thing I want to achieve follows below. I'm pretty happy with what the framed package gives me with ...
4
votes
1answer
2k 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
630 views

Add box to labeled sections

I want to add a box to a repeated section of a textbook, which provides question discussions. Is it possible to do it by adding "tex style setting" command(s) to the preamble? I am using the memoir ...
4
votes
1answer
470 views

Text edge and shadow with tikz

I have this code: \documentclass[twoside,fleqn]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[most]{tcolorbox} \usepackage{tikz} \usetikzlibrary{...
4
votes
1answer
4k views

How to add double line border to a page?

I'm looking for options to add double line border to a page ; left hand top corner of border is mentioned below (border will be continous for entire page width and height).
4
votes
2answers
181 views

An environment for fixed figures

I am trying to create an environment that I can use to include "figures" within a framed environment. Because floats aren't allowed inside framed environments, I want to create a new environment ...
4
votes
1answer
327 views

ConTeXt : frame problems

I'm trying to define fancy frames with ConTeXt, but I get some difficulties. Since I found many examples of this, I mainly used Metapost, but since I'm more of a TiKz adept, I don't really understand ...
4
votes
1answer
753 views

Creating an environment able to span over multiple pages or columns

I'm trying to create an environment able to understand when it's on a single/two columns layout and to span over multiple pages or columns having different style for the two cases. I would want to ...
3
votes
2answers
196 views

How (and understanding) the editing of a beamertheme.sty to create bordered/framed blocks?

I am trying to edit a beamerthemeMyTheme.sty file to have the exampleblock become framed/bordered. While I have seen examples such as that in Link to answer providing code for framed blocks (it does ...
3
votes
1answer
1k 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 ...
3
votes
2answers
227 views

ConTeXt: Frame entire section of pandoc-generated document

Background Using pandoc to convert a Markdown document into ConTeX and would like to frame a section. Problem Using \beforesection and \aftersection with \starttextbackground and its stopper only ...
3
votes
2answers
625 views

Errors using mdframed and also framed packages with tex4ht to put a frame around text

I googled around, and did not see something about this. I just found out that one gets an error using mdframed with tex4ht. \documentclass{article}% \usepackage{mdframed} \begin{document} \begin{...
2
votes
1answer
949 views

Framebox and minipage causes white space and is not float

I have a \framebox (I don't insist on using this command) and a minipage that causes whitespace, because the drawn box is not allowing any text before or after and it itself does not break over pages. ...
2
votes
2answers
822 views

Adding border around figure and caption

There is a Word-based submission guideline that shows following formatting for figures: Note that there is a border around both the Figure and the caption. Question: What's the most elegant way to ...
2
votes
1answer
2k views

Place framed text at top of page

I have chapters (using the standard "report" class), and I would like to place a frame of text - which gives succinct meta-details on the chapter - at the top of the first page of the chapter. What I ...
2
votes
2answers
2k views

Figures with borders problem

I am writing my thesis in TexniCenter and I have the following problem. I want all my figures to have a border. So I use : \usepackage{float} \floatstyle{boxed} \restylefloat{figure} in the ...
1
vote
1answer
255 views

Nested boxes around cells in a table

I would like to nest two boxes in my table. It looks like this: content content content content content +----------------------+ content | content content | ...
1
vote
2answers
669 views

How to draw this figure?

The figure in the attached image contains mathematical formulae, some of which are aligned, also it is rounded by a box, could anyone tell me how to draw that? Thank you very much!
1
vote
1answer
59 views

Auto-cross lines in framebox

Some text in a paragraph may need frame out of them, and this framed text may cross lines. \framebox seems not be able to do that. How to get this effect as shown on the attached figure which is ...
1
vote
2answers
1k views

Drawing a rectangle box around code fragment

How to produce the effect of drawing a rectangle box surrounded the code, and put it in the figure? (Any methods including non-tikz-pgf method that helps is welcome)
1
vote
1answer
417 views

Framed text and pageboundary

I use in my environment file the following definition for framed text: \defineframed[achtergrond] [frame=off, background=color, backgroundcolor=gray, width=fit, height=fit, ...
1
vote
1answer
1k views

How to to set a padding around the page body, draw a frame/border around it, and then add some margin?

What if I want to set a padding around the page body (on all pages), draw a frame/border around it, and then add some margin? The geometry package doesn't seem to have an option for this among its ...
0
votes
1answer
93 views

Box aligned equation under (deep) itemization

\documentclass[11pt]{article} \usepackage{amsmath} \usepackage{empheq} \newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}} \begin{itemize} \item[1.] zz \begin{itemize} \item[1.1] \begin{...