Intenta comprender el código bien antes de adaptarlo a tu trabajo si ttienes algo que aportar puedes dejarlo en los comentarios.
Solución:
Puedes usar el bclogo
y / o mdframed
y o tcolorbox
paquetes.
La principal diferencia es que las cajas producidas con mdframed
o tcolorbox
podría permitir saltos de página.
Un pequeño ejemplo; la primera caja se produjo utilizando bclogo
; el segundo, usando mdframed
; el tercero (similar al segundo) y el cuarto se produjeron utilizando tcolorbox
:
documentclassbook
usepackagexcolor
usepackage[tikz]bclogo
usepackage[framemethod=tikz]mdframed
usepackagelipsum
usepackage[many]tcolorbox
definecolorbgblueRGB245,243,253
definecolorttblueRGB91,194,224
mdfdefinestylemystyle%
rightline=true,
innerleftmargin=10,
innerrightmargin=10,
outerlinewidth=3pt,
topline=false,
rightline=true,
bottomline=false,
skipabove=topsep,
skipbelow=topsep
newtcolorboxmyboxi[1][]
breakable,
title=#1,
colback=white,
colbacktitle=white,
coltitle=black,
fonttitle=bfseries,
bottomrule=0pt,
toprule=0pt,
leftrule=3pt,
rightrule=3pt,
titlerule=0pt,
arc=0pt,
outer arc=0pt,
colframe=black,
newtcolorboxmyboxii[1][]
breakable,
freelance,
title=#1,
colback=white,
colbacktitle=white,
coltitle=black,
fonttitle=bfseries,
bottomrule=0pt,
boxrule=0pt,
colframe=white,
overlay unbroken and first=
draw[red!75!black,line width=3pt]
([xshift=5pt]frame.north west) --
(frame.north west) --
(frame.south west);
draw[red!75!black,line width=3pt]
([xshift=-5pt]frame.north east) --
(frame.north east) --
(frame.south east);
,
overlay unbroken app=
draw[red!75!black,line width=3pt,line cap=rect]
(frame.south west) --
([xshift=5pt]frame.south west);
draw[red!75!black,line width=3pt,line cap=rect]
(frame.south east) --
([xshift=-5pt]frame.south east);
,
overlay middle and last=
draw[red!75!black,line width=3pt]
(frame.north west) --
(frame.south west);
draw[red!75!black,line width=3pt]
(frame.north east) --
(frame.south east);
,
overlay last app=
draw[red!75!black,line width=3pt,line cap=rect]
(frame.south west) --
([xshift=5pt]frame.south west);
draw[red!75!black,line width=3pt,line cap=rect]
(frame.south east) --
([xshift=-5pt]frame.south east);
,
begindocument
renewcommandbcStyleTitre[1]largetextcolorttblue#1
beginbclogo[
couleur=bgblue,
arrondi=0,
logo=bcbombe,
barre=none,
noborder=true]Commom Programming Error
itshapelipsum[4]
endbclogo
beginmdframed[style=mystyle,frametitle=Web addresses in text]
lipsum[4]
endmdframed
beginmyboxi[Web addresses in text]
lipsum[4]
endmyboxi
beginmyboxii[Web addresses in text]
lipsum[4]
endmyboxii
enddocument
Los paquetes le ofrecen muchas posibilidades de personalización y la documentación contiene numerosos ejemplos.
Para el segundo cuadro enmarcado, aquí hay otra opción que usa TikZ
:
documentclassbook
usepackageenviron
usepackagexcolor
usepackage[tikz]bclogo
usepackagetikz
usetikzlibrarycalc
usepackagelipsum
NewEnvironmyremark[1]
parmedskipnoindent
begintikzpicture
node[inner sep=0pt] (box) parbox[t].99textwidth%
beginminipage.3textwidth
centeringtikz[scale=5]node[scale=3,rotate=30]bclampe;
endminipage%
beginminipage.65textwidth
textbf#1parsmallskip
BODY
endminipagehfill%
;
draw[red!75!black,line width=3pt]
( $ (box.north east) + (-5pt,3pt) $ ) -- ( $ (box.north east) + (0,3pt) $ ) -- ( $ (box.south east) + (0,-3pt) $ ) -- + (-5pt,0);
draw[red!75!black,line width=3pt]
( $ (box.north west) + (5pt,3pt) $ ) -- ( $ (box.north west) + (0,3pt) $ ) -- ( $ (box.south west) + (0,-3pt) $ ) -- + (5pt,0);
endtikzpictureparmedskip%
begindocument
lipsum[4]
beginmyremarkWeb addresses in texts
lipsum[4]
endmyremark
lipsum[4]
enddocument
Aquí un ejemplo usando mdframed
donde los símbolos se toman del paquete dingbat
En lugar de los símbolos, puede utilizar todas las imágenes.
documentclassreport
usepackage[framemethod=tikz]mdframed
usetikzlibrarycalc
usepackagekantlipsum
usepackagedingbat%eye and leftpointright
newcountererror[chapter]
renewcommand*theerrorthechapter.arabicerror
tikzset
errorsymbol/.style=%
rectangle,draw=blue,
,scale=2,overlay
tikzset
lampsymbol/.style=%
,scale=2,overlay
newmdenv[hidealllines=true,backgroundcolor=blue!5,%
frametitle=stepcountererrorComman~Programming~Error~theerror,
frametitlefont=colorblue!80!blackbfseries,
skipabove=topsep,skipbelow=topsep,nobreak,
leftmargin=.3cm,rightmargin=.3cm, innerleftmargin=2cm,
singleextra=path let p1=(P), p2=(O) in ($(x2,0)+0.5*(2,y1)$) node[errorsymbol] eye;,%
]error
newmdenv[nobreak,middlelinewidth=.8pt,
frametitlefont=bfseries,
leftmargin=.3cm,rightmargin=.3cm, innerleftmargin=2cm,
skipabove=topsep,skipbelow=topsep,
singleextra=path let p1=(P), p2=(O) in ($(x2,0)+0.5*(2,y1)$) node[ lampsymbol] leftpointright;
draw[line width=.8pt,white,] ($(O,%
]lamp
begindocument
beginerror
Use only uppercase letters in the names of enumeration constants to make these
constants stand out in a program and to indicate that enumeration constants
are variables.
enderror
beginlamp[frametitle=Web addresses in texts]
Use only uppercase letters in the names of enumeration constants to make these
constants stand out in a program and to indicate that enumeration constants
are variables.
endlamp
enddocument
Lo más probable es que tenga que permanecer como un cuadro que no atraviese los límites de la página. Como tal, una “ecuación” tradicional con una imagen y un cuadro de texto, todos contenidos en un tabular
debería hacer:
documentclassarticle
usepackagearray% http://ctan.org/pkg/array
usepackagegraphicx% http://ctan.org/pkg/graphicx
begindocument
[
left[
begintabular@quadm.3textwidth@qquadm.6textwidth@quad
includegraphics[width=linewidth]example-image-a &
raggedright%
textbfWeb addresses in texts par
There's a package called texttturl designed for typesetting web addresses.
Write mboxtextttstringusepackagestringurlstring in your preamble; this will provide the
command mboxtextttstringurl. This command takes an address for the argument and
will print it out with typewriter font. Furthermore, it is able to handle
special characters in addresses like underscores and percent signs. It even
enables hyphenation in addresses, which is useful for websites with a very
long name.%
endtabular
right]
]
enddocument
Sección de Reseñas y Valoraciones
Si conservas algún recelo o forma de reaccionar nuestro reseña te recordamos escribir una interpretación y con mucho placer lo interpretaremos.