%% %% This is file `codeanatomy.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% codeanatomy.dtx (with options: `package') %% \NeedsTeXFormat{LaTeX2e}[2018/12/01] \ProvidesPackage{codeanatomy}[2019/07/12 v0.4-Alpha draw Code Anatomy] \RequirePackage{expl3} \RequirePackage{xparse} \RequirePackage{tikz} \usetikzlibrary{ tikzmark ,fit ,arrows.meta ,bending ,shapes ,chains ,backgrounds ,scopes ,decorations ,decorations.pathmorphing } \definecolor{annotationcolor} {rgb}{0,0.50002,1} % Blue \colorlet{bgcmdcolor}{gray} % Grey \tikzset{anatomy/.style={% anchor=south west,% inner sep=0,% align=left,% font=\ttfamily } } \tikzset{code part/.style={% rectangle,% draw=annotationcolor,% align=left,% minimum height=1.175em,% inner sep=1.75pt,% outer sep=0.1pt,% font=\ttfamily } } \tikzset{fit extrem/.style={% rectangle,% draw=annotationcolor,% align=left,% minimum height=1.175em,% inner sep=1.75pt,% outer sep=0.1pt,% font=\ttfamily } } \tikzset{annotation/.style={% preaction={ draw=white,% line width=3.5pt,% arrows={-Triangle Cap[]},% },% draw=annotationcolor,% arrows={-Latex[% round,% color=annotationcolor, fill=annotationcolor ] }, shorten >=0.25pt } } \tikzset{code annotation/.style={% inner sep=2pt,% text=annotationcolor,% align=center,% font=\sffamily\small } } \tikzset{code grid debug/.style={% step=1.0,% draw=gray!20,% very thin,% on background layer } } \NewDocumentCommand{\codeBlock}{m}% {\node(code) [anatomy] at (0,0) {#1};} \NewDocumentCommand{\cPart}{mm} % {\tikzmarknode[code part]{#1}{#2}} \NewDocumentCommand{\iPart}{mm} % {\tikzmarknode[code part,draw=none,inner sep=0.75pt]{#1}{#2}} \NewDocumentCommand{\mtPoint}{m} {\tikzmarknode{#1}{\phantom{\rule[1.8ex]{0.1ex}{0.1ex}}}} \NewDocumentCommand{\hmtPoint}{m} {\tikzmarknode{#1}{\phantom{\rule[2.5ex]{0.1ex}{0.1ex}}}} \NewDocumentCommand{\mbPoint}{m} {\tikzmarknode{#1}{\phantom{\rule[-0.55ex]{0.1ex}{0.1ex}}}} \NewDocumentCommand{\dmbPoint}{m} {\tikzmarknode{#1}{\phantom{\rule[-2ex]{0.1ex}{0.1ex}}}} \NewDocumentCommand{\extremPoint}{m O{0ex} O{0.1ex} O{} } {\tikzmarknode[#4]{#1}{\phantom{\rule[#2]{#3}{0.1ex}}}} \NewDocumentCommand{\fitExtrem}{mm} {\node(#1)[fit extrem,fit={#2}]{};} \NewDocumentCommand{\bgcode}{m}{\textcolor{bgcmdcolor}{#1}} \NewDocumentCommand{\ptab}{}{\phantom{hhhh}} \NewDocumentCommand{\phspace}{}{\phantom{h}} \NewDocumentCommand{\codeAnnotation}{m r() m } % { \node(#1)[code annotation] at (#2) {#3}; } %% Copyright (C) 2008-2019 by %% ME %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of %% this license or (at your option) any later version. The latest %% version of this license is in the file: %% %% https://www.latex-project.org/lppl.txt %% %% %% This work consists of the files codeanatomy.dtx, %% codeanatomy.ins, %% and the derived files codeanatomy.pdf, %% codeanatomy.sty. %% %% %% End of file `codeanatomy.sty'.