summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/AntiqueClock.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/AntiqueClock.m4')
-rw-r--r--graphics/circuit_macros/examples/AntiqueClock.m413
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