diff options
author | Norbert Preining <norbert@preining.info> | 2020-05-02 03:03:34 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-05-02 03:03:34 +0000 |
commit | 8626a9c3cb5dc8d02d779d5b5b1e3933d5626f43 (patch) | |
tree | 3cf05fd2ad850b994dafdcf497738d48a29634ca /graphics/circuit_macros/examples/AntiqueClock.m4 | |
parent | 7039906aa6676b98933cd099d1cb038f1644c18f (diff) |
CTAN sync 202005020303
Diffstat (limited to 'graphics/circuit_macros/examples/AntiqueClock.m4')
-rw-r--r-- | graphics/circuit_macros/examples/AntiqueClock.m4 | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/graphics/circuit_macros/examples/AntiqueClock.m4 b/graphics/circuit_macros/examples/AntiqueClock.m4 index 566fb4c814..814824bee7 100644 --- a/graphics/circuit_macros/examples/AntiqueClock.m4 +++ b/graphics/circuit_macros/examples/AntiqueClock.m4 @@ -2,7 +2,11 @@ # AntiqueClock.m4 gen_init NeedDpicTools -iflatex(command "{\sf") + +# PSTricks or tikz only: +ifelse(ifpstricks(T)`'ifpgf(T),T,` + +iflatex(`latexcommand({\sf)') # https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals @@ -102,7 +106,7 @@ Face: circle thick 0 fill_(1) rad r3 at C # Text rotation for PSTricks or TikZ define(`rottext', - `ifpstricks(`\rput[c]{%g}(0,0)')ifpgf(`\pgftext[rotate=%g]')') + `ifpstricks(`\rput[c]{%g}(0,0)',`ifpgf(`\pgftext[rotate=%g]',%g)')') # Outer numbers command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4) for mn = -15 to 15 by 5 do { sprintf("rottext{\outerfont %g}",\ @@ -138,5 +142,8 @@ Face: circle thick 0 fill_(1) rad r3 at C Clock1: AntiqueClock(,,,3) # Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0) -iflatex(command "}%") + iflatex(`latexcommand(})') + +',` "AntiqueClock.m4 requires pstricks or pgf" ') + .PE |