在数学模式下解析带有希腊字母的 tikzpicture 时出错

在数学模式下解析带有希腊字母的 tikzpicture 时出错

尝试使用另一个操作系统上的另一个解析器重新解析 LaTeX 文档后:

\documentclass[ a4paper,
            11pt,
            BCOR=12mm,
            DIV=18,
            abstract=on,
            headinclude,
            twoside,
            appendixprefix=true]{scrreprt} %twoside

\usepackage{ucs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{slashed}
\usepackage{amssymb}
\usepackage{feynmp}
\usepackage{caption}
\usepackage[skip=0pt]{subcaption}       %
\usepackage{placeins}               %FloatBarrier
\usepackage[toc,page]{appendix}     %Enables appendix; added to table of contents
\usepackage[headsepline]{scrpage2}
\usepackage[bottom]{footmisc}       %Bilder nicht unter Fussnote, falls mit b gesetzt
\usepackage{footnote}               %Footnotes in tables
%\usepackage[pdftex]{hyperref}      %URLs       LOAD LAST
\usepackage{dsfont}
\DeclareGraphicsRule{*}{mps}{*}{}
\usepackage{ifpdf}
\usepackage{bbm}
\usepackage{float}
\usepackage{array}
\usepackage{multirow}
\usepackage{calc}
\usepackage[nomessages]{fp}
\usepackage{tikz}
%\usetikzlibrary{quotes,angles}


%\unitlength=0.7mm
\numberwithin{equation}{chapter}
\numberwithin{table}{chapter}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}


\usepackage{pgfplots}
\makeatletter
% http://tex.stackexchange.com/questions/52786/din-conform-arrowheads-and-hatching-in-tikz
\pgfarrowsdeclare{DIN}{DIN}
{
  \pgfutil@tempdima=0.5pt%
  \advance\pgfutil@tempdima by.15\pgflinewidth%
  \pgfutil@tempdimb=7.29\pgfutil@tempdima\advance\pgfutil@tempdimb by.6\pgflinewidth%
  \pgfarrowsleftextend{+-\pgfutil@tempdimb}
  \pgfutil@tempdimb=.6\pgfutil@tempdima\advance\pgfutil@tempdimb by1.7\pgflinewidth%
  \pgfarrowsrightextend{+\pgfutil@tempdimb}
}
{
  \pgfutil@tempdima=0.5pt%
  \advance\pgfutil@tempdima by.15\pgflinewidth%
  \pgfsetdash{}{+0pt}
  \pgfsetmiterjoin
  \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpoint{-4mm}{0.5mm}}}
  \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
  \pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpoint{-4mm}{-0.5mm}}}
  \pgfpathclose
  \pgfusepathqfillstroke
}
\pgfarrowsdeclarereversed{DIN reversed}{DIN reversed}{DIN}{DIN}
\makeatother
\begin{document}
\chapter{Results and Conclusion}


\begin{figure}[h!]
\centering
\begin{tikzpicture}
\begin{axis}[
    symbolic x coords={$\alpha$, $a$},
        width = 1.0\textwidth,
        height  = 260pt,
        ylabel = {Impact},
        xlabel = {Paramter},
        ytick=\empty,ymin=0,
        axis x line=bottom,
        axis y line=left,
        enlarge x limits=0.3,
        bar width=100pt,
        axis line style={-DIN,ultra thin},
        xtick=data,
        nodes near coords={\pgfmathprintnumber\pgfplotspointmeta},
        ylabel near ticks,
        xticklabel style={anchor=base,yshift=-3mm},
        xtick style={draw=none},
        every axis x label/.style={at={(current axis.south east)},anchor=north west}
    ]
    \addplot[ybar,fill=white] coordinates {
        ($\alpha$, 1)
        ($a$, 2)
    };
\end{axis}
\end{tikzpicture}
\end{figure}


\end{document}

我收到此错误信息:

!缺少 \endcsname 插入。< 重新阅读 >

\alpha l.97] 标记的控制序列不应出现在 \csname 和 \endcsname 之间。

请注意,这取决于希腊字母,\alpha如果将其替换为罗马字母,则效果很好。为什么不能在这里将控制序列写为标签?

有谁知道如何解决这个问题?

编辑:

安装的 PGF 版本为:

pgf 2008/01/15 v2.10 (rcs-修订版 1.12)

pgfcore 2010/04/11 v2.10 (rcs-修订版 1.7)

pgfcorepoints.code.tex 2010/04/09 (rcs-修订版 1.20)

pgfcoregraphicstate.code.tex 2008/04/22(rcs-修订版 1.9)

pgfcoretransformations.code.tex 2009/06/10 (rcs-修订版 1.11)

pgfcorequick.code.tex 2008/10/09 (rcs-修订版 1.3)

pgfrcs 2010/10/25 v2.10 (rcs-修订版 1.24)

pgfsys 2010/06/30 v2.10 (rcs-修订版 1.37)

pgfsyssoftpath.code.tex 2008/07/18 (rcs-修订版 1.7)

...

相关内容