3

When I compile the file

    \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}

I already compile this file with pdf rendering is better. I suspect that when I install Texmaker after Winedt this problem has appeared.

bad

I have duplicate texmaker and winedt interface.

I have downloaded:

  1. the package pgfornament from this site,
  2. and psvectorian from this site. and extract them to the texmf folder in the following path C:\Program Files\MiKTeX 2.9\tex\latex.
  • 1
    Thank you for your question! Could you please delete > in your TeX code to make it compilable directly? Is it possible for you to crop your image (pdfcrop or GIMP)? It will improve readibility of your question. – Malipivo Apr 13 '14 at 16:45
  • It is great that you post code but as @Malipivo says, it is hard to read as it is. Also, there is a lot going on there. Do you need all of those packages to reproduce the problem? It is much easier to solve a problem if you can cut your example down to the minimum necessary to reproduce it. Also, you said you got a better result than the PDF you posted. Did you mean that you expected a better result? Otherwise, that seems like a good thing! – cfr Apr 13 '14 at 19:31
  • It appears that \pgfornamenthline, at least as used here, is incompatible with the francais option for babel. Furthermore, even if you load an alternative language and switch before the picture, it still doesn't work. – cfr Apr 13 '14 at 20:31
  • @Malipivo it's done – Zbigniew Apr 13 '14 at 20:57
4

I began by turning the code into a more minimal example to narrow down the problem.

I then determined that the primary problem was that the francais option to babel conflicts with the use of \pgfornamenthline etc. Based on Gonzalo Medina's advice responding to my comment on his answer here, adding the babel tikz library resolves the problem:

\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}

Fancy title with ornaments in French

As Gonzalo Medina explains, this solution is only available with tikz 3. If you have an older version, you need to turn the relevant shorthand characters off when necessary. For example:

\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}

Alternatively, disable the shorthand globally for all tikz environments:

\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}
  • @Zbigniew Please remember to consider accepting the answer if it solves the issue satisfactorily as this helps identify the solution for other users. (Disclaimer: it also, of course, earns me - and you - reputation!) – cfr Apr 14 '14 at 10:22
  • I have said thank you. It is clearly implied that the answer is a good issue. However I have no problem with french babel package and pgfornament two week ago. – Zbigniew Apr 14 '14 at 19:59
  • 1
    @Zbigniew Er... OK. It goes without saying that if my answer does not resolve the issue satisfactorily, that you ought not accept it but should instead wait for an answer you do consider acceptable. I think in that case you might want to edit your question to clarify what sort of answer you are looking for, though. Obviously I misunderstood what you were asking. Note that both Winedt and TeXMaker are merely front ends. They have no effect on the compilation of code whatsoever. If you have your doubts about that, just compile at the command line. – cfr Apr 14 '14 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.