TransWikia.com

Error by using tcolorbox for own style boxed text creation

TeX - LaTeX Asked on February 20, 2021

My code follows:

documentclass{book}
usepackage{tcolorbox}%
begin{document}

begin{tcolorbox}[enhanced, title=Mytitle, attach boxed title to top
center={yshift=-3mm,yshifttext=-1mm},boxed title
style={size=small,colback=blue}]
This is my own box with a mandatory title
and options.
end{tcolorbox}

end{document}

While running LaTeX, some error are coming, I’ve pasted the log file below:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9.6210) (preloaded format=latex 2017.11.30)  18 DEC 2017 15:45
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017/01/01> patch level 1
Babel <3.9r> and hyphenation patterns for 76 language(s) loaded.
("C:Program FilesMiKTeX 2.9texlatexbasebook.cls"
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
("C:Program FilesMiKTeX 2.9texlatexbasebk10.clo"
File: bk10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
c@part=count79
c@chapter=count80
c@section=count81
c@subsection=count82
c@subsubsection=count83
c@paragraph=count84
c@subparagraph=count85
c@figure=count86
c@table=count87
abovecaptionskip=skip41
belowcaptionskip=skip42
bibindent=dimen102
)
("C:Program FilesMiKTeX 2.9texlatextcolorboxtcolorbox.sty"
Package: tcolorbox 2016/11/18 version 3.96 text color boxes

("C:Program FilesMiKTeX 2.9texlatexpgfbasiclayerpgf.sty"
("C:Program FilesMiKTeX 2.9texlatexpgfutilitiespgfrcs.sty"
("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfutil-common.tex"
pgfutil@everybye=toks14
pgfutil@tempdima=dimen103
pgfutil@tempdimb=dimen104

("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfutil-common-lists.te
x")) ("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfutil-latex.def"
pgfutil@abb=box26
("C:Program FilesMiKTeX 2.9texlatexmseveryshi.sty"
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
))
("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfrcs.code.tex"
Package: pgfrcs 2015/08/07 v3.0.1a (rcs-revision 1.31)
))
Package: pgf 2015/08/07 v3.0.1a (rcs-revision 1.15)

("C:Program FilesMiKTeX 2.9texlatexpgfbasiclayerpgfcore.sty"
("C:Program FilesMiKTeX 2.9texlatexgraphicsgraphicx.sty"
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)

("C:Program FilesMiKTeX 2.9texlatexgraphicskeyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
KV@toks@=toks15
)
("C:Program FilesMiKTeX 2.9texlatexgraphicsgraphics.sty"
Package: graphics 2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)

("C:Program FilesMiKTeX 2.9texlatexgraphicstrig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("C:Program FilesMiKTeX 2.9texlatexgraphics-cfggraphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: dvips.def on input line 99.

("C:Program FilesMiKTeX 2.9texlatexgraphics-defdvips.def"
File: dvips.def 2016/07/10 v3.1a Driver-dependent file (DPC,SPQR)
))
Gin@req@height=dimen105
Gin@req@width=dimen106
)
("C:Program FilesMiKTeX 2.9texlatexpgfsystemlayerpgfsys.sty"
("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgfsys.code.tex"
Package: pgfsys 2014/07/09 v3.0.1a (rcs-revision 1.48)

("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfkeys.code.tex"
pgfkeys@pathtoks=toks16
pgfkeys@temptoks=toks17

("C:Program FilesMiKTeX 2.9texgenericpgfutilitiespgfkeysfiltered.code.te
x"
pgfkeys@tmptoks=toks18
))
pgf@x=dimen107
pgf@y=dimen108
pgf@xa=dimen109
pgf@ya=dimen110
pgf@xb=dimen111
pgf@yb=dimen112
pgf@xc=dimen113
pgf@yc=dimen114
w@pgf@writea=write3
r@pgf@reada=read1
c@pgf@counta=count88
c@pgf@countb=count89
c@pgf@countc=count90
c@pgf@countd=count91
t@pgf@toka=toks19
t@pgf@tokb=toks20
t@pgf@tokc=toks21
 ("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgf.cfg"
File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
)
Driver file for pgf: pgfsys-dvips.def

("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgfsys-dvips.def"
File: pgfsys-dvips.def 2014/07/09  (rcs-revision 1.25)

("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgfsys-common-postscr
ipt.def"
File: pgfsys-common-postscript.def 2008/10/01  (rcs-revision 1.22)
pgf@objectcount=count92
)))
("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgfsyssoftpath.code.t
ex"
File: pgfsyssoftpath.code.tex 2013/09/09  (rcs-revision 1.9)
pgfsyssoftpath@smallbuffer@items=count93
pgfsyssoftpath@bigbuffer@items=count94
)
("C:Program FilesMiKTeX 2.9texgenericpgfsystemlayerpgfsysprotocol.code.t
ex"
File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
)) (X:localtexmftexlatexstandardxcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

("C:Program FilesMiKTeX 2.9texlatexgraphics-cfgcolor.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: dvips.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1349.
Package xcolor Info: Model `RGB' extended on input line 1365.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1367.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1370.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1371.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372.
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcore.code.tex"
Package: pgfcore 2010/04/11 v3.0.1a (rcs-revision 1.7)

("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmath.code.tex"
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathcalc.code.tex"
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathutil.code.tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathparser.code.tex"
pgfmath@dimen=dimen115
pgfmath@count=count95
pgfmath@box=box27
pgfmath@toks=toks22
pgfmath@stack@operand=toks23
pgfmath@stack@operation=toks24
)
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.code.tex"
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.basic.code.
tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.trigonometr
ic.code.tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.random.code
.tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.comparison.
code.tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.base.code.t
ex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.round.code.
tex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.misc.code.t
ex")
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfunctions.integerarit
hmetics.code.tex")))
("C:Program FilesMiKTeX 2.9texgenericpgfmathpgfmathfloat.code.tex"
c@pgfmathroundto@lastzeros=count96
))
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorepoints.code.tex
"
File: pgfcorepoints.code.tex 2013/10/07  (rcs-revision 1.27)
pgf@picminx=dimen116
pgf@picmaxx=dimen117
pgf@picminy=dimen118
pgf@picmaxy=dimen119
pgf@pathminx=dimen120
pgf@pathmaxx=dimen121
pgf@pathminy=dimen122
pgf@pathmaxy=dimen123
pgf@xx=dimen124
pgf@xy=dimen125
pgf@yx=dimen126
pgf@yy=dimen127
pgf@zx=dimen128
pgf@zy=dimen129
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorepathconstruct.c
ode.tex"
File: pgfcorepathconstruct.code.tex 2013/10/07  (rcs-revision 1.29)
pgf@path@lastx=dimen130
pgf@path@lasty=dimen131
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorepathusage.code.
tex"
File: pgfcorepathusage.code.tex 2014/11/02  (rcs-revision 1.24)
pgf@shorten@end@additional=dimen132
pgf@shorten@start@additional=dimen133
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorescopes.code.tex
"
File: pgfcorescopes.code.tex 2015/05/08  (rcs-revision 1.46)
pgfpic=box28
pgf@hbox=box29
pgf@layerbox@main=box30
pgf@picture@serial@count=count97
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoregraphicstate.co
de.tex"
File: pgfcoregraphicstate.code.tex 2014/11/02  (rcs-revision 1.12)
pgflinewidth=dimen134
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoretransformations
.code.tex"
File: pgfcoretransformations.code.tex 2015/08/07  (rcs-revision 1.20)
pgf@pt@x=dimen135
pgf@pt@y=dimen136
pgf@pt@temp=dimen137
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorequick.code.tex"
File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoreobjects.code.te
x"
File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorepathprocessing.
code.tex"
File: pgfcorepathprocessing.code.tex 2013/09/09  (rcs-revision 1.9)
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorearrows.code.tex
"
File: pgfcorearrows.code.tex 2015/05/14  (rcs-revision 1.43)
pgfarrowsep=dimen138
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoreshade.code.tex"
File: pgfcoreshade.code.tex 2013/07/15  (rcs-revision 1.15)
pgf@max=dimen139
pgf@sys@shading@range@num=count98
) ("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoreimage.code.te
x"
File: pgfcoreimage.code.tex 2013/07/15  (rcs-revision 1.18)

("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoreexternal.code.t
ex"
File: pgfcoreexternal.code.tex 2014/07/09  (rcs-revision 1.21)
pgfexternal@startupbox=box31
))
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorelayers.code.tex
"
File: pgfcorelayers.code.tex 2013/07/18  (rcs-revision 1.7)
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcoretransparency.co
de.tex"
File: pgfcoretransparency.code.tex 2013/09/30  (rcs-revision 1.5)
)
("C:Program FilesMiKTeX 2.9texgenericpgfbasiclayerpgfcorepatterns.code.t
ex"
File: pgfcorepatterns.code.tex 2013/11/07  (rcs-revision 1.5)
)))
("C:Program FilesMiKTeX 2.9texgenericpgfmodulespgfmoduleshapes.code.tex"
File: pgfmoduleshapes.code.tex 2014/03/21  (rcs-revision 1.35)
pgfnodeparttextbox=box32
) ("C:Program FilesMiKTeX 2.9texgenericpgfmodulespgfmoduleplot.code.tex"
File: pgfmoduleplot.code.tex 2015/08/03  (rcs-revision 1.13)
)
("C:Program FilesMiKTeX 2.9texlatexpgfcompatibilitypgfcomp-version-0-65.
sty"
Package: pgfcomp-version-0-65 2007/07/03 v3.0.1a (rcs-revision 1.7)
pgf@nodesepstart=dimen140
pgf@nodesepend=dimen141
)
("C:Program FilesMiKTeX 2.9texlatexpgfcompatibilitypgfcomp-version-1-18.
sty"
Package: pgfcomp-version-1-18 2007/07/23 v3.0.1a (rcs-revision 1.1)
)) ("C:Program FilesMiKTeX 2.9texlatextoolsverbatim.sty"
Package: verbatim 2014/10/28 v1.5q LaTeX2e package for verbatim enhancements
every@verbatim=toks25
verbatim@line=toks26
verbatim@in@stream=read2
)
("C:Program FilesMiKTeX 2.9texlatexenvironenviron.sty"
Package: environ 2014/05/04 v0.3 A new way to define environments

("C:Program FilesMiKTeX 2.9texlatextrimspacestrimspaces.sty"
Package: trimspaces 2009/09/17 v1.1 Trim spaces around a token list
)
@envbody=toks27
)
("C:Program FilesMiKTeX 2.9texlatexetoolboxetoolbox.sty"
Package: etoolbox 2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
etb@tempcnta=count99
)
tcb@titlebox=box33
tcb@upperbox=box34
tcb@lowerbox=box35
tcb@phantombox=box36
c@tcbbreakpart=count100
c@tcblayer=count101
tcolorbox@number=count102
tcb@temp=box37
tcb@temp=box38
tcb@temp=box39
tcb@temp=box40
tcb@out=write4
tcb@record@out=write5
)
No file test.aux.
openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
ABD: EveryShipout initializing macros

! Package pgfkeys Error: I do not know the key '/tcb/enhanced' and I am going t
o ignore it. Perhaps you misspelled it.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7 style={size=small,colback=blue}]

? 

! Package pgfkeys Error: I do not know the key '/tcb/attach boxed title to top 
center', to which you passed 'yshift=-3mm,yshifttext=-1mm', and I am going to i
gnore it. Perhaps you misspelled it.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7 style={size=small,colback=blue}]

? 

! Package pgfkeys Error: I do not know the key '/tcb/boxed title style', to whi
ch you passed 'size=small,colback=blue', and I am going to ignore it. Perhaps y
ou misspelled it.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7 style={size=small,colback=blue}]

? 
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 7.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 7.
[1

] (test.aux) ) 
Here is how much of TeX's memory you used:
 9917 strings out of 493330
 204034 string characters out of 3139091
 247655 words of memory out of 3000000
 13325 multiletter control sequences out of 15000+200000
 3993 words of font info for 15 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 54i,5n,73p,825b,444s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on test.dvi (1 page, 6716 bytes).

Please suggest me what went wrong and how to fix it?

One Answer

You need library skins for that to work. The tcolorbox manual is even structured into different parts according to the libraries. If you want to avoid trouble with finding the correct library you may also load it with the most option.

documentclass{book}
usepackage[skins]{tcolorbox}%
begin{document}

begin{tcolorbox}[enhanced, title=Mytitle, attach boxed title to top
center={yshift=-3mm,yshifttext=-1mm},boxed title
style={size=small,colback=blue}]
This is my own box with a mandatory title
and options.
end{tcolorbox}

end{document}

Correct answer by TeXnician on February 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP