软件包 xcolor 的选项冲突 - 未确定的问题

软件包 xcolor 的选项冲突 - 未确定的问题

我对 LaTeX 软件包有问题。我的问题似乎出在 上xcolor,与此非常接近问题,但他们的解决方案对我来说不起作用。

不幸的是,即使我把\usepackage[table,xcdraw]{xcolor}之前的\usepackage{xcolor}问题仍然存在......

有没有简单/神奇的解决方案?

以下是我使用的软件包:

\documentclass[
11pt, % The default document font size, options: 10pt, 11pt, 12pt
%oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
french, % ngerman for German
singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
%nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
%liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents
%toctotoc, % Uncomment to add the main table of contents to the table of contents
%parskip, % Uncomment to add space between paragraphs
%nohyperref, % Uncomment to not load the hyperref package
headsepline, % Uncomment to get a line under the header
%chapterinoneline, % Uncomment to place the chapter title next to the number on one line
%consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout
table,
]{MastersDoctoralThesis} % The class file specifying the document structure

\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters

\usepackage{amsmath} % Use the Palatino font by default

\usepackage[table,xcdraw]{xcolor} % pas OK

\usepackage{xcolor} %OK

\usepackage{hyperref}

\usepackage[bottom]{footmisc}

\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)

\addbibresource{example.bib} % The filename of the bibliography

\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography

\usepackage{capt-of}

\usepackage{subfigure}

\usepackage{caption}

\usepackage{float}

\usepackage{graphicx}

\usepackage{amssymb}

\usepackage{amsfonts}

\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\mdfdefinestyle{MyFrame}{%
    linecolor=black,
    outerlinewidth=2pt,
    roundcorner=20pt,
    innertopmargin=\baselineskip,
    innerbottommargin=\baselineskip,
    innerrightmargin=20pt,
    innerleftmargin=20pt,
    backgroundcolor=gray!20!white}

这是我在其中一章中使用的表格(来自这个网站):

% Please add the following required packages to your document preamble:
% \usepackage[table,xcdraw]{xcolor}
% If you use beamer only pass "xcolor=table" option, i.e. \documentclass[xcolor=table]{beamer}
\begin{table}[]
\begin{tabular}{|c|
>{\columncolor[HTML]{FFFFFF}}c |
>{\columncolor[HTML]{EFEFEF}}c |
>{\columncolor[HTML]{FFFFFF}}c |
>{\columncolor[HTML]{EFEFEF}}c |
>{\columncolor[HTML]{FFFFFF}}c |
>{\columncolor[HTML]{EFEFEF}}c |
>{\columncolor[HTML]{FFFFFF}}c |}
\hline
Row 1: & \#1   & \#2  & \#3   & \#4   & \#5      & \#6     & \#7     \\ \hline
Row 2: & 12 \% & 1 \% & 15 \% & 25 \% & 18.75 \% & 12.5 \% & 6.25 \% \\ \hline
\end{tabular}
\end{table}

答案1

\PassOptionsToPackage{table,xcdraw}{xcolor}
\documentclass{...}

 everything _without_ xcolor

\begin{document}
...
\end{document}

软件包tikz(通过软件包框架)已xcolor在内部加载

相关内容