Changes

Jump to navigation Jump to search
1,347 bytes added ,  07:05, 20 May 2021
no edit summary
In = Overview = This page describes a few ways to create speech bubbles. == LMTX == Using ConTeXt it is possible LMTX, the following code can be used without any module dependency: <texcode>\startuseMPgraphic{TextBubble}{side} z1 = (0, 0) ; z2 = (OverlayWidth, 0) ; z3 = (OverlayWidth, OverlayHeight) ; z4 = (0, OverlayHeight) ;  offset := 1 ; tail := 1 ;  if \MPvar{side} = 1: offset := 5 ; tail := -1 ; fi  (offset/6)[x1,x2] = x8 + 1cm * tail = x7 + .5cm = x9 - .5cm ; y7 = 0cm ; y8 = -1cm ; y9 = 0cm ;  path p ; p = (z1--z7--z8--z9--z2--z3--z4--cycle) cornered .25cm ; draw p withpen pencircle scaled 0.5 ;  setbounds currentpicture to use OverlayBox ;\stopuseMPgraphic % Send (right)\defineoverlay[TextBubbleTxOverlay][\useMPgraphic{TextBubble}{side=1}]\defineframedtext[TextBubbleTxFrame][ frame=off, background=TextBubbleTxOverlay, offset=.75em, location=right, after={\blank[1.25cm]},] % Receive (left)\defineoverlay[TextBubbleRxOverlay][\useMPgraphic{TextBubble}{side=0}]\defineframedtext[TextBubbleRxFrame][ frame=off, background=TextBubbleRxOverlay, offset=.75em, location=left, after={\blank[1.25cm]},] \starttext \startTextBubbleRxFrame \input weisman \stopTextBubbleRxFrame  \startTextBubbleTxFrame \input ward \stopTextBubbleTxFrame  \input knuth\stoptext</texcode> == Tikz Module == Use the Tikz module to create « speech bubbles ». Here are two ways of doing this: the first one works under mkii and mkiv, while the second one needs the Annotation module written by Wofgang Schuster who wrapped the Tikz commands in ConTeXt macros in the code below.
<texcode>
419

edits

Navigation menu