{mdframed} is a package for creating framed boxes that can break across pages.

learn more… | top users | synonyms

34
votes
1answer
1k views

How was this tip box produced?

I presume Drew Neil (of Vimcasts.org fame) used some TeX typesetting engine (XeLaTeX?) to typeset his excellent book, Practical Vim. See a screenshot below. I really like the way his "tip boxes" ...
30
votes
3answers
594 views

What are the relative strong and weak points between tcolorbox and mdframed?

I think practically we will not use both tcolorbox and mdframed in a single input file. Correct me if I am wrong. So we have to choose either tcolorbox or mdframed. However, without knowing the strong ...
25
votes
2answers
979 views

MATLAB like command box

hello i am trying to set up style for script box. so far i got \begin{script*} >> help \end{script*} working and displaying i want final version to look some what similar to this picture ...
23
votes
3answers
706 views

Box with rounder corners, but inverted

I am a long time LaTeX user, and recently I needed something which I could not figure out by myself, so I would appreciate anyones time and help. I need a box with rounded corners, which is easy to ...
21
votes
5answers
6k views

how to get the current chapter name, section name, subsection name, etc?

How can one get the current name of the following: Chapter, Section, Subsection(s), frame, label, mdframed?
20
votes
1answer
1k views

framed or mdframed? (Pros/Cons)

I'm currently thinking about using shaded and framed sections in my document. But for now, I couldn't clarify the differences between framed and mdframed (or other packages). Although the ...
18
votes
1answer
566 views

How to typeset programming code syntax with annotations?

If possible I would like to know how to this on latex/tikz to add this like (environment and graph) on my ebook. Thanks a lot!!! Code im trying to implement: \documentclass[11pt,fleqn]{book} ...
18
votes
2answers
501 views

How to make mdframed ignore descenders in last line

How can we make mdframed to ignore the descenders of the last line in the calculation of the innerbottomsep. In my eyes there are two reasons to desire this: Inner margin The optical bottom sep is ...
14
votes
2answers
1k views

mdframed and wrapfig

Before starting the question, I apologize for the large pictures. I had to use some long text to demonstrate the problem. To generate something like: I used the following command: ...
13
votes
1answer
698 views

Typesetting a definition

My current set up for type setting definitions is \newenvironment{definition}[1][Definition:]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} ...
13
votes
1answer
333 views

mdframed is causing wrong alignment at the bottom of pages

If you would be so kind to compile this LaTeX document: \documentclass[a4paper,11pt]{book} \usepackage[paper=a4paper,twoside=true,lmargin=4cm, rmargin=4cm,bindingoffset=0cm]{geometry} ...
12
votes
1answer
406 views

How this shading effect would be applied to an mdframed environment?

I'd like to apply the following shading effect proposed in " Fake sheet effect " as a background for a mdframed environment. How can this be achieved?
12
votes
1answer
205 views

Subtitle block in mdframed

I am having a small problem with mdframed.sty. The subtitle block seems to have a 0.4pt frame with the same color of the subtitle background. This causes the left and right ends of the subtitle frame ...
12
votes
1answer
4k views

Is there an debian/ubuntu package containing mdframed.sty?

I found several answers on this site recommending the mdframed package. However, I can't find a ubuntu texlive package that includes this. Do I have to install this manually or am I overlooking ...
11
votes
3answers
2k 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 ...
11
votes
2answers
1k views

Transparent background for mdframed environment?

Is it possible to specify a transparent background colour for the mdframed environment, so that anything which might be underneath will be visible?
11
votes
2answers
429 views

mdframed box of fixed minimum height

I would like my mdframed boxes from MyEnvironment to have a minimum total (title+body) height. The height can be greater (if the content warrants it), but not smaller than a certain size. I can ...
10
votes
2answers
2k views

How to put round cornered frame around an image

I want a nice colored frame around an image which has rounded corners. Here is my attempt, using mdframed, but, as you can see, the inner edge of the frame is a right-angle, and not rounded. I would ...
10
votes
2answers
148 views

Writing a command to detect when in mdframed

I want to write a marginnote command that detects whether it is called within a mdframed environment, in particular I want to be able to distinguish the following normal text normal math text in ...
10
votes
3answers
544 views

Rounded box with image and text

I'm trying to create a rounded box with both text and image. The desired result is as this: Where the image is rounded at the left edges. I have managed everything except the the image part using ...
10
votes
1answer
711 views

Could not get round corner working in mdframed

Round corner is not working in mdframed environment although I followed the example shown in the mdframed package. Below is my code \documentclass[10pt]{article} \usepackage{amsmath} ...
10
votes
2answers
490 views

mdframed nested frametitle bug

This issue is fixed in version 1.6b mdframed at github When nesting frames the inner most frametitle is used. The frametitle for all these is frame3. \documentclass{book} ...
10
votes
1answer
499 views

Why is parskip=half messing up the spacing in mdframed?

without parskip: parskip=half: \documentclass[parskip=half]{scrartcl} \usepackage{blindtext} \usepackage{amsmath} \usepackage{amsthm} \usepackage{thmtools} ...
10
votes
1answer
165 views

mdframed: how to prevent a box from splitting if the remaining content (or the initial content) is too small?

Question I would like to prevent mdframed to split a box too early or too late. By this, I mean that I would like the remaining part of the box to always be greater than a fixed length, given before. ...
10
votes
1answer
182 views

How to have the mdframed material flow in the top part of consecutive pages

Suppose you have the following layout: The gray area represents normal text. The orange area consists of one or more text boxes (inserts) of given height. Some textbook layouts present advanced or ...
10
votes
1answer
624 views

mdframed with label outside of box

I am looking to do two boxes with mdframed similarly to the following: The first box is easy but I don't know how to place a label to the left of the second box. The positions of the dashed lines ...
10
votes
1answer
953 views

How to produce a tight box with a fancy border?

I'd like to be able to typeset a tightly-boxed formula with a fancy border. My progress so far has been to produce a box (with mdframed) with the fancy border I want (with tikz), but instead of being ...
10
votes
1answer
537 views

Using mdframed after a section heading

The following is a very contrived example, but it illustrates a problem I am unable to solve with the mdframed package. When the mdframed environment follows a section heading but there is ...
10
votes
1answer
392 views

mdframed does not split correctly between pages

I use mdframed to make boxes and split them across pages. However, sometimes mdframed splits! very strangly across the pages. In this example he prefers splitting, while there is enough space to put ...
9
votes
2answers
520 views

Framed box, over framed text with image

Hi all, I'm a newby in LaTeX but after researching online, I have seen that it is possible to create boxes and frames adjusted to text and images. I am trying to achieve something like the image, ...
9
votes
1answer
858 views

mdframed-Put something on the start of one vertical left rule

I would like to obtain something like in the following picture (I've put Z! instead of the danger symbol). In the following code, I would like to put the danger symbol on the vertical rule. I ...
9
votes
1answer
2k views

drop shadow framed environment using mdframed & tikz

I'm attempting to make a drop shadow environment using mdframed and tikz. So far, I have (perhaps naively) tried \newmdenv[tikzsetting={fill=green!20,drop shadow}]{myshadowbox} I know that ...
9
votes
2answers
187 views

easylist in tabular

I'd like to build this table: As I have a very long list to itemize, I'd like to use easylist. Obviously the easylist-group causes problems in the tabularx-environment. That's what I coded so far: ...
9
votes
1answer
675 views

Excursus environment using mdframed: Issue with page breaks

This question is a follow-up question to: Access mdframed node coordinates with TikZ? @MarcoDaniel: Awesome package (mdframed)! Nice clean code, too. @Tobi: I really like your new excursus ...
9
votes
1answer
538 views

Mdframe environnment on multiple page : top margin

I am using mdframedd for examples in my report. The frames are split on several pages. My problem is that on the second page the frame doesn't have any top margin. And this is very ugly. Here is my ...
9
votes
1answer
195 views

Framed mdtheorem with qed symbol at the end

I'm trying to include a $\blacktriangle$ at the end of a framed environment using the mdframed package. However, my code is somehow not working properly. Let me explain what I'm doing: ...
9
votes
1answer
376 views

How to put footnotes in the page where they belong in a mdframed environment

I have a large bunch of text in a mdframed environment, that span more than one page. As it seems reading the documentation, the mdframed environment put every footnotes at the end of the frame, by ...
8
votes
2answers
91 views

Package csquotes does not seem to work within a mdframed box defined via a macro

If I define a macro which uses a mdframed box, this seems to disable csquotes (red box). But using mdframed directly (i.e., without defining it via a macro), then the csquotes package can do its job ...
8
votes
1answer
899 views

mdframed : Bug with page break?

I'm trying to use the package mdframed to handle framed boxes, that allow page breaking when the content of the box is too large. Nevertheless, i encounter the following difficulty : ...
8
votes
1answer
560 views

Access mdframed node coordinates with TikZ?

Is it possible to get a (breakable) frame like this with mdframed? Or as a more general question. Can one access the coordinates of the frame that is drawn with TikZ? With a pagebreak in it: I ...
8
votes
1answer
871 views

mdframed with tikz method: putting line numbers outside of frame

I want to number the lines in a mdframed environment with the line numbers appearing on the left of the frame, outside of it. \documentclass{article} \usepackage[framemethod=latex]{mdframed} ...
8
votes
1answer
161 views

How to get more than 3 levels of nesting in mdframed environments?

Before I get to many of "don't do this as it does not look good", I have two modes of my documents: Final mode: where there is ONLY one level of nested mdframed Review mode: where there are numerous ...
8
votes
1answer
371 views

Add vertical space before and after framed-theorem environments

I want my theorem-like environments to be framed, as it's an effective way of making them stand out from the main text. According to Gonzalo Medina's answer to the question box around theorem ...
8
votes
1answer
193 views

Why is mdframed inserting a blank page?

I'm using the awesome mdframed by Marco Daniel and I'm having some problems with pagination. Sometimes it will insert a blank page, depending on the exact height of the content. Here's the smallest ...
8
votes
1answer
504 views

“note environment” with mdframed

Here is what I have: And here is what I would like: The code to get what I currently have: \documentclass[a4paper, 11pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} ...
8
votes
2answers
1k views

\prevdepth error with mdframed and listings

I get strange errors with the last versions of mdframed (v 1.4) and listings (v 1.4). Here is a minimal example: \documentclass{minimal} \usepackage{mdframed} \usepackage{listings} \begin{document} ...
7
votes
3answers
207 views

To make one environment flow into another without empty space

I have this design at the moment. However, when you have many of those, they distract much. I propose to have Answer just on the same line with Question like Question 41 Lorem ipsun. Answer 38 ...
7
votes
2answers
615 views

Excess vertical space in mdframed ending with display math environment

When the mdframed environment ends with an align there is excess vertical spacing at the bottom. I would like to adjust the MyBoxedEnvironment environment such that the vertical space at the bottom ...
7
votes
1answer
314 views

Using enumitem inside mdframed

I tried to use enumitems within mdframed as \documentclass{article} \usepackage{mdframed} \usepackage{enumitem} \usepackage{pifont} \newcommand{\pitem}[1]{{\item {\small #1}}} \begin{document} ...
7
votes
3answers
179 views

Shrink monospaced font in custom (verbatim) environments

I'm redesigning lecture notes for a university class since the students wanted to read the notes on their tablets, e-book readers, etc. I have code blocks in these documents, defined in the cdblk and ...