diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/pointRuler/points.c |
Initial commit
Diffstat (limited to 'macros/latex/contrib/pointRuler/points.c')
-rw-r--r-- | macros/latex/contrib/pointRuler/points.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/macros/latex/contrib/pointRuler/points.c b/macros/latex/contrib/pointRuler/points.c new file mode 100644 index 0000000000..4a887da1c9 --- /dev/null +++ b/macros/latex/contrib/pointRuler/points.c @@ -0,0 +1,28 @@ +#include <stdio.h> + +//############################################## +//# Setup the tic marks for every 1 point with # +//# different lengths depending on magnitude # +//############################################## + +int main() { + int n,h; + FILE *fp; + + fp=fopen("points.tex","w"); + for(n=1;n<=867;n++) { + h=7; + if(n%5 == 0 && n%10 !=0) + h=14; + if(n%10 == 0 && n%20 != 0) { + h=21; + fprintf(fp,"\\put {\\tiny %i} [b] at %i 23\n",n,n); + } + if(n%20 == 0) { + h=28; + fprintf(fp,"\\put {\\scriptsize %i} [b] at %i 30\n",n,n); + } + fprintf(fp,"\\plot %i 0 %i %i /\n",n,n,h); + } + fclose(fp); +} |