diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex | 244 |
1 files changed, 181 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex b/Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex index 5872a71fdf3..c6ae085925a 100644 --- a/Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex +++ b/Master/texmf-dist/tex/latex/spath3/tikzlibraryknots.code.tex @@ -45,6 +45,7 @@ \dim_new:N \l__knot_tmpa_dim \dim_new:N \l__knot_tmpb_dim \dim_new:N \l__knot_tolerance_dim +\dim_new:N \l__knot_redraw_tolerance_dim \dim_new:N \l__knot_clip_bg_radius_dim \dim_new:N \l__knot_clip_draw_radius_dim @@ -247,6 +248,11 @@ { \pgfscope \pgftransformreset + \dim_set:Nn \l__knot_redraw_tolerance_dim {\fp_to_dim:n + { + sqrt(2) * max(\l__knot_clip_bg_radius_dim, \l__knot_clip_draw_radius_dim) + } + } \int_step_function:nnnN {1} {1} {\l__knot_strands_int} \knot_draw_strand:n \bool_if:NF \l__knot_super_draft_bool { @@ -267,13 +273,21 @@ { \tl_set:Nn \l__knot_node_tl { \exp_not:N \node[coordinate, - pin={[node~ contents={\int_use:N \g__knot_intersections_int},knot~ diagram/draft/crossing~ label, knot~ diagram/draft/crossing~ \int_use:N \g__knot_intersections_int \c_space_tl label/.try] + pin={[ + node~ contents={\int_use:N \g__knot_intersections_int}, + knot~ diagram/draft/crossing~ label, + knot~ diagram/draft/crossing~ + \int_use:N \g__knot_intersections_int \c_space_tl label/.try + ] }] } } \int_step_variable:nnnNn {1} {1} {\l__knot_tmpa_int - 1} \l__knot_tmpa_tl { - \int_step_variable:nnnNn {\tl_use:N \l__knot_tmpa_tl + 1} {1} {\l__knot_tmpa_int} \l__knot_tmpb_tl + \int_step_variable:nnnNn + {\tl_use:N \l__knot_tmpa_tl + 1} + {1} + {\l__knot_tmpa_int} \l__knot_tmpb_tl { \knot_intersections:VV \l__knot_tmpa_tl \l__knot_tmpb_tl } @@ -290,7 +304,12 @@ \spath_bake_round:c {knot strand #1} \tl_set:Nn \l__knot_tmpa_tl {knot~ diagram/every~ strand/.try,} \tl_put_right:Nv \l__knot_tmpa_tl {l__knot_options_strand #1} - \tl_put_right:Nn \l__knot_tmpa_tl {,knot~ diagram/only~ when~ rendering/.try,only~ when~ rendering/.try} + \tl_put_right:Nn \l__knot_tmpa_tl + { + , + knot~ diagram/only~ when~ rendering/.try, + only~ when~ rendering/.try + } \spath_tikz_path:Vv \l__knot_tmpa_tl {knot strand #1} \group_end: \endpgfscope @@ -303,11 +322,15 @@ \spath_finalpoint:Nv \l__knot_tmpb_tl {knot strand #1} \dim_set:Nn \l__knot_tmpa_dim {\tl_item:Nn \l__knot_tmpb_tl {1}} \dim_set:Nn \l__knot_tmpb_dim {\tl_item:Nn \l__knot_tmpb_tl {2}} - \node[knot~ diagram/draft/strand~label] at (\l__knot_tmpa_dim,\l__knot_tmpb_dim) {#1}; + \node[ + knot~ diagram/draft/strand~label + ] at (\l__knot_tmpa_dim,\l__knot_tmpb_dim) {#1}; \spath_initialpoint:Nv \l__knot_tmpb_tl {knot strand #1} \dim_set:Nn \l__knot_tmpa_dim {\tl_item:Nn \l__knot_tmpb_tl {1}} \dim_set:Nn \l__knot_tmpb_dim {\tl_item:Nn \l__knot_tmpb_tl {2}} - \node[knot~ diagram/draft/strand~label] at (\l__knot_tmpa_dim,\l__knot_tmpb_dim) {#1}; + \node[ + knot~ diagram/draft/strand~label + ] at (\l__knot_tmpa_dim,\l__knot_tmpb_dim) {#1}; } \bool_if:nT { \l__knot_self_intersections_bool @@ -316,6 +339,8 @@ } { \tl_clear:N \l__knot_tmpa_tl + \spath_initialpoint:Nv \l__knot_tmpa_tl {knot strand #1} + \tl_put_left:NV \l__knot_tmpa_tl \c_spath_moveto_tl \spath_segments_to_seq:Nv \l__knot_segments_seq {knot strand #1} \seq_map_function:NN \l__knot_segments_seq \knot_split_self_intersects:N \tl_set_eq:cN {knot strand #1} \l__knot_tmpa_tl @@ -330,23 +355,29 @@ { \fp_set:Nn \l__knot_tmpa_fp { - (\tl_item:nn {#1} {3} - 3 * \tl_item:nn {#1} {6} + 3 * \tl_item:nn {#1} {9} - \tl_item:nn {#1} {12}) + (\tl_item:nn {#1} {3} - 3 * \tl_item:nn {#1} {6} + + 3 * \tl_item:nn {#1} {9} - \tl_item:nn {#1} {12}) * (3 * \tl_item:nn {#1} {8} - 3 * \tl_item:nn {#1} {11}) - - (\tl_item:nn {#1} {2} - 3 * \tl_item:nn {#1} {5} + 3 * \tl_item:nn {#1} {8} - \tl_item:nn {#1} {11}) + (\tl_item:nn {#1} {2} - 3 * \tl_item:nn {#1} {5} + + 3 * \tl_item:nn {#1} {8} - \tl_item:nn {#1} {11}) * (3 * \tl_item:nn {#1} {9} - 3 * \tl_item:nn {#1} {12}) } \fp_set:Nn \l__knot_tmpb_fp { - (\tl_item:nn {#1} {2} - 3 * \tl_item:nn {#1} {5} + 3 * \tl_item:nn {#1} {8} - \tl_item:nn {#1} {11}) + (\tl_item:nn {#1} {2} - 3 * \tl_item:nn {#1} {5} + + 3 * \tl_item:nn {#1} {8} - \tl_item:nn {#1} {11}) * - (3 * \tl_item:nn {#1} {6} - 6 * \tl_item:nn {#1} {9} + 3 * \tl_item:nn {#1} {12}) + (3 * \tl_item:nn {#1} {6} - 6 * \tl_item:nn {#1} {9} + + 3 * \tl_item:nn {#1} {12}) - - (\tl_item:nn {#1} {3} - 3 * \tl_item:nn {#1} {6} + 3 * \tl_item:nn {#1} {9} - \tl_item:nn {#1} {12}) + (\tl_item:nn {#1} {3} - 3 * \tl_item:nn {#1} {6} + + 3 * \tl_item:nn {#1} {9} - \tl_item:nn {#1} {12}) * - (3 * \tl_item:nn {#1} {5} - 6 * \tl_item:nn {#1} {8} + 3 * \tl_item:nn {#1} {11}) + (3 * \tl_item:nn {#1} {5} - 6 * \tl_item:nn {#1} {8} + + 3 * \tl_item:nn {#1} {11}) } \fp_compare:nTF { @@ -359,7 +390,11 @@ 0 < \l__knot_tmpa_fp && \l__knot_tmpa_fp < 1 } { - \spath_split_curve:NNnV \l__knot_tmpc_tl \l__knot_tmpd_tl {#1} \l__knot_tmpa_fp + \spath_split_curve:NNnV + \l__knot_tmpc_tl + \l__knot_tmpd_tl + {#1} + \l__knot_tmpa_fp \tl_set:Nx \l__knot_tmpc_tl {\tl_tail:N \l__knot_tmpc_tl} \tl_set:Nx \l__knot_tmpc_tl {\tl_tail:N \l__knot_tmpc_tl} \tl_set:Nx \l__knot_tmpc_tl {\tl_tail:N \l__knot_tmpc_tl} @@ -411,19 +446,33 @@ \bool_if:nTF { \l__knot_save_bool && - \tl_if_exist_p:c {knot~ intersections~ \tl_use:N \l__knot_name_tl - \tl_use:N \l__knot_tmpa_tl - \tl_use:N \l__knot_tmpb_tl} + \tl_if_exist_p:c { + knot~ intersections~ + \tl_use:N \l__knot_name_tl - + \tl_use:N \l__knot_tmpa_tl - + \tl_use:N \l__knot_tmpb_tl + } } { - \tl_use:c {knot~ intersections~ \tl_use:N \l__knot_name_tl - \tl_use:N \l__knot_tmpa_tl - \tl_use:N \l__knot_tmpb_tl} + \tl_use:c + { + knot~ intersections~ \tl_use:N \l__knot_name_tl - + \tl_use:N \l__knot_tmpa_tl - + \tl_use:N \l__knot_tmpb_tl + } } { -\pgfintersectionofpaths{\pgfsetpath\l__knot_tmpc_tl}{\pgfsetpath\l__knot_tmpd_tl} + \pgfintersectionofpaths{\pgfsetpath\l__knot_tmpc_tl}{\pgfsetpath\l__knot_tmpd_tl} } \int_compare:nT {\pgfintersectionsolutions > 0} { - \int_step_function:nnnN {1} {1} {\pgfintersectionsolutions} \knot_do_intersection:n + \int_step_function:nnnN + {1} + {1} + {\pgfintersectionsolutions} + \knot_do_intersection:n } \knot_save_intersections:VV \l__knot_tmpa_tl \l__knot_tmpb_tl @@ -455,7 +504,16 @@ } \tl_put_right:Nx \l__knot_aux_tl { - {\exp_not:N \pgf@x=\dim_use:N \l__knot_tmpa_dim\exp_not:N\relax\exp_not:N \pgf@y =\dim_use:N \l__knot_tmpb_dim\relax} + { + \exp_not:N \pgf@x + = + \dim_use:N \l__knot_tmpa_dim + \exp_not:N \relax + \exp_not:N \pgf@y + = + \dim_use:N \l__knot_tmpb_dim + \exp_not:N \relax + } } } \tl_set:Nn \l__knot_auxa_tl {\expandafter \gdef \csname knot~ intersections~} @@ -480,7 +538,7 @@ \tl_set:Nv \l__knot_tmpc_tl \l__knot_tmpc_tl \tl_if_eq:NNT \l__knot_tmpc_tl \l__knot_tmpb_tl { - \knot_test_endpoint:VnT \l__knot_tmpb_tl {final point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpb_tl {final point} { \bool_set_true:N \l__knot_skip_bool } @@ -491,7 +549,7 @@ \tl_set:Nv \l__knot_tmpc_tl \l__knot_tmpc_tl \tl_if_eq:NNT \l__knot_tmpc_tl \l__knot_tmpa_tl { - \knot_test_endpoint:VnT \l__knot_tmpa_tl {final point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpa_tl {final point} { \bool_set_true:N \l__knot_skip_bool } @@ -499,19 +557,19 @@ } \bool_if:NT \l__knot_ignore_ends_bool { - \knot_test_endpoint:VnT \l__knot_tmpa_tl {initial point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpa_tl {initial point} { \bool_set_true:N \l__knot_skip_bool } - \knot_test_endpoint:VnT \l__knot_tmpa_tl {final point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpa_tl {final point} { \bool_set_true:N \l__knot_skip_bool } - \knot_test_endpoint:VnT \l__knot_tmpb_tl {initial point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpb_tl {initial point} { \bool_set_true:N \l__knot_skip_bool } - \knot_test_endpoint:VnT \l__knot_tmpb_tl {final point} + \knot_test_endpoint:NVnT \l__knot_tolerance_dim \l__knot_tmpb_tl {final point} { \bool_set_true:N \l__knot_skip_bool } @@ -545,14 +603,16 @@ } \bool_if:NT \l__knot_self_intersections_bool { - \knot_test_endpoint:VnT \l__knot_tmpg_tl {initial point} + \knot_test_endpoint:NVnT + \l__knot_redraw_tolerance_dim \l__knot_tmpg_tl {initial point} { \bool_set_true:N \l__knot_prepend_prev_bool } { \bool_set_false:N \l__knot_prepend_prev_bool } - \knot_test_endpoint:VnT \l__knot_tmpg_tl {final point} + \knot_test_endpoint:NVnT + \l__knot_redraw_tolerance_dim \l__knot_tmpg_tl {final point} { \bool_set_true:N \l__knot_append_next_bool } @@ -565,10 +625,14 @@ } { \tl_clear_new:c {knot \tl_use:N \l__knot_prefix_tl -1} - \tl_set_eq:cc {knot \tl_use:N \l__knot_prefix_tl -1} {knot \tl_use:N \l__knot_tmpg_tl} + \tl_set_eq:cc + {knot \tl_use:N \l__knot_prefix_tl -1} + {knot \tl_use:N \l__knot_tmpg_tl} \tl_clear_new:c {l__knot_options_ \tl_use:N \l__knot_prefix_tl -1} - \tl_set_eq:cc {l__knot_options_ \tl_use:N \l__knot_prefix_tl -1} {l__knot_options_ \tl_use:N \l__knot_tmpg_tl} + \tl_set_eq:cc + {l__knot_options_ \tl_use:N \l__knot_prefix_tl -1} + {l__knot_options_ \tl_use:N \l__knot_tmpg_tl} \bool_if:nT { @@ -579,7 +643,9 @@ !\tl_if_empty_p:c {knot previous \tl_use:N \l__knot_tmpg_tl} } { - \spath_prepend_no_move:cv {knot \tl_use:N \l__knot_prefix_tl -1} {knot \tl_use:c {knot previous \tl_use:N \l__knot_tmpg_tl}} + \spath_prepend_no_move:cv + {knot \tl_use:N \l__knot_prefix_tl -1} + {knot \tl_use:c {knot previous \tl_use:N \l__knot_tmpg_tl}} \bool_if:nT { \l__knot_splits_bool @@ -589,10 +655,18 @@ !\tl_if_empty_p:c {knot previous \tl_use:N \l__knot_tmpg_tl} } { - \knot_test_endpoint:vnT {knot previous \tl_use:N \l__knot_tmpg_tl} {initial point} + \knot_test_endpoint:NvnT + \l__knot_redraw_tolerance_dim + {knot previous \tl_use:N \l__knot_tmpg_tl} + {initial point} { - - \spath_prepend_no_move:cv {knot \tl_use:N \l__knot_prefix_tl -1} {knot \tl_use:c {knot previous \tl_use:c {knot previous \tl_use:N \l__knot_tmpg_tl}}} + \spath_prepend_no_move:cv + {knot \tl_use:N \l__knot_prefix_tl -1} + {knot \tl_use:c + {knot previous \tl_use:c + {knot previous \tl_use:N \l__knot_tmpg_tl} + } + } \tl_set_eq:Nc \l__knot_tmpa_tl {knot \tl_use:N \l__knot_prefix_tl -1} } } @@ -606,7 +680,9 @@ !\tl_if_empty_p:c {knot previous \tl_use:N \l__knot_tmpg_tl} } { - \spath_append_no_move:cv {knot \tl_use:N \l__knot_prefix_tl -1} {knot \tl_use:c {knot next \tl_use:N \l__knot_tmpg_tl}} + \spath_append_no_move:cv + {knot \tl_use:N \l__knot_prefix_tl -1} + {knot \tl_use:c {knot next \tl_use:N \l__knot_tmpg_tl}} \bool_if:nT { \l__knot_splits_bool @@ -617,42 +693,61 @@ !\tl_if_empty_p:c {knot previous \tl_use:N \l__knot_tmpg_tl} } { - \knot_test_endpoint:vnT {knot previous \tl_use:N \l__knot_tmpg_tl} {final point} + \knot_test_endpoint:NvnT + \l__knot_redraw_tolerance_dim + {knot previous \tl_use:N \l__knot_tmpg_tl} + {final point} { - \spath_append_no_move:cv {knot \tl_use:N \l__knot_prefix_tl -1} {knot \tl_use:c {knot next \tl_use:c {knot next \tl_use:N \l__knot_tmpg_tl}}} - + \spath_append_no_move:cv + {knot \tl_use:N \l__knot_prefix_tl -1} + {knot \tl_use:c + {knot next \tl_use:c + {knot next \tl_use:N \l__knot_tmpg_tl} + } + } } } } - \tl_set:Nn \l__knot_tmpg_tl {\tl_use:N \l__knot_prefix_tl -1} } } \pgfscope \group_begin: - \tikzset{knot~ diagram/every~ intersection/.try, every~ intersection/.try, knot~ diagram/intersection~ \int_use:N \g__knot_intersections_int/.try} + \tikzset{ + knot~ diagram/every~ intersection/.try, + every~ intersection/.try, + knot~ diagram/intersection~ \int_use:N \g__knot_intersections_int/.try + } \knot_draw_crossing:VVV \l__knot_tmpg_tl \l__knot_tmpa_dim \l__knot_tmpb_dim - \coordinate (\l__knot_name_tl \c_space_tl \int_use:N \g__knot_intersections_int) at (\dim_use:N \l__knot_tmpa_dim, \dim_use:N \l__knot_tmpb_dim); + \coordinate + (\l__knot_name_tl \c_space_tl \int_use:N \g__knot_intersections_int) + at (\dim_use:N \l__knot_tmpa_dim, \dim_use:N \l__knot_tmpb_dim); \group_end: \endpgfscope } \tl_if_empty:NF \l__knot_node_tl { - \seq_gpush:Nx \g__knot_nodes_seq { \l__knot_node_tl at (\dim_use:N \l__knot_tmpa_dim, \dim_use:N \l__knot_tmpb_dim) {};} + \seq_gpush:Nx + \g__knot_nodes_seq + { + \l__knot_node_tl + at + (\dim_use:N \l__knot_tmpa_dim, \dim_use:N \l__knot_tmpb_dim) {}; + } } } } \cs_generate_variant:Nn \knot_intersections:nn {VV} -\prg_new_conditional:Npnn \knot_test_endpoint:N #1 {p,T,F,TF} +\prg_new_conditional:Npnn \knot_test_endpoint:NN #1#2 {p,T,F,TF} { \dim_compare:nTF { - \dim_abs:n { \l__knot_tmpa_dim - \tl_item:Nn #1 {1}} + \dim_abs:n { \l__knot_tmpa_dim - \tl_item:Nn #2 {1}} + - \dim_abs:n { \l__knot_tmpb_dim - \tl_item:Nn #1 {2}} + \dim_abs:n { \l__knot_tmpb_dim - \tl_item:Nn #2 {2}} < - \l__knot_tolerance_dim + #1 } { \prg_return_true: @@ -661,10 +756,10 @@ \prg_return_false: } } -\prg_new_protected_conditional:Npnn \knot_test_endpoint:nn #1#2 {T,F,TF} +\prg_new_protected_conditional:Npnn \knot_test_endpoint:Nnn #1#2#3 {T,F,TF} { - \use:c {spath_#2:Nv} \l__knot_tmpd_tl {knot #1} - \knot_test_endpoint:NTF \l__knot_tmpd_tl + \use:c {spath_#3:Nv} \l__knot_tmpd_tl {knot #2} + \knot_test_endpoint:NNTF #1 \l__knot_tmpd_tl { \prg_return_true: } @@ -673,34 +768,44 @@ } } -\cs_generate_variant:Nn \knot_test_endpoint:nnT {VnT,vnT} -\cs_generate_variant:Nn \knot_test_endpoint:nnF {VnF,vnF} -\cs_generate_variant:Nn \knot_test_endpoint:nnTF {VnTF,vnTF} +\cs_generate_variant:Nn \knot_test_endpoint:NnnT {NVnT,NvnT} +\cs_generate_variant:Nn \knot_test_endpoint:NnnF {NVnF,NvnF} +\cs_generate_variant:Nn \knot_test_endpoint:NnnTF {NVnTF,NvnTF} \cs_new_protected_nopar:Npn \knot_draw_crossing:nnn #1#2#3 { \group_begin: \pgfscope - \path[knot~ diagram/background~ clip] (#2, #3) circle[radius=\l__knot_clip_bg_radius_dim]; + \path[knot~ diagram/background~ clip] (#2, #3) + circle[radius=\l__knot_clip_bg_radius_dim]; \tl_set:Nn \l__knot_tmpa_tl {knot~ diagram/every~ strand/.try,} \tl_if_exist:cT {l__knot_options_ #1} { \tl_put_right:Nv \l__knot_tmpa_tl {l__knot_options_ #1} } - \tl_put_right:Nn \l__knot_tmpa_tl {,knotbg,line~ width= \tl_use:N \l__knot_clip_width_tl * \pgflinewidth} + \tl_put_right:Nn \l__knot_tmpa_tl + { + ,knotbg + ,line~ width= \tl_use:N \l__knot_clip_width_tl * \pgflinewidth + } \spath_tikz_path:Vv \l__knot_tmpa_tl {knot #1} \endpgfscope \pgfscope - \path[knot~ diagram/clip] (#2, #3) circle[radius=\l__knot_clip_draw_radius_dim]; + \path[knot~ diagram/clip] (#2, #3) + circle[radius=\l__knot_clip_draw_radius_dim]; \tl_set:Nn \l__knot_tmpa_tl {knot~ diagram/every~ strand/.try,} \tl_if_exist:cT {l__knot_options_ #1} { \tl_put_right:Nv \l__knot_tmpa_tl {l__knot_options_ #1} } - \tl_put_right:Nn \l__knot_tmpa_tl {,knot~ diagram/only~ when~ rendering/.try,only~ when~ rendering/.try} + \tl_put_right:Nn \l__knot_tmpa_tl + { + ,knot~ diagram/only~ when~ rendering/.try + ,only~ when~ rendering/.try + } \spath_tikz_path:Vv \l__knot_tmpa_tl {knot #1} \endpgfscope @@ -752,12 +857,14 @@ \tl_set:cn {knot filament \int_use:N \g__knot_filaments_int} {#1} \tl_clear_new:c {l__knot_options_filament \int_use:N \g__knot_filaments_int} - \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} \l__knot_tmpa_tl + \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} + \l__knot_tmpa_tl \tl_clear_new:c {knot previous filament \int_use:N \g__knot_filaments_int} \int_compare:nF {\l__knot_component_start_int == \g__knot_filaments_int} { - \tl_set:cx {knot previous filament \int_use:N \g__knot_filaments_int} {filament \int_eval:n {\g__knot_filaments_int - 1}} + \tl_set:cx {knot previous filament \int_use:N \g__knot_filaments_int} + {filament \int_eval:n {\g__knot_filaments_int - 1}} } } \c_spath_curvetoa_tl @@ -766,12 +873,15 @@ \tl_clear_new:c {knot filament \int_use:N \g__knot_filaments_int} \tl_set:cn {knot filament \int_use:N \g__knot_filaments_int} {#1} \tl_clear_new:c {l__knot_options_filament \int_use:N \g__knot_filaments_int} - \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} \l__knot_tmpa_tl + \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} + \l__knot_tmpa_tl \tl_clear_new:c {knot previous filament \int_use:N \g__knot_filaments_int} \int_compare:nF {\l__knot_component_start_int == \g__knot_filaments_int} { - \tl_set:cx {knot previous filament \int_use:N \g__knot_filaments_int} {filament \int_eval:n {\g__knot_filaments_int - 1}} + \tl_set:cx + {knot previous filament \int_use:N \g__knot_filaments_int} + {filament \int_eval:n {\g__knot_filaments_int - 1}} } } \c_spath_closepath_tl @@ -779,18 +889,26 @@ \int_gincr:N \g__knot_filaments_int \tl_clear_new:c {knot filament \int_use:N \g__knot_filaments_int} \tl_clear:N \l__knot_tmpa_tl - \tl_put_right:Nx {\tl_item:nn {#1} {1}\tl_item:nn {#1} {2}\tl_item:nn {#1} {3}} + \tl_put_right:Nx + { + \tl_item:nn {#1} {1}\tl_item:nn {#1} {2}\tl_item:nn {#1} {3} + } \tl_put_right:NV \l__knot_tmpa_tl \c_spath_lineto_tl \tl_put_right:Nx {\tl_item:nn {#1} {5}\tl_item:nn {#1} {6}} \tl_set:cV {knot filament \int_use:N \g__knot_filaments_int} \l__knot_tmpa_tl - \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} \l__knot_tmpa_tl + \tl_set_eq:cN {l__knot_options_filament \int_use:N \g__knot_filaments_int} + \l__knot_tmpa_tl \tl_clear_new:c {knot previous filament \int_use:N \g__knot_filaments_int} \int_compare:nF {\l__knot_component_start_int == \g__knot_filaments_int} { - \tl_set:cx {knot previous filament \int_use:N \g__knot_filaments_int} {filament \int_eval:n {\g__knot_filaments_int - 1}} + \tl_set:cx + {knot previous filament \int_use:N \g__knot_filaments_int} + {filament \int_eval:n {\g__knot_filaments_int - 1}} } - \tl_set:cx {knot previous filament \int_use:N \l__knot_component_start_int} {filament \int_use:N \g__knot_filaments_int} + \tl_set:cx + {knot previous filament \int_use:N \l__knot_component_start_int} + {filament \int_use:N \g__knot_filaments_int} } } { @@ -1008,7 +1126,7 @@ } } %% -%% Copyright (C) 2011-2019 by Andrew Stacey <loopspace@mathforge.org> +%% Copyright (C) 2011-2021 by Andrew Stacey <loopspace@mathforge.org> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either @@ -1020,7 +1138,7 @@ %% This work is "maintained" (as per LPPL maintenance status) by %% Andrew Stacey. %% -%% This work consists of the files spath3.dtx +%% This work consists of the files spath3_code.dtx %% calligraphy_doc.tex %% knots_doc.tex %% spath3.tex |