As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [mdframed]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

Unwanted indentation when using tcolorbox [duplicate]

When I create boxes with tcolorbox, I get an unwanted indentation in two places: once directly before the heading and secondly in place of the first paragraph (all the following paragraphs have no ...
2 votes
1 answer
44 views

How to add line numbers inside a box?

I have the following code and I would like to have individual line numbers for both first and second parts Code: \documentclass{article} \usepackage{amsmath} \usepackage{mdframed} \begin{figure} \...
0 votes
0 answers
22 views

latex+dvips+gv: the left vertical bar of the frame of mdframe vanishes at certain magnifications [duplicate]

Feeding \documentclass{article} \usepackage{mdframed} \begin{document} \begin{mdframed} Test \end{mdframed} \end{document} to latex followed by dvips results in the left vertical bar (and, with ...
1 vote
1 answer
44 views

Problem with mdframed, listings and TikZ for a codeblock

Context For a document I am writing, I use mdframed and listings to create a "fancy" codeblock look. I use rounded corners and custom colors for this view. During the creation of this ...
2 votes
1 answer
49 views

Vertically justify frame before page break using mdframed

When mdframed breaks a page, it appears that there is no vertical justification on the page before the page break. Compiling the code sample below for example, it can be seen that there is more ...
0 votes
0 answers
23 views

List multiple tikz-mdframed boxes like the list of figures, tables and listings

I'm writing a thesis in which I have created multiple "box environments" for different kind of insights and examples. I've started from the advance examples of the mdframed documentation ...
3 votes
1 answer
68 views

enumitem counter scope issue

An mdframe blocks global counting. How can I resolve this? \documentclass{article} \usepackage{enumitem,mdframed} \begin{document} \begin{enumerate} \item This should have a numeral of one. \end{...
0 votes
1 answer
89 views

Mdframed box — why is it cropped?

The first box box on the top (see the image below) is cropped and I don't know why: \documentclass[12pt]{article} \usepackage{mdframed} \begin{document} outside of the \global\mdfdefinestyle{...
1 vote
1 answer
82 views

Framed text with title on the left margin

I am trying to type a margin note (in book format) on the left side with a line underneath, but "perpendicular" to the main text as shown in the attachment below: \documentclass[12pt]{...
0 votes
1 answer
146 views

How to create a colorbox that looks like "example" section in textbooks?

I'd like to create a tcolorbox that looks like "example" sections in many textbooks, for example, something like the attached screenshot. I found one sample code from an online source, ...
0 votes
1 answer
93 views

Footnote inside stacked enumerate inside mdframe, how to fix numbering and place the footnotes outside of the frame on the same page?

I have a stacked enumerate going on inside a frame (mdframed package). For some reason the footnotes are marked a, b, c, etc. \usepackage{mdframed} \usepackage{csquotes} \begin{document} \begin{...
0 votes
1 answer
184 views

The leftbar environment and enumerate

I'm looking to work on my homework template, and I've come to a wall. I'm trying to make the leftbar environment from the mdframed package work with the questions environment such that the bar is ...
0 votes
0 answers
31 views

Spacing after \declaretheoremstyle

I'm trying to implement a theoremstyle which is shaded and found a way by using mdframed in \declaretheoremstyle and it looks pretty good, but I want to increase the spacing after the text. Above the ...
0 votes
1 answer
329 views

Framed list of authors in acmart manuscript

I want to use frame, framed, mdframed, tcolorbox or any other package to create a box around content. But the content I want to put the box around comes from the .cls file. For example, I want to ...
2 votes
1 answer
69 views

Disable specific styles of mdframed package of showing any content

In this recent question I found how I could disable all instances of mdframed of showing any content. This is done elegantly through \RenewDocumentEnvironment{mdframed}{+b}{}{}. Now, I'd like to know ...
1 vote
2 answers
42 views

Is it possible to disable mdframed package of showing any content

I use the mdframed package a lot while drafting my report, mainly by using colors to call my attention to the need to rework these parts. Now I have to send a pdf without any of this content that ...
0 votes
0 answers
29 views

newenvironment with enviromentS (plural) inside

I'm trying to create an environment for a particular class (based on memoir) I'm doing. I followed this video (https://www.youtube.com/watch?v=r_DQnSXLHBc) besides Overleaf basic tutorials on creating ...
2 votes
3 answers
103 views

How to add numbers next to the frame line using mdframed

I just came across the mdframed package and found it very useful. However, I would like to add numbers next to the frame line similar to the picture I attached (See red numbers, that's how I want it). ...
1 vote
1 answer
37 views

mdframed doesn't break, but there are suffisant space for breakable mdframed

Here is the (almost) MWE: \documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[hmargin=1.25in,vmargin=1.25in]{geometry} \usepackage{picins} % fix for a bug that adds space ...
2 votes
0 answers
45 views

Space before theorems using ntheorem and add-ons using mdframed

I've developed the attached framework for my mathematical developments using several inputs. Anyway, I have faced two inconveniences: I would like to add space before each theorem. I would like also ...
1 vote
1 answer
42 views

How to create a new environment with mdframed and lstlisting? [duplicate]

I want to create a new environment that wraps mdframed and lstlisting together as shown below, however that does not work for me as it does not compile. Any ideas what the issue is and how to define a ...
1 vote
1 answer
31 views

Line break after definition

I use the following to have shaded definitions: \colorlet{shadecolor}{orange!15} \declaretheoremstyle[ headfont=\normalfont\bfseries, notefont=\mdseries, notebraces={(}{)}, bodyfont=\normalfont, ...
1 vote
1 answer
173 views

How to make footnote for framed theorem appear at bottom of page?

I recently learned how to put a frame around display-math expressions, and now I'd like to add a footnote to the text in the frame. When I try this, however, the footnote appears at the bottom of the ...
0 votes
0 answers
49 views

Mdframed infinite loop within declare theorem style

First of all, I would like to say that I learned LaTeX by myself, and that my code may not be optimized or I may not master the good practices. Don't hesitate to correct me or to give me advice on ...
3 votes
0 answers
46 views

Avoid orphaned mdframed box after section heading at end of page

In LaTeX, when I use thmtools (which uses mdframed internally) to create theorem boxes and I use them after a section heading at the end of the page, they often times are placed on the next page ...
0 votes
1 answer
72 views

Change background color of title using declaretheoremstyle

Here's my MWE: \documentclass{report} \usepackage[usenames,dvipsnames,pdftex]{xcolor} \usepackage{amsmath,amsfonts,mathtools,amsthm,amssymb} \usepackage{mdframed} \usepackage{varwidth} \usepackage{...
4 votes
2 answers
928 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} \...
1 vote
1 answer
54 views

Vertical coloured title with mdframed

I'm trying without sucess to make an environment like this: What I have know is this: The perfect answer to this question would be a way to have the title in colors and text out of the mdframed ...
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 ...
0 votes
0 answers
34 views

First line after mdframed has no indent

First line after mdframed has no indent. Then everything is normal. How to fit it? Main tex file \documentclass[draft, twoside, 10pt, openright]{extbook} \usepackage[a5paper, outer=15mm,inner=15mm,...
5 votes
1 answer
690 views

mdframed: unable to reproduce the example environment with figures [duplicate]

I used mdframed but I am unable to reproduce the example environment (?) from this primer. The main problem is with figures (graphics, plots), of course. Any help?
4 votes
1 answer
666 views

Using sidenotes in mdframed environment

I get problems when I try to use sidenotes in an mdframed environment: \documentclass{tufte-book} \usepackage{xcolor} \usepackage{mdframed} \newtheorem{mdtheorem}{Theorem} \newenvironment{theorem}% {\...
0 votes
1 answer
27 views

Have an answer space box filling the page using a mdframe

I'm using the exam class to make tests and am using an mdframed solution I found here to make an answer space with dotted lines to write their answers. What I want is to have a way so that the boxes ...
1 vote
1 answer
73 views

Framing \frame using mdframed with beamerarticle

I want to generate handouts in article style that include my beamer slides (mostly diagrams) and explanations. For that I am now considering to use beamerarticle. I want to frame the slides using ...
1 vote
1 answer
26 views

BeamerArticle: Box around text between frames with mdframed causes error

I am using beamerarticle and want to put a box around the content between frames and only when there is really content. Is that possible? I tried it with mdframes package quite symmetric to Framing \...
4 votes
1 answer
130 views

Correcting formatting for framed theorems

I have been using the following code to create overhang for my theorems (and other theorem-like environments) for a while now. \documentclass{article} \usepackage{amsthm} \usepackage{mdframed} \...
2 votes
1 answer
55 views

No newline after mdframed title (i.e. inline title)

I'm using mdframed for all my theorem-like environments. By default, mdframed titles appear above the body. I want one of my mdtheorem environments to start the body on the same line as the title, ...
1 vote
1 answer
85 views

How to use mdframed to create a round cornered box?

I am trying to wrap my text around a round cornerd box, so I chose mdframed package, for whatever reason, it doesn't do what I intend it to do. \documentclass[a4paper,12pt]{article} \usepackage{lipsum}...
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 ...
2 votes
1 answer
51 views

Mdframed and monochrome

When I use the monochrome option with the article class, the background of the mdframed frames is completely black. Is it a bug or just my misuse of the monochrome option? \documentclass{article} %\...
1 vote
1 answer
52 views

mdframed creates small white lines around the content, how do I get rid of them?

I use mdframed to create a black background in a preview environment. Since I could not figure out how to color the preview border black as well, I set it to 0 and included a black line around the ...
1 vote
1 answer
35 views

How to Indent Highlighted (with Margins Adjusted) Paragraphs with Mdframed

Consider the code \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \usepackage{lipsum} \parindent 10pt \begin{document} \thispagestyle{empty} \lipsum[3] \begin{mdframed}[...
3 votes
1 answer
78 views

How to Contiguously Shade a Portion of a Paragraph with Color

Consider the code: \documentclass{book} \usepackage{xcolor,soul} \colorlet{soulred}{red!25} \begin{document} \thispagestyle{empty} \LARGE \begingroup \sethlcolor{soulred}% Here is some text. \hl{...
0 votes
0 answers
55 views

How to change text colour across pages using mdframed

Consider the following MWE: \documentclass[twoside, a4paper, 12pt]{article} \usepackage{amsmath, amssymb} \usepackage[framemethod=TikZ]{mdframed} \linespread{1.5} \usepackage[top=0.85in, bottom=0....
0 votes
2 answers
1k views

Adjusting page width/margins in paracol

I can't seem to find an appropriate option in the paracol documentation, but I was wondering if there is a way to easily adjust the margins using the paracol package or if I have to do some external ...
1 vote
1 answer
268 views

Parsing optional argument from \newenvironment to \newmdenv

I'd like to parse an optional variable from a custom \newenvironment{example} to an mdframed environment \mytextbox nested in the example environment. What I'd like to achieve is something like ...
0 votes
2 answers
75 views

Footnotes in mdframed: Why are they not at the bottom of the page?

When I use the mdframed environment around a table, I encounter two problems: (1) The footnotes do not appear at the bottom of the page; (2) The footnotes are marked with letters, while the rest of ...
3 votes
2 answers
214 views

How to center text left and right on the same line?

I'm looking to recreate this title environment below. I think the person used mdframed so I choose to use that as well. I get stuck when I try implementing the course name, professor name or week ...
0 votes
1 answer
25 views

Soul hl within a mdframed environment won't print footnote number?

I am trying to highlight some text with soul::hl within a mdframed environment defined by newmdenv. I get expected output using: hl text outside of the environment normal text within the environment. ...
1 vote
2 answers
88 views

Line with left margin and vertically centered text from environment using mdframed package

I am using the mdframed package to put vertical lines in some paragraphs. But I want the text to have a 2cm left margin and all the text to be centered vertically. Neither is working. How could I do ...

1
2 3 4 5
16