tikz-cd 包,简单示例,但编译时出现错误

tikz-cd 包,简单示例,但编译时出现错误

我想用 tikz 包绘制一个非常简单的 $\LaTeX$ 图表,但是它给出了一个错误,如下所示:

来源:

\documentclass{article}

\usepackage{amssymb}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz-cd}


\begin{document}

\begin{tikzcd}
A\arrow[d,tail,two heads,dashed] & B
\end{tikzcd}

\end{document}

============================================================

错误:

Command Line:   bibtex.exe "ideje4"
Startup Folder: C:\Users\hynek0\Desktop\TH0dipl

This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)
The top-level auxiliary file: ideje4.aux
I found no \citation commands---while reading file ideje4.aux
I found no \bibdata command---while reading file ideje4.aux
I found no \bibstyle command---while reading file ideje4.aux
(There were 3 error messages)

命令行:

pdflatex.exe --interaction=errorstopmode --synctex=-1 "C:\Users\hynek0\Desktop\TH0dipl\ideje4.tex"
Startup Folder: C:\Users\hynek0\Desktop\TH0dipl

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit)
entering extended mode
(C:/Users/hynek0/Desktop/TH0dipl/ideje4.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
(D:\ProgramFiles\MikTexExe\tex\latex\base\article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(D:\ProgramFiles\MikTexExe\tex\latex\base\size10.clo))
(D:\ProgramFiles\MikTexExe\tex\latex\amsfonts\amssymb.sty
(D:\ProgramFiles\MikTexExe\tex\latex\amsfonts\amsfonts.sty))
(D:\ProgramFiles\MikTexExe\tex\latex\babel\babel.sty
*************************************
* Local config file bblopts.cfg used
*
(D:\ProgramFiles\MikTexExe\tex\latex\00miktex\bblopts.cfg)
(D:\ProgramFiles\MikTexExe\tex\latex\babel-czech\czech.ldf
(D:\ProgramFiles\MikTexExe\tex\latex\babel\babel.def)))
(D:\ProgramFiles\MikTexExe\tex\latex\base\inputenc.sty
(D:\ProgramFiles\MikTexExe\tex\latex\base\utf8.def
(D:\ProgramFiles\MikTexExe\tex\latex\base\t1enc.dfu)
(D:\ProgramFiles\MikTexExe\tex\latex\base\ot1enc.dfu)
(D:\ProgramFiles\MikTexExe\tex\latex\base\omsenc.dfu)))
(D:\ProgramFiles\MikTexExe\tex\latex\tikz-cd\tikz-cd.sty
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\frontendlayer\tikz.sty
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\basiclayer\pgf.sty
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\utilities\pgfrcs.sty
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfutil-common.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfutil-common-lists.tex))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfutil-latex.def
(D:\ProgramFiles\MikTexExe\tex\latex\ms\everyshi.sty))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfrcs.code.tex))
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\basiclayer\pgfcore.sty
(D:\ProgramFiles\MikTexExe\tex\latex\graphics\graphicx.sty
(D:\ProgramFiles\MikTexExe\tex\latex\graphics\keyval.sty)
(D:\ProgramFiles\MikTexExe\tex\latex\graphics\graphics.sty
(D:\ProgramFiles\MikTexExe\tex\latex\graphics\trig.sty)
(D:\ProgramFiles\MikTexExe\tex\latex\00miktex\graphics.cfg)
(D:\ProgramFiles\MikTexExe\tex\latex\pdftex-def\pdftex.def
(D:\ProgramFiles\MikTexExe\tex\generic\oberdiek\infwarerr.sty)
(D:\ProgramFiles\MikTexExe\tex\generic\oberdiek\ltxcmds.sty))))
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\systemlayer\pgfsys.sty
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgfsys.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfkeys.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfkeysfiltered.code.tex))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgf.cfg)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgfsys-pdftex.def
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgfsys-common-pdf.def)))
 (D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgfsyssoftpath.code.tex
)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\systemlayer\pgfsysprotocol.code.tex)
) (D:\ProgramFiles\MikTexExe\tex\latex\xcolor\xcolor.sty
(D:\ProgramFiles\MikTexExe\tex\latex\00miktex\color.cfg))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcore.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmath.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathcalc.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathutil.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathparser.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.basic.code.tex
)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.trigonometric.
code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.random.code.te
x)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.comparison.cod
e.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.base.code.tex)

(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.round.code.tex
)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.misc.code.tex)

(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfunctions.integerarithme
tics.code.tex)))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmathfloat.code.tex))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorepoints.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorepathconstruct.code
.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorepathusage.code.tex
) (D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorescopes.code.tex)

(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoregraphicstate.code.
tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoretransformations.co
de.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorequick.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoreobjects.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorepathprocessing.cod
e.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorearrows.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoreshade.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoreimage.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoreexternal.code.tex)
) (D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorelayers.code.tex)

(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcoretransparency.code.
tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\basiclayer\pgfcorepatterns.code.tex)
)) (D:\ProgramFiles\MikTexExe\tex\generic\pgf\modules\pgfmoduleshapes.code.tex)
 (D:\ProgramFiles\MikTexExe\tex\generic\pgf\modules\pgfmoduleplot.code.tex)
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\compatibility\pgfcomp-version-0-65.sty
)
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\compatibility\pgfcomp-version-1-18.sty
)) (D:\ProgramFiles\MikTexExe\tex\latex\pgf\utilities\pgffor.sty
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\utilities\pgfkeys.sty
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgfkeys.code.tex))
(D:\ProgramFiles\MikTexExe\tex\latex\pgf\math\pgfmath.sty
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmath.code.tex))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\utilities\pgffor.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\math\pgfmath.code.tex)))
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\frontendlayer\tikz\tikz.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\libraries\pgflibraryplothandlers.cod
e.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\modules\pgfmodulematrix.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\frontendlayer\tikz\libraries\tikzlib
rarytopaths.code.tex)))
(D:\ProgramFiles\MikTexExe\tex\generic\tikz-cd\tikzlibrarycd.code.tex
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\frontendlayer\tikz\libraries\tikzlib
rarymatrix.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\frontendlayer\tikz\libraries\tikzlib
raryquotes.code.tex)
(D:\ProgramFiles\MikTexExe\tex\generic\pgf\libraries\pgflibraryarrows.meta.code
.tex))) (ideje4.aux) ABD: EveryShipout initializing macros
(D:\ProgramFiles\MikTexExe\tex\context\base\supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (D:\ProgramFiles\MikTexExe\tex\latex\amsfonts\umsa.fd)
(D:\ProgramFiles\MikTexExe\tex\latex\amsfonts\umsb.fd)

! Package pgf Error: No shape named tikz@f@1-2-1 is known.

See the pgf package documentation for explanation.
Type  H <return>  for immediate help
...
l.12 I think the culprit is a tikzcd arrow in cell 1-1.
\errmessage ...currentrow -\tikzcd@currentcolumn }

l.13 \end{tikzcd}

? 


Process has been killed ...

答案1

你命令箭头向下,但什么也没有

\documentclass{article}

\usepackage{amssymb}  \usepackage[utf8]{inputenc} \usepackage{tikz-cd}

\begin{document}

\begin{tikzcd} A\arrow[d,tail,two heads,dashed] & B
              \\ c& \end{tikzcd}

\end{document}

在此处输入图片描述

答案2

如果您确实需要目标单元格中​​没有任何内容的向下箭头,则可以使用nodes in empty cells选项:

\documentclass{article}

\usepackage{amssymb}
\usepackage[czech]{babel}
%\usepackage[utf8]{inputenc} no more needed
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[every matrix/.append style={nodes in empty cells}]
A\arrow[d,tail,two heads,dashed] & B\\
&
\end{tikzcd}

\end{document}

在此处输入图片描述

相关内容