pgfornament 和 vectorian 包的问题

pgfornament 和 vectorian 包的问题

当我编译文件时

    \documentclass[12pt,francais]{article}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{amsmath,amssymb,amsthm,epsfig,stmaryrd,bbm,mathrsfs,stmaryrd}
\usepackage{fancyhdr}
\usepackage{titlesec,graphicx,comment}
\usepackage{nopageno}
\usepackage[top=1.5cm,left=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancybox}
\usepackage{shadow}
\usepackage{enumerate}
%%%%%%%%%%% FONTE %%%%%%%%%%%%%%%%%
\usepackage[fulloldstyle]{kpfonts}
\usepackage{mathrsfs}
%%%%%%%%%%%%%%%%%% FIORITURES %%%%%%%%%%%%%%
\usepackage[object=vectorian]{pgfornament}
\usetikzlibrary{shapes.geometric,calc}
\usepackage{psvectorian,auto-pst-pdf}
\usepackage{tikz}
\usetikzlibrary {positioning}
 \renewcommand*{\psvectorianDefaultColor}{NavyBlue}%
\tikzset{pgfornamentstyle/.style={draw=NavyBlue, fill = blue}}
\begin{document}

\vspace {-3cm}


\fontfamily{pzc} \selectfont

\begin{tikzpicture}[every node/.style={inner sep=0pt}]
\node[text width= \linewidth-2cm](Text){%
~
\bigskip\\
{\LARGE Intégration et probabilités}  \hfill {\large  ENS Paris, 2012-2013} \\
~ \bigskip \\
 \centerline{\LARGE \normalfont TD 12 -- Convergence de variables aléatoires }
} ;
\node[shift={(-1cm,0.2cm)},anchor=north west](CNW)  at (Text.north west)
                 {\pgfornament[width=1cm]{61}};
\node[shift={(1cm,0.2cm)},anchor=north east](CNE)   at (Text.north east)
                 {\pgfornament[width=1cm,symmetry=v]{61}};
\node[shift={(-1cm,-0.5cm)},anchor=south west](CSW) at (Text.south west)
                 {\pgfornament[width=1cm,symmetry=h]{61}};
\node[shift={(1cm,-0.5cm)},anchor=south east](CSE)  at (Text.south east)
                 {\pgfornament[width=1cm,symmetry=c]{61}};
   \node[shift={(0cm,0cm)}](CS) at (Text.south)
                 {\pgfornament[width=4.5cm,ydelta=+3cm]{75}};
\pgfornamenthline{CNW}{CNE}{north}{89}
\pgfornamentvline{CNW}{CSW}{west}{87}
\pgfornamentvline{CNE}{CSE}{east}{87}
\end{tikzpicture}

\end{document}

我已经用 pdf 编译了这个文件,渲染效果更好。我怀疑当我在 Winedt 之后安装 Texmaker 时出现了这个问题。

坏的

我有重复的 texmaker 和 winedt 界面。

我已经下载了:

  1. 包裹图案由此地点,
  2. 向量由此地点。 并将它们解压到以下路径 C:\Program Files\MiKTeX 2.9\tex\latex 中的 texmf 文件夹。

答案1

我首先将代码转换成更简单的例子来缩小问题范围。

然后我确定主要问题是与使用等相冲突的francais选项。根据 Gonzalo Medina 对我的评论的建议babel\pgfornamenthline他的回答在这里,添加babeltikz 库可以解决问题:

\documentclass[12pt,francais]{standalone}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[object=vectorian]{pgfornament}
\usepackage{tikz}
\usetikzlibrary{calc,babel}
\tikzset{pgfornamentstyle/.style={draw=NavyBlue, fill = blue}}

\begin{document}

\fontfamily{pzc} \selectfont

\begin{tikzpicture}
  [every node/.style={inner sep=0pt}]

  \node[text width= \linewidth-1cm, anchor=center](Text){% ~ \centerline{\LARGE \normalfont Université Paris Sud  }
  \bigskip

  {\LARGE Département de Mathématiques}  \hfill {\large Première année Master} \\ {\LARGE Module:  Probabilité approfondie}
  \hfill {\large 2013-2014 } ~ \bigskip \\  \centerline{\LARGE \normalfont TD: Chaînes de Markov  } } ;
  \node[shift={(-1cm,0.2cm)},anchor=north west](CNW)  at (Text.north west) {\pgfornament[width=1cm]{61}};
  \node[shift={(1cm,0.2cm)},anchor=north east](CNE)   at (Text.north east) {\pgfornament[width=1cm,symmetry=v]{61}};
  \node[shift={(-1cm,-0.5cm)},anchor=south west](CSW) at  (Text.south west) {\pgfornament[width=1cm,symmetry=h]{61}};
  \node[shift={(1cm,-0.5cm)},anchor=south east](CSE)  at (Text.south east) {\pgfornament[width=1cm,symmetry=c]{61}};    \node[shift={(0cm,0cm)}](CS) at (Text.south) {\pgfornament[width=4.5cm,ydelta=+3cm]{75}};
  \pgfornamenthline{CNW}{CNE}{north}{89}
  \pgfornamentvline{CNW}{CSW}{west}{87}
  \pgfornamentvline{CNE}{CSE}{east}{87}

\end{tikzpicture}

\end{document}

带有法语装饰的精美标题

正如 Gonzalo Medina 所解释的那样,此解决方案仅适用于 tikz 3。如果您使用的是旧版本,则需要在必要时关闭相关的速记字符。例如:

\documentclass[12pt,francais]{standalone}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[object=vectorian]{pgfornament}
\usepackage{tikz}
\usetikzlibrary{calc}%,babel}
\tikzset{pgfornamentstyle/.style={draw=NavyBlue, fill = blue}}

\begin{document}

\fontfamily{pzc} \selectfont
\shorthandoff{!}
\begin{tikzpicture}
  [every node/.style={inner sep=0pt}]

  \node[text width= \linewidth-1cm, anchor=center](Text){% ~ \centerline{\LARGE \normalfont Université Paris Sud  }
  \bigskip

  {\LARGE Département de Mathématiques}  \hfill {\large Première année Master} \\ {\LARGE Module:  Probabilité approfondie}
  \hfill {\large 2013-2014 } ~ \bigskip \\  \centerline{\LARGE \normalfont TD: Chaînes de Markov  } } ;
  \node[shift={(-1cm,0.2cm)},anchor=north west](CNW)  at (Text.north west) {\pgfornament[width=1cm]{61}};
  \node[shift={(1cm,0.2cm)},anchor=north east](CNE)   at (Text.north east) {\pgfornament[width=1cm,symmetry=v]{61}};
  \node[shift={(-1cm,-0.5cm)},anchor=south west](CSW) at  (Text.south west) {\pgfornament[width=1cm,symmetry=h]{61}};
  \node[shift={(1cm,-0.5cm)},anchor=south east](CSE)  at (Text.south east) {\pgfornament[width=1cm,symmetry=c]{61}};    \node[shift={(0cm,0cm)}](CS) at (Text.south) {\pgfornament[width=4.5cm,ydelta=+3cm]{75}};
  \pgfornamenthline{CNW}{CNE}{north}{89}
  \pgfornamentvline{CNW}{CSW}{west}{87}
  \pgfornamentvline{CNE}{CSE}{east}{87}

\end{tikzpicture}
\shorthandon{!}

\end{document}

或者,在所有 tikz 环境中全局禁用简写:

\documentclass[12pt,francais]{standalone}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[object=vectorian]{pgfornament}
\usepackage{tikz}
\usetikzlibrary{calc}%,babel}
\tikzset{pgfornamentstyle/.style={draw=NavyBlue, fill = blue},
    every picture/.prefix style={execute at begin picture=\shorthandoff{!}}}
\begin{document}

\fontfamily{pzc} \selectfont
\begin{tikzpicture}
  [every node/.style={inner sep=0pt}]

  \node[text width= \linewidth-1cm, anchor=center](Text){% ~ \centerline{\LARGE \normalfont Université Paris Sud  }
  \bigskip

  {\LARGE Département de Mathématiques}  \hfill {\large Première année Master} \\ {\LARGE Module:  Probabilité approfondie}
  \hfill {\large 2013-2014 } ~ \bigskip \\  \centerline{\LARGE \normalfont TD: Chaînes de Markov  } } ;
  \node[shift={(-1cm,0.2cm)},anchor=north west](CNW)  at (Text.north west) {\pgfornament[width=1cm]{61}};
  \node[shift={(1cm,0.2cm)},anchor=north east](CNE)   at (Text.north east) {\pgfornament[width=1cm,symmetry=v]{61}};
  \node[shift={(-1cm,-0.5cm)},anchor=south west](CSW) at  (Text.south west) {\pgfornament[width=1cm,symmetry=h]{61}};
  \node[shift={(1cm,-0.5cm)},anchor=south east](CSE)  at (Text.south east) {\pgfornament[width=1cm,symmetry=c]{61}};    \node[shift={(0cm,0cm)}](CS) at (Text.south) {\pgfornament[width=4.5cm,ydelta=+3cm]{75}};
  \pgfornamenthline{CNW}{CNE}{north}{89}
  \pgfornamentvline{CNW}{CSW}{west}{87}
  \pgfornamentvline{CNE}{CSE}{east}{87}

\end{tikzpicture}

\end{document}

相关内容