SlideShare a Scribd company logo
3
Most read
6
Most read
7
Most read
How to make nice-looking framed boxes in LaTeX
                    articles
Examples of framed, mdframed, fancybox and bclogo packages


                        Vesa Linja-aho

                             Metropolia


                         July 29, 2011




                   Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
Using framed boxes in Beamer




                                     A
     When making lecture slides with LTEX and Beamer package,
     you can emphasize important things (theorems, facts,
     common mistakes etc.) by using block, exampleblock and
     alertblock environments, as demonstrated on the next slide.




                      Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
Example of block environments in Beamer

  This is a block
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac
  arcu est, vel posuere velit. In congue erat vel lorem ornare pretium.

  This is an exampleblock
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac
  arcu est, vel posuere velit. In congue erat vel lorem ornare pretium.

  This is an alertblock
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac
  arcu est, vel posuere velit. In congue erat vel lorem ornare pretium.

  Syntax:
  begin{block}{Title of the block}Some text...end{block}
  (for block, exampleblock or alertblock).

                         Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
Problem: what if you are not making slides but a book or
article?




      Beamer block environments only work inside beamer. If you
      are writing an article or a book, you must find another way.
      There are a number of LaTeX packages for making framed
      boxes. On the following slides, I’ll introduce some of them.




                        Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
The simplest way: framebox




                        This is a framebox.

  No extra packages are needed. The code:

  framebox{This is a framebox.}




                       Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
The package framed
  First use the package and define the shading color:
  usepackage{framed,color}
  definecolor{shadecolor}{rgb}{1,0.8,0.3}1

                        This is a framed text.


                        This is a shaded text.

                      This is a snugshade text.

                       This is a text with leftbar.
  The code (replace ”shaded” with frame, snugshade or leftbar):
  begin{shaded}This is a shaded text. end{shaded}
    1
      Read more on defining colors:
  http://en.wikibooks.org/wiki/LaTeX/Colors
                        Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
The package fancybox



  First select the package: usepackage{fancybox}
   This is a shadowbox.

   This is a doublebox.
  §                   ¤
  This is an ovalbox. ¥
  ¦
  §                   ¤
  This is an Ovalbox. ¥
  ¦
  The code (replace ”shadowbox” with doublebox, Ovalbox etc.):

  shadowbox{This is a shadowbox.}




                          Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
The package mdframed


  First select the package: usepackage{mdframed}
  This is like the regular framed-package, but allows the frame to
  continue on multiple pages (but not on Beamer slides, only in
  article, book etc.) and allows user to customize margins,
  background color, line color etc.
    This is an mdframed text with yellow background.
  The code:

  begin{mdframed}[backgroundcolor=yellow]
  This is an mdframed text with yellow background.
  end{mdframed}




                         Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
The package bclogo


  First select the package: usepackage[tikz]{bclogo}
       Bclogo seems to be the most versatile!
       This box is made with bclogo. Corners are rounded and I love
       that crayon :-).
  The code:
  begin{bclogo}[couleur = blue!30,arrondi = 0.1,
  logo = bccrayon, ombre = true]{Bclogo seems to be the most versatile!}
  This box is made with bclogo. Corners are rounded and I love that crayon :-).
  end{bclogo}

  The documentation is in French, but it can be understood very
  well (there are multiple examples in the documentation).



                          Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
A couple of interesting ”unofficial” packages



  For transparent shadows: http://osdir.com/ml/tex.latex.
  beamer.general/2007-06/msg00070.html
   This is a boxed environment with
   semi-transparent shadow.

  The code:

  begin{shadowblock}{6cm}
  This is a boxed environment with semi-transparent shadow.
  end{shadowblock}




                     Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles
A couple of interesting ”unofficial” packages
  For drawing signal flow diagrams:
  http://pgf.cvs.sourceforge.net/viewvc/pgf/pgf/
  incoming/KarlheinzOchs/

     Input terminal

                          x(t)


  The code:

  begin{signalflow}{Input terminal}
     node[input]      (in)                {$x(t)$};
     node[coordinate] (c) [right from=in] {};
     % signal path
     path[r>] (in) -- (c);
  end{signalflow}

                      Vesa Linja-aho   How to make nice-looking framed boxes in LaTeX articles

More Related Content

What's hot (20)

PPT
Dfa h11
Rajendran
 
PPT
Seed filling algorithm
Mani Kanth
 
PPTX
Daa:Dynamic Programing
rupali_2bonde
 
PPTX
Rule based system
Dr. C.V. Suresh Babu
 
PPTX
Computer graphics(parametric cubic curves)
Sinthia Sarker
 
PPTX
Types of environment in Artificial Intelligence
Noman Ullah Khan
 
PDF
Informed search
Amit Kumar Rathi
 
PPTX
Graph traversals in Data Structures
Anandhasilambarasan D
 
PPTX
Artificial Intelligence
Vinod Kumar Meghwar
 
PPTX
Dda algorithm
Mani Kanth
 
PDF
Machine learning Lecture 2
Srinivasan R
 
PPTX
Knapsack problem using greedy approach
padmeshagrekar
 
PPTX
Planning
Amar Jukuntla
 
PPT
Fuzzy Set Theory
AMIT KUMAR
 
PPT
01 xml document structure
Baskarkncet
 
PPTX
Indexing structure for files
Zainab Almugbel
 
DOC
Question bank
chandrashekardk
 
PPT
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
PPTX
Semantic Networks
Jenny Galino
 
PDF
A* Search Algorithm
vikas dhakane
 
Dfa h11
Rajendran
 
Seed filling algorithm
Mani Kanth
 
Daa:Dynamic Programing
rupali_2bonde
 
Rule based system
Dr. C.V. Suresh Babu
 
Computer graphics(parametric cubic curves)
Sinthia Sarker
 
Types of environment in Artificial Intelligence
Noman Ullah Khan
 
Informed search
Amit Kumar Rathi
 
Graph traversals in Data Structures
Anandhasilambarasan D
 
Artificial Intelligence
Vinod Kumar Meghwar
 
Dda algorithm
Mani Kanth
 
Machine learning Lecture 2
Srinivasan R
 
Knapsack problem using greedy approach
padmeshagrekar
 
Planning
Amar Jukuntla
 
Fuzzy Set Theory
AMIT KUMAR
 
01 xml document structure
Baskarkncet
 
Indexing structure for files
Zainab Almugbel
 
Question bank
chandrashekardk
 
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
Semantic Networks
Jenny Galino
 
A* Search Algorithm
vikas dhakane
 

Similar to How to make boxed text with LaTeX (20)

PDF
LaTeX Beamer Small Tips
Taekeun Hwang
 
PDF
Chap05 scr
Hirwanto Iwan
 
PPTX
LaTeX for B.Sc. Mathematics,an introduction
jayakumarc9
 
PPT
Introduction to latex by Rouhollah Nabati
nabati
 
PDF
How to use LaTeX and Beamer to prepare presentation for Slideshare
Vesa Linja-aho
 
PDF
Write effectlively in late x
C-CORE
 
PPT
Latex for beginners
Kaushik Naik
 
PDF
Global Versus Local
LiquidHub
 
PPT
latex document for IT workshop Lab . B.Tech
Sandhya Gandham
 
PPTX
TECHNICAL WRITING USING LATEX POWER POIN
saykrishna
 
PPT
Introduction to LaTeX:for begi nners to
PoojaAnupGarg
 
PPT
Introduction to LaTeX - Dumitrescu.ppt
GhufranKhan42
 
PPT
Introduction to LaTeX - Dumitrescu.ppt
anandmaheshwari15
 
PPT
Introduction to LaTeX - Dumitrescu.ppt
rajinooka
 
PPT
Introduction to LaTeX - Dumitrescu.ppt
TaraLeander
 
PPT
Introduction to LaTeX - Dumitrescu.ppt - It is a slide on the internet explai...
akuysal1
 
PPT
LaTeX for Engineer.ppt
sudhirsingh144243
 
PPT
Introduction to LaTeX - Dumitrescu (1).ppt
Amit Bairwa
 
PPT
Introduction to LaTeX some content related to LATEX
ajishekraj1
 
LaTeX Beamer Small Tips
Taekeun Hwang
 
Chap05 scr
Hirwanto Iwan
 
LaTeX for B.Sc. Mathematics,an introduction
jayakumarc9
 
Introduction to latex by Rouhollah Nabati
nabati
 
How to use LaTeX and Beamer to prepare presentation for Slideshare
Vesa Linja-aho
 
Write effectlively in late x
C-CORE
 
Latex for beginners
Kaushik Naik
 
Global Versus Local
LiquidHub
 
latex document for IT workshop Lab . B.Tech
Sandhya Gandham
 
TECHNICAL WRITING USING LATEX POWER POIN
saykrishna
 
Introduction to LaTeX:for begi nners to
PoojaAnupGarg
 
Introduction to LaTeX - Dumitrescu.ppt
GhufranKhan42
 
Introduction to LaTeX - Dumitrescu.ppt
anandmaheshwari15
 
Introduction to LaTeX - Dumitrescu.ppt
rajinooka
 
Introduction to LaTeX - Dumitrescu.ppt
TaraLeander
 
Introduction to LaTeX - Dumitrescu.ppt - It is a slide on the internet explai...
akuysal1
 
LaTeX for Engineer.ppt
sudhirsingh144243
 
Introduction to LaTeX - Dumitrescu (1).ppt
Amit Bairwa
 
Introduction to LaTeX some content related to LATEX
ajishekraj1
 
Ad

More from Vesa Linja-aho (20)

PPTX
Totta ja tarua sähköautoista ja niiden lataamisesta
Vesa Linja-aho
 
PPTX
Sähköajoneuvojen latauksen ja latausverkoston tilanne tänään ja huomenna
Vesa Linja-aho
 
PDF
Yritys-oppilaitosyhteistyö 2010-luvulla
Vesa Linja-aho
 
PDF
Asiantuntijana sosiaalisessa mediassa
Vesa Linja-aho
 
PPTX
Oppimateriaalit avoimiksi
Vesa Linja-aho
 
PDF
Lukion fysiikan opetussuunnitelmauudistus - ehdotukseni
Vesa Linja-aho
 
PPTX
Mitä ovat avoimet oppimateriaalit?
Vesa Linja-aho
 
PDF
Hybridi-, sähkö- ja kaasuautojen turvallisuusperusteita pelastushenkilöstölle
Vesa Linja-aho
 
PDF
Ajoneuvojen apulaitteiden virrankulutus ja sen aiheuttamat haasteet
Vesa Linja-aho
 
PDF
Uusi SFS 6002 (3. painos) ottaa autoalan huomioon
Vesa Linja-aho
 
PDF
Avoimuuden esteet
Vesa Linja-aho
 
PDF
Metropolia Staff Week: Social Media and New Tools for Administrative Staff
Vesa Linja-aho
 
PDF
Sähköinen liikenne nyt ja tulevaisuudessa (Sähköpäivä 2014)
Vesa Linja-aho
 
PDF
Bitcoin ja kirjanpito - kirjanpitolautakunnan lausunto
Vesa Linja-aho
 
PPT
Tekijänoikeuskoulutus opettajille toukokuu 2014
Vesa Linja-aho
 
PDF
Alustava versio kommenteille: Pelastusalan oppimateriaali (v. 1.1)
Vesa Linja-aho
 
PDF
Sähköturvallisuustutkinto syksy 2013
Vesa Linja-aho
 
PDF
Kuinka bloggaaminen kehittää asiantuntijan ammattikuvaa ja henkilöbrändiä sek...
Vesa Linja-aho
 
PDF
Avointa oppimateriaalia talkoilla
Vesa Linja-aho
 
PDF
Will the Small Screen Kill Wikipedia?
Vesa Linja-aho
 
Totta ja tarua sähköautoista ja niiden lataamisesta
Vesa Linja-aho
 
Sähköajoneuvojen latauksen ja latausverkoston tilanne tänään ja huomenna
Vesa Linja-aho
 
Yritys-oppilaitosyhteistyö 2010-luvulla
Vesa Linja-aho
 
Asiantuntijana sosiaalisessa mediassa
Vesa Linja-aho
 
Oppimateriaalit avoimiksi
Vesa Linja-aho
 
Lukion fysiikan opetussuunnitelmauudistus - ehdotukseni
Vesa Linja-aho
 
Mitä ovat avoimet oppimateriaalit?
Vesa Linja-aho
 
Hybridi-, sähkö- ja kaasuautojen turvallisuusperusteita pelastushenkilöstölle
Vesa Linja-aho
 
Ajoneuvojen apulaitteiden virrankulutus ja sen aiheuttamat haasteet
Vesa Linja-aho
 
Uusi SFS 6002 (3. painos) ottaa autoalan huomioon
Vesa Linja-aho
 
Avoimuuden esteet
Vesa Linja-aho
 
Metropolia Staff Week: Social Media and New Tools for Administrative Staff
Vesa Linja-aho
 
Sähköinen liikenne nyt ja tulevaisuudessa (Sähköpäivä 2014)
Vesa Linja-aho
 
Bitcoin ja kirjanpito - kirjanpitolautakunnan lausunto
Vesa Linja-aho
 
Tekijänoikeuskoulutus opettajille toukokuu 2014
Vesa Linja-aho
 
Alustava versio kommenteille: Pelastusalan oppimateriaali (v. 1.1)
Vesa Linja-aho
 
Sähköturvallisuustutkinto syksy 2013
Vesa Linja-aho
 
Kuinka bloggaaminen kehittää asiantuntijan ammattikuvaa ja henkilöbrändiä sek...
Vesa Linja-aho
 
Avointa oppimateriaalia talkoilla
Vesa Linja-aho
 
Will the Small Screen Kill Wikipedia?
Vesa Linja-aho
 
Ad

Recently uploaded (11)

PDF
Why Tripura Now Relies Heavily on Civil Services Over IAS Officers.pdf
blogging022
 
PPT
Assessment according to 19011-3 presentation.ppt
ibr1722011
 
PPTX
Emotional Intelligence Understanding and Recognition
ssuser9fcca3
 
PPTX
what is personality and Personality Development.pptx
Teenu10
 
PPTX
Banking_Fraud_Presentation_with_Visuals.
johnwick25061999
 
PPTX
why-journaling-helps-in-self-growth.pptx
StrengthsTheatre
 
PPTX
Jurnal international conferences ISSRESTEC
TheodoraSinta
 
PDF
self love, mindfulness, psychology, growth
tanya99budhiraja
 
PPTX
Project Management Class that provides clarity on project management tools
DonEmeka3
 
PPTX
09CHAPTER-O1-Areas-Exposed-to-Hazards-Disaster-from-Difft.-Perspectives.pptx
jeromedmangino23
 
PDF
Make an IMPACT: A Framework to Transform People, Teams, and Futures
Chandan Patary
 
Why Tripura Now Relies Heavily on Civil Services Over IAS Officers.pdf
blogging022
 
Assessment according to 19011-3 presentation.ppt
ibr1722011
 
Emotional Intelligence Understanding and Recognition
ssuser9fcca3
 
what is personality and Personality Development.pptx
Teenu10
 
Banking_Fraud_Presentation_with_Visuals.
johnwick25061999
 
why-journaling-helps-in-self-growth.pptx
StrengthsTheatre
 
Jurnal international conferences ISSRESTEC
TheodoraSinta
 
self love, mindfulness, psychology, growth
tanya99budhiraja
 
Project Management Class that provides clarity on project management tools
DonEmeka3
 
09CHAPTER-O1-Areas-Exposed-to-Hazards-Disaster-from-Difft.-Perspectives.pptx
jeromedmangino23
 
Make an IMPACT: A Framework to Transform People, Teams, and Futures
Chandan Patary
 

How to make boxed text with LaTeX

  • 1. How to make nice-looking framed boxes in LaTeX articles Examples of framed, mdframed, fancybox and bclogo packages Vesa Linja-aho Metropolia July 29, 2011 Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 2. Using framed boxes in Beamer A When making lecture slides with LTEX and Beamer package, you can emphasize important things (theorems, facts, common mistakes etc.) by using block, exampleblock and alertblock environments, as demonstrated on the next slide. Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 3. Example of block environments in Beamer This is a block Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac arcu est, vel posuere velit. In congue erat vel lorem ornare pretium. This is an exampleblock Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac arcu est, vel posuere velit. In congue erat vel lorem ornare pretium. This is an alertblock Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac arcu est, vel posuere velit. In congue erat vel lorem ornare pretium. Syntax: begin{block}{Title of the block}Some text...end{block} (for block, exampleblock or alertblock). Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 4. Problem: what if you are not making slides but a book or article? Beamer block environments only work inside beamer. If you are writing an article or a book, you must find another way. There are a number of LaTeX packages for making framed boxes. On the following slides, I’ll introduce some of them. Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 5. The simplest way: framebox This is a framebox. No extra packages are needed. The code: framebox{This is a framebox.} Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 6. The package framed First use the package and define the shading color: usepackage{framed,color} definecolor{shadecolor}{rgb}{1,0.8,0.3}1 This is a framed text. This is a shaded text. This is a snugshade text. This is a text with leftbar. The code (replace ”shaded” with frame, snugshade or leftbar): begin{shaded}This is a shaded text. end{shaded} 1 Read more on defining colors: http://en.wikibooks.org/wiki/LaTeX/Colors Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 7. The package fancybox First select the package: usepackage{fancybox} This is a shadowbox. This is a doublebox. § ¤ This is an ovalbox. ¥ ¦ § ¤ This is an Ovalbox. ¥ ¦ The code (replace ”shadowbox” with doublebox, Ovalbox etc.): shadowbox{This is a shadowbox.} Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 8. The package mdframed First select the package: usepackage{mdframed} This is like the regular framed-package, but allows the frame to continue on multiple pages (but not on Beamer slides, only in article, book etc.) and allows user to customize margins, background color, line color etc. This is an mdframed text with yellow background. The code: begin{mdframed}[backgroundcolor=yellow] This is an mdframed text with yellow background. end{mdframed} Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 9. The package bclogo First select the package: usepackage[tikz]{bclogo} Bclogo seems to be the most versatile! This box is made with bclogo. Corners are rounded and I love that crayon :-). The code: begin{bclogo}[couleur = blue!30,arrondi = 0.1, logo = bccrayon, ombre = true]{Bclogo seems to be the most versatile!} This box is made with bclogo. Corners are rounded and I love that crayon :-). end{bclogo} The documentation is in French, but it can be understood very well (there are multiple examples in the documentation). Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 10. A couple of interesting ”unofficial” packages For transparent shadows: http://osdir.com/ml/tex.latex. beamer.general/2007-06/msg00070.html This is a boxed environment with semi-transparent shadow. The code: begin{shadowblock}{6cm} This is a boxed environment with semi-transparent shadow. end{shadowblock} Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles
  • 11. A couple of interesting ”unofficial” packages For drawing signal flow diagrams: http://pgf.cvs.sourceforge.net/viewvc/pgf/pgf/ incoming/KarlheinzOchs/ Input terminal x(t) The code: begin{signalflow}{Input terminal} node[input] (in) {$x(t)$}; node[coordinate] (c) [right from=in] {}; % signal path path[r>] (in) -- (c); end{signalflow} Vesa Linja-aho How to make nice-looking framed boxes in LaTeX articles