diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-30 21:53:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-30 21:53:49 +0000 |
commit | a41abc226d31c85dd304637334f01646c2494297 (patch) | |
tree | 5e50f16b514e2f3554ce35823964dcba7f704d76 /Master/texmf-dist/tex/latex | |
parent | 9355f885dcde6130ebbbe3a3dfabbfc740fd1d12 (diff) |
randomwalk (30nov17)
git-svn-id: svn://tug.org/texlive/trunk@45954 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/randomwalk/randomwalk.sty | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/randomwalk/randomwalk.sty b/Master/texmf-dist/tex/latex/randomwalk/randomwalk.sty index a960a1f17df..768b76b76b6 100644 --- a/Master/texmf-dist/tex/latex/randomwalk/randomwalk.sty +++ b/Master/texmf-dist/tex/latex/randomwalk/randomwalk.sty @@ -12,20 +12,24 @@ %% to Bruno Le Floch (see the latex-randomwalk repository %% on GitHub). %% -%% File: randomwalk.dtx Copyright (C) 2011-2015 Bruno Le Floch +%% File: randomwalk.dtx Copyright (C) 2011-2017 Bruno Le Floch %% -%% 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 +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt %% -%% http://www.latex-project.org/lppl.txt +%% This work has the LPPL maintenance status 'maintained' +%% and the current maintainer is Bruno Le Floch. %% +%% This work consists of the files randomwalk.dtx and randomwalk.ins and +%% derived files randomwalk.sty and randomwalk.pdf. %% ----------------------------------------------------------------------- -\RequirePackage{expl3}[2015/09/11] +\RequirePackage{expl3}[2017/11/14] \ProvidesExplPackage - {randomwalk.sty} {2015/09/20} {0.4} {Customizable random walks} -\RequirePackage{xparse}[2015/09/11] + {randomwalk} {2017/11/29} {0.5} {Customizable random walks} +\RequirePackage{xparse}[2017/11/14] \RequirePackage{pgfcore} \int_const:Nn \c__randomwalk_lcg_last_int { \c_max_int - \c_one } \AtBeginDocument @@ -45,8 +49,8 @@ \bool_new:N \l__randomwalk_relative_angles_bool \bool_new:N \l__randomwalk_degrees_bool \bool_new:N \l__randomwalk_revert_random_bool -\cs_new_protected_nopar:Npn \__randomwalk_next_angle: { } -\cs_new_protected_nopar:Npn \__randomwalk_next_length: { } +\cs_new_protected:Npn \__randomwalk_next_angle: { } +\cs_new_protected:Npn \__randomwalk_next_length: { } \fp_new:N \l__randomwalk_angle_fp \fp_new:N \l__randomwalk_length_fp \dim_new:N \l__randomwalk_x_dim @@ -74,12 +78,12 @@ angles-relative .bool_set:N = \l__randomwalk_relative_angles_bool , revert-random .bool_set:N = \l__randomwalk_revert_random_bool , } -\cs_new_protected_nopar:Npn \__randomwalk_setup_defaults: +\cs_new_protected:Npn \__randomwalk_setup_defaults: { \int_set:Nn \l__randomwalk_step_number_int {10} - \cs_gset_protected_nopar:Npn \__randomwalk_next_angle: + \cs_gset_protected:Npn \__randomwalk_next_angle: { \__randomwalk_fp_set_rand:Nnn \l__randomwalk_angle_fp { 0 } { 360 } } - \cs_gset_protected_nopar:Npn \__randomwalk_next_length: + \cs_gset_protected:Npn \__randomwalk_next_length: { \fp_set:Nn \l__randomwalk_length_fp {10} } \bool_set_false:N \l__randomwalk_revert_random_bool \bool_set_false:N \l__randomwalk_relative_angles_bool @@ -93,7 +97,7 @@ \seq_set_split:Nnn \l__randomwalk_lengths_seq { , } {#1} \seq_set_map:NNn \l__randomwalk_lengths_seq \l__randomwalk_lengths_seq { \dim_to_fp:n {##1} } - \cs_gset_protected_nopar:Npn \__randomwalk_next_length: + \cs_gset_protected:Npn \__randomwalk_next_length: { \__randomwalk_get_rand_seq_item:NN \l__randomwalk_lengths_seq \l__randomwalk_internal_tl @@ -105,7 +109,7 @@ \seq_set_split:Nnn \l__randomwalk_angles_seq { , } {#1} \seq_set_map:NNn \l__randomwalk_angles_seq \l__randomwalk_angles_seq { \fp_to_tl:n {##1} } - \cs_gset_protected_nopar:Npn \__randomwalk_next_angle: + \cs_gset_protected:Npn \__randomwalk_next_angle: { \__randomwalk_get_rand_seq_item:NN \l__randomwalk_angles_seq \l__randomwalk_internal_tl @@ -116,7 +120,7 @@ \l__randomwalk_angle_fp { \l__randomwalk_internal_tl } } } -\cs_new_protected_nopar:Npn \__randomwalk_walk: +\cs_new_protected:Npn \__randomwalk_walk: { \__randomwalk_walk_start: \prg_replicate:nn { \l__randomwalk_step_number_int } @@ -125,23 +129,23 @@ { \int_gset_eq:NN \cr@nd \cr@nd } \__randomwalk_walk_stop: } -\cs_new_protected_nopar:Npn \__randomwalk_walk_start: +\cs_new_protected:Npn \__randomwalk_walk_start: { \begin{pgfpicture} \pgfpathmoveto { \pgfpoint { \l__randomwalk_x_dim } { \l__randomwalk_y_dim } } } -\cs_new_protected_nopar:Npn \__randomwalk_walk_line: +\cs_new_protected:Npn \__randomwalk_walk_line: { \pgfpathlineto { \pgfpoint { \l__randomwalk_x_dim } { \l__randomwalk_y_dim } } } -\cs_new_protected_nopar:Npn \__randomwalk_walk_stop: +\cs_new_protected:Npn \__randomwalk_walk_stop: { \pgfusepath { stroke } \end{pgfpicture} } -\cs_new_protected_nopar:Npn \__randomwalk_walk_step: +\cs_new_protected:Npn \__randomwalk_walk_step: { \__randomwalk_next_length: \__randomwalk_next_angle: |