错误:文件未找到,日志显示!缺少 \endcsname 插入

错误:文件未找到,日志显示!缺少 \endcsname 插入

我使用在 overleaf.com 中编译的代码,但在 texmaker 中出现错误:“未找到文件”。

请帮忙。

预先感谢

最少的编码是:

\documentclass{article}

\usepackage[most]{tcolorbox}

\makeatletter
\tcbset{
        mybox/.style 2 args={%
        enhanced, 
        colback=white,
        colframe=blue!30!black,
        left=8mm,
        overlay={
            \node[rotate=90, anchor=north west, inner sep=2mm, text=white] (title@aux) at (frame.south west) {#2};
            \path[fill=tcbcol@frame] ([email protected] west)--([email protected] east) 
                to[out=90, in=270] ([yshift=5mm][email protected])--
                ([email protected]|-frame.north)
                [rounded corners=\kvtcb@arc] -| 
                (frame.west) |- ([email protected])[sharp corners] -- cycle;   
            \node[rotate=90, inner sep=2mm, text=white] at (title@aux) {#2};
        },
        #1
    },  
}

\makeatother

\begin{document}

\begin{tcbposter}[poster = {columns=1, rows=1, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]


\posterbox[height=5.4cm,width =4.3cm, mybox={colframe=red}{xxxx}]{xshift=1cm, yshift=-5cm}{xyz}

\end{tcbposter}

\end{document}

登录 Texmaker:

日志档案 :

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex 2019.9.13) 14 SEP 2019 16:42
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**xoay_test_04.tex
(./xoay_test_04.tex
LaTeX2e <2018-12-01>
(c:/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(c:/texlive/2019/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\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:/texlive/2019/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2019/02/02 v3.1.1 (3.1.1)
\pgfsyssoftpath@smallbuffer@items=\count93
\pgfsyssoftpath@bigbuffer@items=\count94
)
(c:/texlive/2019/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
File: pgfsysprotocol.code.tex 2019/02/02 v3.1.1 (3.1.1)
)) (c:/texlive/2019/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(c:/texlive/2019/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(c:/texlive/2019/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
Package: pgfcore 2019/02/02 v3.1.1 (3.1.1)
(c:/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(c:/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(c:/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(c:/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
\pgfmath@dimen=\dimen115
\pgfmath@count=\count95
\pgfmath@box=\box28
\pgfmath@toks=\toks22
\pgfmath@stack@operand=\toks23
\pgfmath@stack@operation=\toks24
)

ABD: EveryShipout initializing macros
(c:/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count294
\scratchdimen=\dimen199
\scratchbox=\box72
\nofMPsegments=\count295
\nofMParguments=\count296
\everyMPshowfont=\toks36
\MPscratchCnt=\count297
\MPscratchDim=\dimen256
\MPnumerator=\count298
\makeMPintoPDFobject=\count299
\everyMPtoPDFconversion=\toks37
) (c:/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
(c:/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
(c:/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(c:/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(c:/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(c:/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 456.
(c:/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\c@lstlisting=\count300
(c:/texlive/2019/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks38
\inpenc@posthook=\toks39
)
\tcb@box@array@box=\box73
! Package xcolor Error: Undefined color `tcbcol@frame'.
See the xcolor package documentation for explanation.
Type H <return> for immediate help.
...
l.31 ...=red}{xxxx}]{xshift=1cm, yshift=-5cm}{xyz}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Missing \endcsname inserted.
<to be read again>
\let
l.31 ...=red}{xxxx}]{xshift=1cm, yshift=-5cm}{xyz}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
)
! Incomplete \ifx; all text was ignored after line 31.
<inserted text>
\fi
<*> xoay_test_04.tex
The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.
! Emergency stop.
<*> xoay_test_04.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
27999 strings out of 492623
583755 string characters out of 6133290
629830 words of memory out of 5000000
31587 multiletter control sequences out of 15000+600000
532338 words of font info for 24 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
63i,9n,101p,815b,1330s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!

答案1

第一个错误是

 ! Package xcolor Error: Undefined color `tcbcol@frame'

因此,只需检查名称,就可以发现框架颜色的名称是 tcbcolframe 而不是 tcbcol@frame。因此更改 fill=tcbcol@framefill=tcbcolframe

相关内容