Un collègue m'a transmis un poly qu'il a réalisé il y a quelques temps, en 2017. Dans ce poly il y des figures TikZ que je souhaiterais récupérer. Quand je compile le poly, certaines figures ne sont pas correctes.
J'imagine - je ne suis pas du tout familier avec TikZ - qu'il s'agit d'un problème de version. Les fichiers Si quelqu'un a une petite idée de l'origine du problème qu'il n'hésite pas à me faire signe ;-) Voici le fichier \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale = 0.75,x={(0.707cm,0.707cm)},y={(-0.966cm,0.259cm)},z={(0cm,1cm)}] \draw[fill=gray!90] (0,1,1) -- (1,1,1) -- (1,4,1) -- (0,4,1) -- cycle; \draw[fill=gray!90] (1,4,1) -- (0,4,1) -- (0,4,4) -- (1,4,4) -- cycle; \draw[fill=gray!50] (0,0,0) -- (1,0,0) -- (1,0,5) -- (0,0,5) -- cycle; \draw[fill=gray!90] (0,0,5) -- (0,5,5) -- (1,5,5) -- (1,0,5) -- cycle; \draw[fill=gray!50,even odd rule] (0,0,0) -- (0,5,0) -- (0,5,5) -- (0,0,5) --cycle (0,1,1) -- (0,4,1) -- (0,4,4) -- (0,1,4) --cycle ; %enroulement primaire \draw[thick,line width = 0.5mm] (0,5,3) -- (0,7,3) ; \draw[thick,line width = 0.5mm] (0,5,1.55) -- (0,7,1) ; \draw[thick,line width = 0.5mm] (0,5,3) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3) ; \draw[thick,line width = 0.5mm] (1,4,3) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (1,4,3) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.1) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.2) ; \draw[thick,line width = 0.5mm] (1,4,3-0.2) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.3) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.4) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.4) ; \draw[thick,line width = 0.5mm] (1,4,3-0.4) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.5) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.6) ; \draw[thick,line width = 0.5mm] (1,4,3-0.6) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.7) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.8) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-0.8) ; \draw[thick,line width = 0.5mm] (1,4,3-0.8) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-0.9) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1) ; \draw[thick,line width = 0.5mm] (1,4,3-1) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.1) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.2) ; \draw[thick,line width = 0.5mm] (1,4,3-1.2) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.3) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.4) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.4) ; \draw[thick,line width = 0.5mm] (1,4,3-1.4) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.5) arc [start angle=0, delta angle =180, radius=0.5mm, rotate=90] ; \draw[thick,line width = 0.5mm] (0,5,3-1.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240] -- (1,4,3-1.6) ; \draw[thick,line width = 0.5mm] (1,4,3-1.6) arc [start angle=0, delta angle =-180, radius=0.5mm, rotate=90] ; %enroulement secondaire \draw[thick,line width = 1mm] (0,1,3.4) --(0,-2.4,3.4); \draw[thick,line width = 1mm] (0,1,3.4) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,3) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,3.2) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,3) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,2.8) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=0, delta angle =90, radius=12.1mm, rotate=240];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,2.4) arc [start angle=0, delta angle =-180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=0, delta angle =180, radius=1mm, rotate=90] ; \draw[thick,line width = 1mm] (1,0,1.8)-- (1,-2,1.8) ; %v_1 et v_2 et i_1 et i_2 etc \draw[thick,line width = 0.2mm,>=latex,->] (0,7,1.2) -- (0,7,2.8) ; \node(a)at(0,7.5,2){$v_1(t)$}; \draw[thick,line width = 0.2mm,>=latex,->] (0,-2.7,2.9)-- (0.6,-2,2.8) ; \node(a)at(0,-3.3,3.2){$v_2(t)$}; \draw[thick,line width = 0.2mm,>=latex,->] (1,-0.5,2.8)-- (1,-1,2.8); \node(a)at(1,-3,4){ \textcolor{red}{$i_2(t)=0$ pour l'instant}}; \draw[thick,line width = 0.2mm,>=latex,<-] (0,6,3.2) -- (0,6.5,3.2) ; \node(a)at(0,6,3.6){$i_1(t)$}; \node(a)at(0,6,0.5){$N_1$ spires}; \node(a)at(0,-1.3,0.5){$N_2$ spires}; \node(a)at(0,2,4.7){$\Phi$ }; \node(a)at(0,0.2,3.7){{\large $\bullet$} }; \node(a)at(0,4.8,3.4){{\large $\bullet$} }; % ligne de champ \draw[thick,line width = 0.2mm,dashed] (0,4.5,1) -- (0,4.5,4); \draw[thick,line width = 0.2mm,dashed] (0,1,4.5) -- (0,4,4.5); \draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.55,4.5) -- (0,2.5,4.5); \draw[bend left=45,>=latex,dashed] (0,4.5,4) to (0,4,4.5); \draw[thick,line width = 0.2mm,dashed] (0,0.5,1) -- (0,0.5,4); \draw[bend left=45,>=latex,dashed] (0,1,4.5) to (0,0.5,4); \draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.5,0.5) -- (0,2.55,0.5); \draw[thick,line width = 0.2mm,dashed] (0,1,0.5) -- (0,4,0.5); \draw[bend left=45,>=latex,dashed] (0,0.5,1) to (0,1,0.5) ; \draw[bend left=45,>=latex,dashed] (0,4,0.5) to (0,4.5,1) ; \end{tikzpicture} \end{document} Posée 21 Sep '21, 19:11 fredgeraldo Pathe ♦♦
Affichage de 5 parmi 8
Afficher 3 commentaire(s) en plus
|
Avec la nouvelle (!?!) version de TikZ, la clé Heureusement, le code ici est assez facile à modifier puisque la clé J'ai aussi ajouté l'option \documentclass[margin=2mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale = 0.75,x={(0.707cm,0.707cm)},y={(-0.966cm,0.259cm)},z={(0cm,1cm)},line cap=round] \draw[fill=gray!90] (0,1,1) -- (1,1,1) -- (1,4,1) -- (0,4,1) -- cycle; \draw[fill=gray!90] (1,4,1) -- (0,4,1) -- (0,4,4) -- (1,4,4) -- cycle; \draw[fill=gray!50] (0,0,0) -- (1,0,0) -- (1,0,5) -- (0,0,5) -- cycle; \draw[fill=gray!90] (0,0,5) -- (0,5,5) -- (1,5,5) -- (1,0,5) -- cycle; \draw[fill=gray!50,even odd rule] (0,0,0) -- (0,5,0) -- (0,5,5) -- (0,0,5) --cycle (0,1,1) -- (0,4,1) -- (0,4,4) -- (0,1,4) --cycle ; %enroulement primaire \draw[thick,line width = 0.5mm] (0,5,3) -- (0,7,3) ; \draw[thick,line width = 0.5mm] (0,5,1.55) -- (0,7,1) ; \draw[thick,line width = 0.5mm] (0,5,3) arc [start angle=240, delta angle =90, radius=12.1mm] -- (1,4,3) ; \draw[thick,line width = 0.5mm] (1,4,3) arc [start angle=90, delta angle =-180, radius=0.5mm] ; \draw[thick,line width = 0.5mm] (0,5,3-0.1) arc [start angle=90, delta angle =180, radius=0.5mm] ; \draw[thick,line width = 0.5mm] (0,5,3-0.2) arc [start angle=240, delta angle =90, radius=12.1mm] -- (1,4,3-0.2) ; \draw[thick,line width = 0.5mm] (1,4,3-0.2) arc [start angle=90, delta angle =-180, radius=0.5mm] ; \draw[thick,line width = 0.5mm] (0,5,3-0.3) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.4) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-0.4) ; \draw[thick,line width = 0.5mm] (1,4,3-0.4) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.5) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.6) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-0.6) ; \draw[thick,line width = 0.5mm] (1,4,3-0.6) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.7) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.8) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-0.8) ; \draw[thick,line width = 0.5mm] (1,4,3-0.8) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-0.9) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-1) ; \draw[thick,line width = 0.5mm] (1,4,3-1) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.1) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.2) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-1.2) ; \draw[thick,line width = 0.5mm] (1,4,3-1.2) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.3) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.4) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-1.4) ; \draw[thick,line width = 0.5mm] (1,4,3-1.4) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.5) arc [start angle=90, delta angle =180, radius=0.5mm ] ; \draw[thick,line width = 0.5mm] (0,5,3-1.6) arc [start angle=240, delta angle =90, radius=12.1mm ] -- (1,4,3-1.6) ; \draw[thick,line width = 0.5mm] (1,4,3-1.6) arc [start angle=90, delta angle =-180, radius=0.5mm ] ; %enroulement secondaire \draw[thick,line width = 1mm] (0,1,3.4) --(0,-2.4,3.4); \draw[thick,line width = 1mm] (0,1,3.4) arc [start angle=90, delta angle =180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,3) arc [start angle=240, delta angle =90, radius=12.1mm ];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,3.2) arc [start angle=90, delta angle =-180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,3) arc [start angle=90, delta angle =180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=240, delta angle =90, radius=12.1mm ];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,2.8) arc [start angle=90, delta angle =-180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,2.6) arc [start angle=90, delta angle =180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=240, delta angle =90, radius=12.1mm ];% -- (1,4,3-0.8) ; \draw[thick,line width = 1mm] (1,0,2.4) arc [start angle=90, delta angle =-180, radius=1mm ] ; \draw[thick,line width = 1mm] (0,1,2.2) arc [start angle=90, delta angle =180, radius=1mm ] ; \draw[thick,line width = 1mm] (1,0,1.8)-- (1,-2,1.8) ; %v_1 et v_2 et i_1 et i_2 etc \draw[thick,line width = 0.2mm,>=latex,->] (0,7,1.2) -- (0,7,2.8) ; \node(a)at(0,7.5,2){$v_1(t)$}; \draw[thick,line width = 0.2mm,>=latex,->] (0,-2.7,2.9)-- (0.6,-2,2.8) ; \node(a)at(0,-3.3,3.2){$v_2(t)$}; \draw[thick,line width = 0.2mm,>=latex,->] (1,-0.5,2.8)-- (1,-1,2.8); \node(a)at(1,-3,4){ \textcolor{red}{$i_2(t)=0$ pour l'instant}}; \draw[thick,line width = 0.2mm,>=latex,<-] (0,6,3.2) -- (0,6.5,3.2) ; \node(a)at(0,6,3.6){$i_1(t)$}; \node(a)at(0,6,0.5){$N_1$ spires}; \node(a)at(0,-1.3,0.5){$N_2$ spires}; \node(a)at(0,2,4.7){$\Phi$ }; \node(a)at(0,0.2,3.7){{\large $\bullet$} }; \node(a)at(0,4.8,3.4){{\large $\bullet$} }; % ligne de champ \draw[thick,line width = 0.2mm,dashed] (0,4.5,1) -- (0,4.5,4); \draw[thick,line width = 0.2mm,dashed] (0,1,4.5) -- (0,4,4.5); \draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.55,4.5) -- (0,2.5,4.5); \draw[bend left=45,>=latex,dashed] (0,4.5,4) to (0,4,4.5); \draw[thick,line width = 0.2mm,dashed] (0,0.5,1) -- (0,0.5,4); \draw[bend left=45,>=latex,dashed] (0,1,4.5) to (0,0.5,4); \draw[thick,line width = 0.5 mm,>=latex,->,dashed] (0,2.5,0.5) -- (0,2.55,0.5); \draw[thick,line width = 0.2mm,dashed] (0,1,0.5) -- (0,4,0.5); \draw[bend left=45,>=latex,dashed] (0,0.5,1) to (0,1,0.5) ; \draw[bend left=45,>=latex,dashed] (0,4,0.5) to (0,4.5,1) ; \end{tikzpicture} \end{document} Publiée 14 Fév '22, 16:59 Paul Gaborit |
Bienvenue sur TeXnique ! Nous espérons que ce forum vous sera utile.
Ici, les formules de politesse et les signatures sont à éviter : celles de votre contribution ont été supprimées.
J'ai modifié votre question en y intégrant directement les images et le fichier
.tex
, ce dernier ayant été ECM-isé (la classebeamer
n'est pas liée au problème rencontré et ralentit significativement la compilation).Quelle figure magnifique !
Pouvez-vous montre le fichier .log de 2017? J'ai essayé avec texlive 2021, 2020, 2017, ... et 2014 mais le problème persiste.
Peut-être vous pouvez utiliser https://tex.stackexchange.com/a/321965/36296
@samcarter La version 3.0.0 de tikz a été publiée en décembre 2013. (malheureusement ;-))
La version 2.10 semble être encore disponible sur sourceforge.net (heureusement ;-))
Merci pour vos réponses. J'ai profité des vacances pour me replonger dans ce problème. Je parviens à compiler le fichier et à obtenir ce que je souhaite avec la version 2.10 de tikz obtenu. sur Sourceforge. Quand j'aurai le temps j'essaierai de voir ce qui n'est pas compatible avec la version actuelle.
@fredgeraldo : attention ! Cette réponse était un commentaire plutôt qu'une réponse et a été convertie comme tel.