proc SCHEMATIC_mutual_inductors {} {
make input -name t1 -origin {340 140}
make input -name ref_t1 -origin {340 210}
make output -name t2 -origin {470 140}
make output -name ref_t2 -origin {470 210}
}

proc ICON_mutual_inductors args {
  icon_setup $args {{origin {0 0}} {orient R0} {name K} {l1 1.0e-9} {l2 1.0e-9} {m 0.99e-9}}
icon_term -type input -origin {-60 -40} -name t1
icon_term -type input -origin {-60 40} -name ref_t1
icon_term -type output -origin {70 -40} -name t2
icon_term -type output -origin {70 40} -name ref_t2
icon_property -origin {-20 -60} -label {$name}
  icon_property -origin {-90 120} -type user -name name -default K
  icon_property -origin {-90 140} -type user -name l1 -default 1.0e-9
  icon_arc 20 -20 40 0 -start 268 -extent -171
  icon_arc 20 -10 40 0 -start 102 -extent -193
  icon_arc 20 -10 40 10 -start 268 -extent -171
  icon_arc 20 0 40 10 -start 102 -extent -193
  icon_arc 20 0 40 20 -start 268 -extent -171
  icon_arc 20 10 40 20 -start 102 -extent -193
  icon_arc 20 10 40 30 -start 268 -extent -171
  icon_line 30 40 30 30
  icon_line 30 -40 30 -30
  icon_arc 20 -30 40 -10 -start 268 -extent -175
  icon_arc 20 -20 40 -10 -start 102 -extent -193
icon_property -origin {-20 70} -label {l1=$l1}
  icon_arc -30 -20 -10 0 -start 272 -extent 171
  icon_arc -30 -10 -10 0 -start 78 -extent 193
  icon_arc -30 -10 -10 10 -start 272 -extent 171
  icon_arc -30 0 -10 10 -start 78 -extent 193
  icon_arc -30 0 -10 20 -start 272 -extent 171
  icon_arc -30 10 -10 20 -start 78 -extent 193
  icon_arc -30 10 -10 30 -start 272 -extent 171
  icon_line -20 40 -20 30
  icon_line -20 -40 -20 -30
  icon_arc -30 -30 -10 -10 -start 272 -extent 175
  icon_arc -30 -20 -10 -10 -start 78 -extent 193
  icon_line -20 -40 -60 -40
  icon_line -20 40 -60 40
  icon_line 70 -40 30 -40
  icon_line 70 40 30 40
  icon_arc -10 -50 0 -40 -start 286 -extent 344
  icon_arc 10 -50 20 -40 -start 286 -extent 344
  icon_property -origin {-90 160} -type user -name l2 -default 1.0e-9
  icon_property -origin {-90 180} -type user -name m -default 0.99e-9
icon_property -origin {-20 90} -label {l2=$l2}
icon_property -origin {-20 50} -label {m=$m}
  icon_arc -10 10 20 40 -start 217 -extent 109
icon_property -origin {-40 0} -anchor e -label l1
icon_property -origin {50 0} -label l2
  icon_property -origin {-140 200} -type fixed -name spice -text {l1__$name $t1 $ref_t1 $l1\l2__$name $t2 $ref_t2 $l2\k__$name l1__$name l2__$name '$m/sqrt($l1*$l2)'}
}

