Questions tagged [mdframed]

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

Filter by
Sorted by
Tagged with
49 votes
5 answers
42k 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?
AbstractDissonance's user avatar
52 votes
3 answers
4k 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 ...
kiss my armpit's user avatar
4 votes
2 answers
927 views

strange interaction between `mdframed` and `\item`

I would like to understand (and to find a solution for it) the following problem. First, the MWE : \documentclass{article} \usepackage{mdframed} \usepackage{fancybox} \newsavebox{\mcBox} \...
Loic Rosnay's user avatar
  • 8,047
8 votes
3 answers
2k views

How to make a twocolumn breakable colored environment in book template

I'm trying to create a twocolumn breakable colored environment in tufte book template but using mdframed and tcolorbox wasn't useful.the error is : multicolumn does not make sense in a box! \...
Mrt's user avatar
  • 151
8 votes
2 answers
2k 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 ...
Peter Grill's user avatar
5 votes
2 answers
2k views

Boxed text between pages

I've made boxed text into a manuscript using tikz by following the example in texamples, it works like a charm as long as the box is short enough to fit into a page. \documentclass{article} \...
Dox's user avatar
  • 5,579
17 votes
3 answers
6k views

Inspired beautiful box from Indesign

I found these beautiful box in Math ebooks which is created by Adobe Indesign, I tired mdframed, tcolorbox but I didn't try Tikz. So could someone create them using LaTeX please? \documentclass[...
Educ's user avatar
  • 4,236
17 votes
1 answer
4k 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}} ...
dustin's user avatar
  • 18.3k
12 votes
2 answers
6k views

Putting frame only around equation using mdframed package

I am in the process of finalizing the notebook text, and I am into framing equations and figures. For this I am testing mdframed package, which produces nice frames. However, I don't know how to ...
Pygmalion's user avatar
  • 5,789
11 votes
4 answers
8k views

SWOT Table - how to convert to an article?

I need a SWOT analyse in color, and I found this one at http://www.mostlycolor.ch/2013/10/colored-blocks-in-beamer.html : Can someone help me by converting the beamer, so I can use it in an article? ...
A. F.'s user avatar
  • 1,227
11 votes
4 answers
9k views

mdframed: size frame to content

Consider this: \documentclass{article} \usepackage[framemethod=TikZ]{mdframed} \begin{document} \begin{mdframed}[innerrightmargin=0pt] TEXT\end{mdframed} \end{document} This produces a frame that ...
Mohan's user avatar
  • 15.7k
1 vote
1 answer
2k views

Margins around Tikz frame

I'm dealing with the graphic part of a document which I need to fill with text. In particular I need to have a header where to put some general information and the document text simply boxed. ...
Dawson's user avatar
  • 247
6 votes
1 answer
2k views

Replace \item with \MyItem to box each list member with an mdframed

Since it was pointed out that redefining \item can be dangerous in strange interaction between `mdframed` and `\item`, I am wondering if there are going to be problems with this solution. My goal is ...
Peter Grill's user avatar
5 votes
2 answers
1k views

create new environment with mdframed and listing

I have some code snippets using a lstlisting environment in a mdframed environment: \begin{mdframed}[roundcorner=5pt] \begin{lstlisting}[mathescape, caption={some snippet}, label=lst:snippet1, ...
SimonH's user avatar
  • 195
2 votes
1 answer
1k views

Frame breaks inside mdframed environment with beamer class

The mdframed environment fails to break into several pages (slides) when used in a frame environment from the beamer class. In the other hand, the boitecoloriee environment from the boites package ...
Romildo's user avatar
  • 4,073
29 votes
1 answer
4k 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 ...
triton's user avatar
  • 291
13 votes
3 answers
6k views

mdframed missing half the frame

Any obvious reason some of the frame is missing here: \documentclass{article} \usepackage{color} \usepackage{hyperref} \usepackage{mdframed} \begin{document} \begin{mdframed} \begin{enumerate} \...
HCAI's user avatar
  • 3,315
13 votes
3 answers
3k views

Print mdframed footnotes at bottom of page instead of after frame

If there is a \footnote inside an mdframed environment, then I can control, via the footnoteinside=false flag, whether or not I want those footnotes included inside the frame or outside. But even when ...
MvG's user avatar
  • 2,573
13 votes
1 answer
8k views

Margins of mdframed without any effect

This code \documentclass[]{scrbook} \usepackage{mdframed} % \usepackage{boxedminipage} \begin{document} \noindent \begin{boxedminipage}{1.0\textwidth} Box of 100 \% width \end{boxedminipage} \...
Matthias Pospiech's user avatar
10 votes
1 answer
5k 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 shadow-...
cmhughes's user avatar
  • 98.9k
10 votes
1 answer
2k 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 think ...
projetmbc's user avatar
  • 12.9k
9 votes
1 answer
3k 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} \...
Romildo's user avatar
  • 4,073
8 votes
1 answer
2k views

Changing footnote symbol within mdframed

Am having difficulty changing the footnote symbol, especially within an mdframed environment. I thought I was done when I came across Changing footnote symbols, but the accepted solution (commented ...
Peter Grill's user avatar
6 votes
2 answers
2k views

Would like a mdframed environment style with framed title box inset above without fill

Here's a slight tweak to one of the mdframed examples that produces a framed title inset above the theorem box \documentclass{article} \usepackage{amsmath} %\usepackage{svgcolor} \usepackage[...
Peeter Joot's user avatar
  • 2,905
19 votes
2 answers
979 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 ...
Tobi's user avatar
  • 55.1k
13 votes
2 answers
2k 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 ...
Peter Grill's user avatar
13 votes
1 answer
7k views

How to insert title in mdframed?

How to insert title in mdframed? In my example does not work. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[framemethod=TikZ]{mdframed} \begin{document} \...
Regis Santos's user avatar
  • 14.1k
11 votes
1 answer
2k views

Boxes for SMS Conversation

How can I render a box to emulate an SMS conversation on a mobile device? Something looking like this (only the inner boxes containing the actual conversation): Note that I would like this to be ...
Nicholas Hamilton's user avatar
10 votes
2 answers
900 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} \usepackage{mdframed} \...
Uiy's user avatar
  • 5,978
9 votes
2 answers
4k views

Textwidth wrong after wrapfigure

I have included a picture with wrapfigure and everything is fine - the problem is that in my next formula environment, the formula is totally wrong! It seems to me, that the width which I set in the ...
BalboaSP's user avatar
9 votes
2 answers
4k views

Color box with rounded corners

Here's my MWE: \documentclass{article} \usepackage[dvipsnames]{xcolor} \colorlet{LightLavender}{Lavender!40!} \begin{document} \colorbox{LightLavender}{hello} world \end{document} It produces ...
Nate Stemen's user avatar
9 votes
1 answer
1k 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 build ...
Tobi's user avatar
  • 55.1k
9 votes
1 answer
1k 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 ...
feculededentier's user avatar
9 votes
1 answer
13k views

How to change the border of mdframed?

I want to change the border color of the mdframe box. By default it take black. \documentclass{article} \usepackage{xcolor} \usepackage{mdframed} \newtheorem{mdtheorem}{Theorem} \newenvironment{...
PSK's user avatar
  • 992
9 votes
1 answer
2k views

How to prevent pagebreak for a custom environment?

I use the following custom environment emailHeader and macros to format an email header (credits belong to egreg). \definecolor{emailHeaderBackground}{RGB}{225,225,225} \usepackage[framemethod=tikz]{...
JJD's user avatar
  • 1,967
8 votes
1 answer
3k views

How to use table in mdframed?

I am working on report format using mdframed and I need to add table inside mdframed. \documentclass[11pt]{article} \usepackage[table]{xcolor} \usepackage{array,ragged2e} \usepackage[pdftex]{...
manish's user avatar
  • 8,791
8 votes
2 answers
1k views

Extra vertical space inside mdframed theorem environment

I have seen several similar questions on TeX.SE of a similar nature, but none of them seem to address my precise issue. I have been working with mdframed environments for a while. I read that there ...
Christopher A. Wong's user avatar
7 votes
1 answer
1k views

Create box around text without creating a paragraph and with line breaking

I want to draw a box (no rounded corners, keep it simple ^^) around one or multiple words. There are two special things: 1) the box should support line break and 2) the box should not cover multiple ...
strauberry's user avatar
  • 3,175
7 votes
1 answer
1k views

Conserve the frame in a mdframed box that spans more than one page

I am using mdframed to create big boxes that span more than one page, but they just leave an unframed side at the top and down of the page. Is there a way to solve this? \documentclass{article} \...
Libertad Pantoja's user avatar
7 votes
1 answer
6k views

mdframed box containing text captioned tables and figures

I would like to create a framed boxes containing arbitrary text, captioned tables and captioned figures. But mdframed does not allow floats inside. How does one achieve this? Something like this does ...
len71's user avatar
  • 567
5 votes
1 answer
2k 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 \documentclass{...
Tobi's user avatar
  • 55.1k
4 votes
3 answers
648 views

Hereditary properties with nested frames (mdframed and tikz)

When nesting an mdframed environment in a mdframed environment that uses tikz, it seems that the nested mdframed environment takes on many of the properties of the environment isn't being nested in, ...
Hayden's user avatar
  • 337
3 votes
1 answer
1k views

Captioning an mdframed box without making unbreakable

I would like to a have a caption below my mdframed box (outside the border if possible) which sometimes span across multiple pages. I managed to create a caption several ways but the pagebreaks are ...
masu's user avatar
  • 6,441
3 votes
2 answers
351 views

Control page breaks in multiple frames via mdframed

I am having an issue with mdframed, where I've created a frames inside frames spanning several pages, but I'd like mdframed to split them differently across the pages, so as much of the text on page ...
Nick's user avatar
  • 123
2 votes
2 answers
2k views

How to add a frame around a float with caption?

I've created a new float element to define examples: \usepackage{float} \floatstyle{plain} \newfloat{example}{thp}{lop} \floatname{example}{\textsc{Example}} I want to set my example in an frame. ...
Thibaut Guirimand's user avatar
1 vote
1 answer
1k views

How to have bold font in mdframed environment?

I did not find bold word in the manual. My tex is: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \newtheorem{question}{Question} \mdfdefinestyle{que}{ linecolor=cyan, ...
Léo Léopold Hertz 준영's user avatar
1 vote
1 answer
688 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} \...
Matthias Pospiech's user avatar
41 votes
1 answer
4k 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" ...
jub0bs's user avatar
  • 57.9k
27 votes
2 answers
2k 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 ...
vveliev's user avatar
  • 540
24 votes
1 answer
7k 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} \usepackage{...
user43289's user avatar
  • 241