Fichiers
typo-cpge/latex/ystikz.sty
2021-03-01 20:22:31 +01:00

126 lignes
3.3 KiB
TeX

\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ystikz}
\ifluatex
\def\pgfsysdriver{pgfsys-luatex.def}
\else
\def\pgfsysdriver{pgfsys-xetex.def}
\fi
\RequirePackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations}
\usetikzlibrary{graphs}
\usetikzlibrary{trees}
\usetikzlibrary{babel}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{automata}
\tikzset{>=latex}
\ifluatex
\usetikzlibrary{graphdrawing}
%
%% bug de PGF
%% https://tex.stackexchange.com/a/453157
\RequirePackage{luacode}
\begin{luacode*}
function pgf_lookup_and_require(name)
local sep = package.config:sub(1,1)
local function lookup(name)
local sub = name:gsub('%.',sep)
if kpse.find_file(sub, 'lua') then
require(name)
elseif kpse.find_file(sub, 'clua') then
collectgarbage('stop')
require(name)
collectgarbage('restart')
else
return false
end
return true
end
return
lookup('pgf.gd.' .. name .. '.library') or
lookup('pgf.gd.' .. name) or
lookup(name .. '.library') or
lookup(name)
end
\end{luacode*}
%
%
\usegdlibrary{layered, force}
\fi
\RequirePackage[external]{forest}
%\tikzexternalize
\forestset{%
default preamble={
for tree={
circle,
draw,
inner sep=0pt,
minimum size=.5cm,
font=\scriptsize,
edge=-latex,
anchor=north
}, baseline
},
ssarbre/.style={isosceles triangle, draw, shape border rotate=90, minimum size=.7cm, child anchor=apex, anchor=apex},
square/.style={regular polygon,regular polygon sides=4, inner sep=0pt, minimum size=.7cm},
susp/.style={draw=none, no edge},
dashd/.style={dashed, edge=dashed}
}
\tikzstyle{basevertex} = [circle,
inner sep=0pt,
minimum size=.5cm,
font=\scriptsize]
\tikzstyle{vertex} = [basevertex, draw]
\tikzstyle{dotvertex} = [vertex]
\tikzset{graphs/every graph/.style={nodes={vertex},
edges={font=\scriptsize}}}
\tikzstyle{dotedgelbl} = [font=\scriptsize]
\tikzstyle{invisiblevertex} = [inner sep = 0pt, outer sep = 0pt, minimum size = 0pt]
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\RequirePackage[inputdir=./_build/]{dot2texi}
%%% https://tex.stackexchange.com/a/26386/103608
\usetikzlibrary{intersections}
\tikzset{
use path for main/.code={%
\tikz@addmode{%
\expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname
}%
},
use path for actions/.code={%
\expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}%
},
use path/.style={%
use path for main=#1,
use path for actions=#1,
}
}
%%%/
%%% https://tex.stackexchange.com/questions/6135/how-to-make-beamer-overlays-with-tikz-node#6155
%%% voir aussi https://tex.stackexchange.com/questions/99119/beamer-problematic-use-of-visible-and-only-in-combination-with-tikz-to-draw-a#99122
\tikzset{onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}}
}}
\RequirePackage{pgfplots}
\pgfplotsset{compat=1.15}
\endinput