Debian Codegraph @

texmf-dist/source/latex/horoscop/horoscop.dtx

raw
1 % \iffalse meta-comment
2 %
3 % This work is hereby released into the Public Domain. To view a
4 % copy of the public domain dedication, visit
5 % https://creativecommons.org/licenses/publicdomain/
6 % or send a letter to Creative Commons, 171 Second Street, Suite 300,
7 % San Francisco, California, 94105, USA.
8 %
9 % Matthew Skala
10 % [email protected]
11 % https://ansuz.sooke.bc.ca/
12 % August 30, 2008
13 %
14 % \fi
15 %
16 % \iffalse
17 %<*driver>
18 \ProvidesFile{horoscop.dtx}
19 \documentclass{ltxdoc}
20
21 \usepackage{color}
22 \usepackage{fmtcount}
23 \usepackage{graphicx}
24 \usepackage[scaled=0.9]{helvet}
25 \usepackage[textsym,unicode,wasysym,marvosym,starfont]{horoscop}[2020/07/31]
26 \usepackage{mathpazo}
27 \usepackage{metalogo}
28 \usepackage{titlesec}
29 \usepackage[letterpaper,breaklinks,bookmarks,plainpages=false,
30 colorlinks,pagebackref,citecolor=darkgreen,linkcolor=purplish]{hyperref}
31
32 \definecolor{darkgreen}{rgb}{0,0.35,0}
33 \definecolor{purplish}{rgb}{0.4,0,0.6}
34
35 \def\docornament{\docornA}
36
37 \def\docornA{\SunSymbol\gdef\docornament{\docornB}}
38 \def\docornB{\MoonSymbol\gdef\docornament{\docornC}}
39 \def\docornC{\MercurySymbol\gdef\docornament{\docornD}}
40 \def\docornD{\VenusSymbol\gdef\docornament{\docornE}}
41 \def\docornE{\MarsSymbol\gdef\docornament{\docornF}}
42 \def\docornF{\JupiterSymbol\gdef\docornament{\docornG}}
43 \def\docornG{\SaturnSymbol\gdef\docornament{\docornH}}
44 \def\docornH{\UranusSymbol\gdef\docornament{\docornI}}
45 \def\docornI{\NeptuneSymbol\gdef\docornament{\docornJ}}
46 \def\docornJ{\PlutoSymbol\gdef\docornament{\docornK}}
47 \def\docornK{\ChironSymbol\gdef\docornament{\docornL}}
48 \def\docornL{\LilithSymbol}
49
50 \titleformat{\section}[display]%
51 {\normalfont\large\filcenter}%
52 {\itshape Chapter \Numberstring{section}}%
53 {1pc}{\MakeUppercase}[\vspace{0.8pc}\LARGE\docornament]
54 \newcommand{\sectionbreak}{\cleardoublepage}
55 \titleformat{\subsection}[block]{\normalfont\scshape\filcenter}%
56 {\arabic{subsection}.}{0.5em}{}
57 \titleformat{\subsubsection}[runin]{\normalfont\bfseries}%
58 {{\fontseries{b}\selectfont\S}\arabic{subsection}.\arabic{subsubsection}.}{0.5em}{}[.---]
59 \titlespacing{\subsubsection}{0pt}{1.5ex plus .1ex minus .2ex}{0pt}
60
61 \makeatletter
62 \def\mybookmark#1#2{%
63 \edef\Hy@toclevel{\csname toclevel@#1\endcsname}%
64 \Hy@writebookmark{\csname the#1\endcsname}%
65 {#2}%
66 {\@currentHref}%
67 {\Hy@toclevel}%
68 {toc}%
69 }
70 \makeatother
71
72 \EnableCrossrefs
73 \CodelineIndex
74 \RecordChanges
75 \begin{document}
76 \DocInput{horoscop.dtx}
77 \clearpage\phantomsection\mybookmark{section}{Change History}
78 \PrintChanges
79 \clearpage\phantomsection\mybookmark{section}{Index}
80 \PrintIndex
81 \end{document}
82 %</driver>
83 % \fi
84 %
85 % \CheckSum{4317}
86 %
87 % \CharacterTable
88 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
89 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
90 % Digits \0\1\2\3\4\5\6\7\8\9
91 % Exclamation \! Double quote \" Hash (number) \#
92 % Dollar \$ Percent \% Ampersand \&
93 % Acute accent \' Left paren \( Right paren \)
94 % Asterisk \* Plus \+ Comma \,
95 % Minus \- Point \. Solidus \/
96 % Colon \: Semicolon \; Less than \<
97 % Equals \= Greater than \> Question mark \?
98 % Commercial at \@ Left bracket \[ Backslash \\
99 % Right bracket \] Circumflex \^ Underscore \_
100 % Grave accent \` Left brace \{ Vertical bar \|
101 % Right brace \} Tilde \~}
102 %
103 %
104 % \changes{v0.9}{2008/05/03}{Initial (beta) version}
105 %
106 % \GetFileInfo{horoscop.dtx}
107 %
108 % \DoNotIndex{\advance,\begingroup,\count,\csname,\def,%
109 % \dimen,\dimen@,\divide,\edef,\else,\endcsname,\endgroup,%
110 % \expandafter,\fi,\gdef,\if,\ifdim,\let,\multiply,\p@,%
111 % \relax,\the,\z@,\newcommand,\newenvironment}
112 %
113 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 %
115 % \title{Typesetting astrology with \textsf{horoscop}}
116 % \author{Matthew Skala}
117 % \date{July 31, 2020}
118 %
119 % \thispagestyle{empty}
120 % \phantomsection
121 % \mybookmark{section}{Title Page}
122 % {\centering
123 % \vspace{0.75in}
124 % {\Huge\scshape Typesetting}
125 %
126 % \vspace{2pc}
127 % {\Huge\scshape Astrology}
128 %
129 % \vspace{2pc}
130 % {\LARGE\itshape with}
131 %
132 % \vspace{2pc}
133 % {\Huge\sffamily horoscop}
134 %
135 % \vspace{3pc}
136 % {\Huge\docornament}
137 %
138 % \vspace{\fill}
139 % {\Large{\scshape Matthew Skala}\\
140 % \href{mailto:[email protected]}%
141 % {\nolinkurl{[email protected]}}}
142 %
143 % \vspace{0.5in}
144 % {\Large\itshape Version 1.01, July 31, 2020}
145 % \vspace{2.5pc}
146 % \par}
147 %
148 % \clearpage
149 % \changes{v1.0}{2020/07/20}{Make page after title page page 2 for clearer
150 % numbering in PDF}
151 % \phantomsection
152 % \mybookmark{section}{Contents}
153 % \tableofcontents
154 %
155 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 %
157 % \section{Introduction}
158 %
159 % \changes{v1.0}{2020/07/20}{General updates to intro after seven years}
160 % This document describes the design and use of a \LaTeX\ package named
161 % \textsf{horoscop}, which supports typesetting of astrological charts.
162 % Features include:
163 %
164 % \begin{itemize}
165 % \item A unified interface for astrological symbols/glyphs, supporting three
166 % different astrological fonts as well as text abbreviations and Unicode
167 % astrological symbol code points.
168 % \item Support for invoking Astrolog or Swiss Ephemeris to calculate
169 % charts. Positions can also be specified manually.
170 % \item Loading and saving object and cusp positions into \TeX\ macros.
171 % \item Typesetting of angles and positions as text.
172 % \item Ready-made templates for basic wheel charts, dial charts
173 % including multi-dials with up to four sets of objects, and decorative
174 % wheel charts.
175 % \item Optional variations of the standard templates: aspect webs,
176 % highlighting for angular cusps, choice of what to include in object
177 % labels, house labels inside the houses.
178 % \item Low-level graphics functions for plotting in polar coordinates and
179 % building new templates.
180 % \item Labels move, and where necessary houses expand, to prevent crowding.
181 % \end{itemize}
182 %
183 % This package is primarily typesetting software, not astrological software.
184 % It is capable of interfacing to external packages to calculate things like
185 % object positions for charts, and it performs astrological computations
186 % like detection of aspects where that is directly needed for typesetting,
187 % but it does not do more generally astrological tasks like counting the
188 % objects in different elements. Things like time zones are not directly
189 % relevant to typesetting and left to the user to deal with.
190 %
191 % Similarly, this documentation is about
192 % using \textsf{horoscop} to typeset charts into documents. It is assumed
193 % that readers have other sources for the astrological knowledge of what
194 % charts to typeset, what they mean, and what to say about them in the
195 % documents. Other software is probably more convenient for the earlier
196 % stages of exploring a chart and constructing an interpretation. This
197 % package becomes relevant after the interpretation is decided, when the time
198 % comes to publish a chart in an attractive printed form.
199 %
200 % Many issues in astrology are subject to opinion, debate, and variations in
201 % personal preference. Where possible, \textsf{horoscop} avoids enforcing
202 % any specific line on such things. When it is necessary to choose a
203 % default (for instance, whether to use \Capricorn\ or \varCapricorn\ for
204 % Capricorn) the system generally follows the author's preference with as
205 % much support for user customization as possible. The intention is to
206 % provide reasonably usable typeset charts---at least as good as the
207 % output of high-quality commercial charting software---right out of the
208 % box for users with minimal \LaTeX\ skill, and also provide the capability
209 % for advanced users to customize the system to meet their own exact needs.
210 %
211 % Some \LaTeX\ users have philosophical objections to the very idea of
212 % astrology. Such issues are not addressed here.
213 %
214 % Basic correctness is a design priority. Some other software will do
215 % things like typeset an object in the wrong house if there are too many
216 % objects in the right house for them to fit nicely; \textsf{horoscop}
217 % should never do that. The garbage in, garbage out principle applies,
218 % however, and \textsf{horoscop} is not responsible for problems occurring
219 % in external software; so if you ask for Placidus cusps from a birth in
220 % the Arctic Circle, \textsf{horoscop} will make its best effort to typeset
221 % whatever comes out of the calculation software but it will be your own
222 % fault if that is nonsense.
223 %
224 % I presented this package at TUG~2016, with a one-page summary in the
225 % conference proceedings: Skala, M. 2016. Astrological
226 % charts with \textsf{horoscop} and \textsf{starfont}.
227 % \emph{TUGboat,} 37(2):p.\ 182. Proceedings of the 37th Annual Meeting of
228 % the TeX Users Group (TUG 2016), Toronto, Ontario, July 25-27, 2016. A PDF
229 % of the summary is at \url{https://tug.org/TUGboat/tb37-2/tb116skala.pdf};
230 % a PDF of the slides from my talk is at
231 % \url{https://tug.org/tug2016/slides/skala.pdf}; and there is video of most
232 % of the presentation at
233 % \url{http://zeeba.tv/astrological-charts-with-horoscop-and-starfont/}.
234 %
235 % Version 1.0 represents a mature version of the package.
236 % The last release, version 0.92, was called a beta test, but it has
237 % been in use seven years now without needing any significant bug fixing or
238 % updates. The most serious issue in 0.92 was in the documentation of
239 % how to enter manually-calculated object positions; the underlying macros
240 % for it worked well.
241 %
242 % Version 1.0 was primarily an update to the documentation to fix that
243 % issue; unfortunately, it still wasn't correct, so 1.01 is meant to fix it for
244 % real this time. Version 1.0 made other documentation updates to recognize
245 % the fact that the package is mature and fully usable. I also took the
246 % opportunity to add the Unicode-symbols feature, to reduce
247 % \textsf{horoscop}'s ties to classical \TeX\ and its font systems as users
248 % increasingly move toward Unicode engines and Unicode-based font selection;
249 % and I have updated such things as Web links and development contacts to
250 % reflect the inevitable changes in human institutitons over the years.
251 %
252 % \changes{v1.0}{2020/07/20}{In memoriam Axel}
253 % I encourage readers to think of Axel Harvey, a close friend of mine and
254 % a professional astrologer who contributed greatly to the testing of this
255 % software and its associated Web service. He died in 2016, and is missed.
256 %
257 % \changes{v1.0}{2020/07/20}{New links for my own Web sites}
258 % There is an online chart service demonstrating \textsf{horoscop} at
259 % \href{https://edifyingfellowship.org/astro/}{\nolinkurl https://edifying}
260 % \href{https://edifyingfellowship.org/astro/}{\nolinkurl fellowship.org/astro/}.
261 % I also maintain a page pointing to \LaTeX\ astrology resources, at
262 % \url{https://ansuz.sooke.bc.ca/entry/107}.
263 %
264 % I no longer encourage the use of GitHub and it is unlikely that the
265 % existing GitHub repository for \textsf{horoscop} will be updated further.
266 % Bug reports and other correspondence related to \textsf{horoscop} should
267 % be directed to \href{mailto:[email protected]}%
268 % {\nolinkurl{[email protected]}}.
269 %
270 % As of 2016, I am no longer pursuing a career in academic computer science.
271 % I have started a business selling modules of my own design for
272 % Eurorack modular synthesizers, and kits for building them, through a Web
273 % storefront at \url{https://northcoastsynthesis.com/}. If you are
274 % interested in electronic music, please consider buying my products; if
275 % not, please pass on the link to others. My ability to spend time
276 % making free resources to share, such as the \textsf{horoscop} package,
277 % depends on the success of my business.
278 %
279 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
280 %
281 % \section{Prerequisites and Warnings}
282 %
283 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
284 %
285 % \subsection{Font Support}
286 %
287 % Typesetting astrological symbols (often called ``glyphs'')
288 % requires an appropriate font, packaged for \LaTeX. This package supports
289 % three, selectable by package options: \textsf{marvosym},
290 % \textsf{starfont}, and \textsf{wasysym}, none of which are included in a
291 % typical default \LaTeX\ installation. The \textsf{starfont} package is
292 % default and recommended, because the others have many symbols either
293 % missing or unsuitable.
294 % Instead of using an astrological font
295 % at all, the |textsym| option may be used to substitute abbreviations
296 % written in \LaTeX's ordinary text font, which should work in any
297 % \LaTeX\ environment; or the |unicode| option may
298 % \changes{v1.0}{2020/07/20}{\texttt{unicode} option}
299 % be used with \XeLaTeX\ or \LuaLaTeX\@. With |unicode|, \textsf{horoscop}
300 % will use Unicode code points for the astrological symbols and leave it up to
301 % the Unicode-supporting \TeX\ engine to typeset them in an appropriate font.
302 %
303 % Sources for astrological font packages:
304 % \changes{v0.92}{2013/05/16}{Update links for font packages}
305 % \changes{v1.0}{2020/07/20}{Upgrade links to HTTPS}
306 % \begin{itemize}
307 % \item \textsf{marvosym}: \url{https://ctan.org/pkg/marvosym}
308 % \item \textsf{starfont}: \url{https://ctan.org/pkg/starfont}
309 % \item \textsf{wasysym}: \url{https://ctan.org/pkg/wasysym}
310 % \end{itemize}
311 %
312 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
313 %
314 % \subsection{Chart Graphics}
315 %
316 % \changes{v0.92}{2013/05/15}{Use \textsf{pict2e} for graphics support}
317 % Typesetting astrological charts (which are distinct from symbols---you
318 % could use symbols in text without any charts, or conceivably charts
319 % without symbols) requires \textsf{pict2e} and
320 % \textsf{trig}; these \emph{are} typically included in \LaTeX\
321 % installations by default.
322 % An earlier version (predating the existence of \textsf{pict2e}) required
323 % \textsf{eepic}, and consequently \textsf{latex}/\textsf{dvips}, not
324 % \textsf{pdflatex}. But the long-promised \textsf{pict2e} package finally
325 % exists, allowing large circles and arbitrary-slope lines in the |picture|
326 % environment in many different engines, and that's a nicer solution.
327 %
328 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
329 %
330 % \subsection{External Programs}
331 %
332 % Calling an external program to compute chart information requires a
333 % suitable external program. At present, \textsf{horoscop} supports
334 % Astrolog and Swiss Ephemeris. It is possible to typeset charts without
335 % using this feature, by coding all the object locations into the \LaTeX\
336 % source file instead of having them calculated on the fly.
337 %
338 % \changes{v1.0}{2020/07/20}{Upgrade links to HTTPS}
339 % Sources for external calculation programs:
340 % \begin{itemize}
341 % \item Astrolog:
342 % \url{https://www.astrolog.org/astrolog.htm}
343 % \item Swiss Ephemeris:
344 % \url{https://www.astro.com/swisseph/}
345 % \end{itemize}
346 %
347 % {\em External calculation programs require |\write18| support in \TeX.}
348 % That is disabled by default, and should not be enabled lightly. With
349 % |\write18| support, \TeX\ documents can execute arbitrary commands on the
350 % host computer system, potentially giving them the ability to cause
351 % unlimited damage. No file containing data from an untrusted source should
352 % be run on an interpreter with |\write18| enabled. In particular, readers
353 % should be especially wary of using \textsf{horoscop} in automated
354 % chart-calculation services. If you create a Web form for people to enter
355 % birth data and automatically generate a \LaTeX\ source file to typeset a
356 % chart, then you must carefully sanitize all the user-entered data on the
357 % server side.
358 %
359 % The procedure for enabling |\write18| will vary depending on your
360 % \TeX\ installation; for obvious security reasons, it must be done out of
361 % band, and cannot be turned on by any commands given in the document. On a
362 % typical installation |\write18| might be enabled by a special command-line
363 % option to the \TeX\ interpreter. If you don't know what this stuff means
364 % and how to deal with it, then you shouldn't attempt to turn on |\write18|.
365 %
366 % The external calculation programs' shell commands have only been
367 % tested under Linux. They will probably work on any system where the
368 % external software can be installed, but no guarantees are offered.
369 %
370 % Users of \textsf{horoscop} should be aware of some issues related to the
371 % external calculation programs, although these issues are not directly
372 % issues with \textsf{horoscop}. First, the author of Astrolog \emph{claims}
373 % a right under copyright to forbid commercial use not only of Astrolog, but
374 % of the factual information contained in Astrolog's output. Noting that in
375 % many jurisdictions copyright does not apply to factual information, the
376 % author of \textsf{horoscop} does not endorse the validity of any such
377 % claims by third parties; and \textsf{horoscop} itself is public domain and
378 % may be used without restriction, even commercially. However, commercial
379 % users of \textsf{horoscop} may prefer to select the Swiss Ephemeris
380 % support, which is default and not subject to such a claim.
381 %
382 % The authors of Swiss Ephemeris restrict commercial distribution of their
383 % package, but do not claim to restrict commercial use of its output. Swiss
384 % Ephemeris is not intended by its developers to be an end-user product.
385 % They market it to other software developers for use as a module in the
386 % other developers' products. To use it with \textsf{horoscop}, you must
387 % install the library on your system as if you were preparing to write
388 % software using it yourself, and make sure all the paths are right so that
389 % \TeX\ can invoke the |swetest| executable and have it really work. This
390 % process will normally require at least a minimal level of C programming
391 % skill.
392 %
393 % Users are obviously at their own risk with regard to license conditions
394 % set by the copyright holders of any and all third-party products. The
395 % \textsf{horoscop} package itself is released to the public domain in an
396 % effort to help stop the insanity of escalating license conditions imposed
397 % by other authors of astrological software.
398 %
399 % To use the |egrep| option with the Swiss Ephemeris backend, the standard
400 % Unix |egrep| program must be available.
401 %
402 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
403 %
404 % \section{Package Options}
405 %
406 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
407 %
408 % \subsection{Astrological Symbol Options}
409 %
410 % The options |textsym|, |unicode|, |wasysym|, |marvosym|, and
411 % |starfont| control the
412 % font used for astrological symbols. You may choose more than one of these
413 % options, in which case more than one set will be available in your
414 % document. The set in force at the start of the document will be the last
415 % one on that list, from among the ones chosen; so |starfont| overrides
416 % |marvosym| which overrides |wasysym| which overrides |textsym|. If none
417 % of these options are specified, then |starfont| will be enabled by
418 % default.
419 %
420 % If you have no astrological font support, or will not be using symbols and
421 % want to avoid the resource consumption, choose |textsym| to prevent
422 % \textsf{horoscop} from trying to load the missing packages. The
423 % abbreviations defined by |textsym| (and the |\horotextsym| macro below)
424 % are available regardless of package options; |textsym| is provided as an
425 % explicit option so users can override the default loading of |starfont|.
426 % The abbreviations are also used to replace missing symbols in the other
427 % sets.
428 %
429 % \changes{v1.0}{2020/07/20}{\texttt{unicode} option}
430 % The |unicode| option is normally only useful in \XeLaTeX\ and \LuaLaTeX;
431 % it causes \textsf{horoscop} to use non-ASCII Unicode characters for
432 % astrological symbols. It is up to the \TeX\ engine, or the user, to
433 % select a font or combination of fonts in which these characters can be
434 % typeset. Both \XeLaTeX\ and \LuaLaTeX\ offer relevant font-selection
435 % features, and if \textsf{horoscop} detects (using the \textsf{iftex}
436 % package) some other engine, it will fall back to a text indication of
437 % the desired code points, which looks like $\langle$U+263D$\rangle$.
438 %
439 % \DescribeMacro{\horotextsym}
440 % \DescribeMacro{\horounicode}
441 % \DescribeMacro{\horowasysym}
442 % \DescribeMacro{\horomarvosym}
443 % \DescribeMacro{\horostarfont}
444 % The macros |\horotextsym|, |\horounicode|, |\horowasysym|,
445 % |\horomarvosym|, and |\horostarfont| switch to the corresponding set
446 % of astrological symbols,
447 % so that documents can mix the different sets. Any symbols not defined by
448 % the new set remain in the state left by the old set. To use these macros
449 % the corresponding symbol sets must have been loaded with the appropriate
450 % package options, except that |\horotextsym| is always available.
451 %
452 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
453 %
454 % \subsection{Calculation Backend Options}
455 %
456 % The \textsf{horoscop} package can get its chart information from either of
457 % two external calculation backends, or just use positions supplied by the
458 % user in macro definitions. The options |nocalc|, |astrolog|, and
459 % |swetest| choose among no backend (user must supply all positions),
460 % Astrolog, and the Swiss Ephemeris test program respectively. If more than
461 % one is supplied, |swetest| overrides |astrolog| which overrides |nocalc|.
462 % The default if none is specified will be |swetest|. Note that either
463 % external calculation program requires that the corresponding software be
464 % installed properly on the system and that |\write18| be turned on; see the
465 % previous chapter for instructions and warnings regarding external
466 % software.
467 %
468 % \changes{v0.91}{2008/07/07}{\texttt{egrep} filtering option}
469 % When using the |swetest| backend, it is possible to request filtering of
470 % |swetest|'s output via the |egrep| option. With this option, |swetest|'s
471 % output will be filtered through the |egrep| program (which must also be
472 % installed) to eliminate error and warning messages. Normally an error or
473 % warning from |swetest| will cause typesetting to fail with an
474 % uninformative message. This might occur for instance if the chart's date
475 % is not covered by the installed high-accuracy ephemeris files and Swiss
476 % Ephemeris reverts to its analytic model. Selecting |egrep| makes
477 % \textsf{horoscop} try harder to typeset the document, working through the
478 % error or warning with whatever numbers come out of |swetest|.
479 %
480 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
481 %
482 % \subsection{Optional Package Components}
483 %
484 % If this package will be used in a non-graphical document (for instance, to
485 % typeset text-based interpretations), it may be desirable to turn off the
486 % graphics support and avoid loading the graphics packages. That can be
487 % accomplished with the |nowheels| option. Similarly, the ready-made
488 % templates can be disabled with |notemplates|, which might be useful in
489 % documents that use user-defined templates exclusively. Selecting
490 % |nowheels| automatically causes |notemplates| to take effect also.
491 %
492 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
493 %
494 % \section{General Concepts}
495 %
496 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
497 %
498 % \subsection{Objects and Variables}
499 %
500 % Calculating and typesetting a chart requires keeping track of a number of
501 % pieces of information relating to luminaries, planets, asteroids, derived
502 % points, hypothetical bodies, and similar things. The pieces of
503 % information are referred to as ``variables'' and the things that have
504 % associated variables are collectively called ``objects.'' The values for
505 % variables are stored in macros named |\horo|\meta{object}\meta{variable};
506 % for instance, |\horoSunPos| represents the Sun's longitude. Numerical
507 % values should be stored in the macros as plain decimal numbers (with or
508 % without a fractional part, possibly negative where appropriate).
509 %
510 % \subsubsection{Objects}
511 % Standard object names include the luminaries and traditional planets Sun,
512 % Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto,
513 % and the asteroids Chiron, Ceres, Pallas, Juno, and Vesta. The asteroid
514 % Pallas is named that rather than common variations like ``Pallas Athena''
515 % because its IAU name is just Pallas. The Lunar North node, as calculated
516 % by Astrolog, is called NorthNode; with Swiss Ephemeris the names MeanNode
517 % and TrueNode are used instead.\footnote{Calling the osculating node
518 % ``true'' is deprecated, but too entrenched to override. The node is
519 % undefined except when the Moon is right on top of it, so the question is
520 % which of several reasonable assumptions to make when inventing a value in
521 % between those times, and there's no reason to privilege one choice over
522 % the others.} The Astrolog version will be whichever one Astrolog is
523 % configured to compute; on a default installation of Astrolog that is
524 % probably the mean version. The name Lilith refers to the Lunar apogee.
525 %
526 % \DescribeMacro{\horoobjects}
527 % Calculation and the chart templates use a macro called |\horoobjects|,
528 % which lists the names (comma separated) of all the objects to compute or
529 % typeset. The default value is all the object names defined in the
530 % previous paragraph except that only one North node will be used: NorthNode
531 % for Astrolog and MeanNode for Swiss Ephemeris. To exclude some objects,
532 % or choose a different node calculation, the user can redefine
533 % |\horoobjects| to the desired list of objects. Note that this macro, like
534 % the variable values, is used and parsed internally and so it should not be
535 % given a smart value; it should just be a simple list of names separated by
536 % commas. No whitespace either, please.
537 %
538 % It is possible to create additional objects by defining the appropriate
539 % macros and adding the new names to the |\horoobjects| macro. An example
540 % of this process is given in Section~\ref{sub:adding-objects}. The Swiss
541 % Ephemeris backend will also automatically calculate objects called
542 % Ascendant, MC, ARMC, and Vertex; these four get calculated every time you
543 % calculate a chart whether you request them in |\horoobjects| or not.
544 %
545 % \subsubsection{Cusps}
546 % House\DescribeMacro{\horocusps}
547 % \ cusps are treated very much like additional objects with the names
548 % CuspI, CuspII, up to CuspXII. Like objects from |\horoobjects|, each cusp
549 % has an associated set of variables in macros with names like
550 % |\horoCuspIPos|. The macro |\horocusps| lists the cusps, like
551 % |\horoobjects|, but in general it should not be modified. Cusps will be
552 % calculated and used as appropriate; in general they should not be added to
553 % |\horoobjects|. In most present-day house systems, CuspI, CuspIV,
554 % CuspVII, and CuspX coincide with the ascendant, nadir, descendant, and
555 % zenith respectively. For systems where that is not the case, Swiss
556 % Ephemeris users may want to add Ascendant and MC to |\horoobjects| to plot
557 % those on the chart as additional objects.
558 %
559 % \subsubsection{Variables}
560 % The variable Pos, associated with every object and cusp, has already been
561 % mentioned. It represents the longitude of the object or cusp, measured in
562 % decimal degrees starting from 0\horodegrees\AriesSymbol=0.0. On that scale
563 % 0\horodegrees\TaurusSymbol=30.0, 0\horodegrees\GeminiSymbol=60.0, and so on.
564 %
565 % The variable DPos represents ``display Pos''; that is the actual location
566 % where the label or line representing an object or cusp will be plotted,
567 % which might not be the same as its Pos if it had to be moved to prevent
568 % interference with another object or cusp.
569 %
570 % Vel represents an object's velocity, in longitude. This should be in
571 % degrees per day, but the system actually only looks at its sign: positive
572 % for direct and negative for retrograde. The calculation backends
573 % calculate it along with Pos and the chart templates check for it to
574 % determine whether to display a \horoRetrogradeSymbol\ symbol in the label.
575 %
576 % Variables called MPos, MDPos, and SPos are used internally by
577 % \textsf{horoscop} code to represent house midpoints, display positions of
578 % internal house labels, and saved position values for checking termination
579 % of the adjustment cycle. It should not be necessary for users to touch
580 % these. Use of a user-defined variable called XPos is demonstrated in
581 % Section~\ref{sub:between-two}.
582 %
583 % The Symbol macros (described in the next section) are much like variables,
584 % although they have slightly different naming and do not take numeric
585 % values. The |\horo|\meta{object}|SEOpt| macros used by the Swiss
586 % Ephemeris calculation backend are essentially string-valued
587 % variables too. Their use is explained in Section~\ref{sub:adding-objects}.
588 %
589 % \DescribeMacro{\horocopyvar}
590 % The |\horocopyvar|\marg{objects}\marg{from}\marg{to} macro copies the
591 % \meta{from} variable to the \meta{to} variable on all the objects in the
592 % comma-separated list given by \meta{objects}. That operation is often
593 % used internally, and exposed to the user because it is occasionally useful
594 % to users also. For instance, if you set up the Pos values for your charts
595 % manually with |\def|,\footnote{It is traditional to warn readers to use
596 % \texttt{\textbackslash newcommand} or \texttt{\textbackslash renewcommand}
597 % instead of \texttt{\textbackslash def}.} then you must
598 % put the same values into DPos before invoking a chart template that
599 % will attempt label adjustment. The command
600 % |\horocopyvar{\horoobjects}{Pos}{DPos}| will copy all the Pos variables for
601 % objects in |\horoobjects| to the corresponding DPos variables.
602 %
603 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
604 %
605 % \subsection{Symbols}
606 %
607 % \subsubsection{Naming scheme}
608 %
609 % For every object there should be a symbol or glyph in a macro named
610 % |\|\meta{object}|Symbol|. Note the absence of |horo| at the start of the
611 % macro name; that's to save typing because these macros are probably of
612 % interest in general text outside the context of \textsf{horoscop}'s chart
613 % features, and to separate the Symbol variable-like thing from real
614 % variables that have numeric values.
615 %
616 % There are four basic sets of symbols, based on three font packages and the
617 % |textsym| option of using text abbreviations. See the package options
618 % discussion above for a description of how the choice between symbol sets
619 % is made. Some of the font packages are incomplete, and \textsf{horoscop}
620 % will attempt to make substitutions to fill in the blanks. Users can
621 % redefine the macros as needed, to use symbols from other fonts or for
622 % instance if it's desired to use \varCapricorn\ instead of \Capricorn\ for
623 % Capricorn (\textsf{starfont} provides both).
624 %
625 % The main use of these is for wheel charts, where you specify a list of
626 % objects and they all get typeset into the chart. It's necessary to
627 % provide a user-defined |\|\meta{object}|Symbol| for any new objects you
628 % add, if those objects will be typeset into wheel charts. The symbols can
629 % also be used by themselves in text. Note that \textsf{horoscop} will
630 % always invoke these symbols in text mode; if the desired symbol is a
631 % math-mode symbol, then the macro has to include the appropriate shift to
632 % math mode.
633 %
634 % \subsubsection{Zodiac signs}
635 %
636 % \DescribeMacro{\Zodiac}
637 % The system provides a |\Zodiac|\marg{sign} macro, whose parameter
638 % \meta{sign} should be an integer from 1 to 12 choosing the sign from
639 % Aries=1 to Pisces=12; this typesets the symbol for the appropriate sign.
640 % It mimics, and replaces, the similar macro provided by \textsf{marvosym}
641 % and \textsf{starfont}; instead of going directly to the font characters,
642 % \textsf{horoscop}'s |\Zodiac| calls the appropriate macro from
643 % |\AriesSymbol|\ldots|\PiscesSymbol|, allowing the user to redefine
644 % individual sign symbols without needing to redefine all of |\Zodiac|.
645 % Note that all use of sign symbols by \textsf{horoscop} (for instance, in
646 % chart wheel labels) goes through |\Zodiac|, so it is possible to redefine
647 % the entire zodiac by redefining |\Zodiac| instead of redefining individual
648 % symbols.
649 %
650 % {\setlength{\tabcolsep}{0.2em}
651 % \begin{tabular}{lccccc}
652 % macro & |textsym| & |unicode| & |wasysym| & |marvosym| & |starfont| \\
653 % |\AriesSymbol| & \horotextsym\AriesSymbol
654 % & \horounicode\AriesSymbol
655 % & \horowasysym\AriesSymbol
656 % & \horomarvosym\AriesSymbol
657 % & \horostarfont\AriesSymbol \\
658 % |\TaurusSymbol| & \horotextsym\TaurusSymbol
659 % & \horounicode\TaurusSymbol
660 % & \horowasysym\TaurusSymbol
661 % & \horomarvosym\TaurusSymbol
662 % & \horostarfont\TaurusSymbol \\
663 % |\GeminiSymbol| & \horotextsym\GeminiSymbol
664 % & \horounicode\GeminiSymbol
665 % & \horowasysym\GeminiSymbol
666 % & \horomarvosym\GeminiSymbol
667 % & \horostarfont\GeminiSymbol \\
668 % |\CancerSymbol| & \horotextsym\CancerSymbol
669 % & \horounicode\CancerSymbol
670 % & \horowasysym\CancerSymbol
671 % & \horomarvosym\CancerSymbol
672 % & \horostarfont\CancerSymbol \\
673 % |\LeoSymbol| & \horotextsym\LeoSymbol
674 % & \horounicode\LeoSymbol
675 % & \horowasysym\LeoSymbol
676 % & \horomarvosym\LeoSymbol
677 % & \horostarfont\LeoSymbol \\
678 % |\VirgoSymbol| & \horotextsym\VirgoSymbol
679 % & \horounicode\VirgoSymbol
680 % & \horowasysym\VirgoSymbol
681 % & \horomarvosym\VirgoSymbol
682 % & \horostarfont\VirgoSymbol \\
683 % |\LibraSymbol| & \horotextsym\LibraSymbol
684 % & \horounicode\LibraSymbol
685 % & \horowasysym\LibraSymbol
686 % & \horomarvosym\LibraSymbol
687 % & \horostarfont\LibraSymbol \\
688 % |\ScorpioSymbol| & \horotextsym\ScorpioSymbol
689 % & \horounicode\ScorpioSymbol
690 % & \horowasysym\ScorpioSymbol
691 % & \horomarvosym\ScorpioSymbol
692 % & \horostarfont\ScorpioSymbol \\
693 % |\SagittariusSymbol| & \horotextsym\SagittariusSymbol
694 % & \horounicode\SagittariusSymbol
695 % & \horowasysym\SagittariusSymbol
696 % & \horomarvosym\SagittariusSymbol
697 % & \horostarfont\SagittariusSymbol \\
698 % |\CapricornSymbol| & \horotextsym\CapricornSymbol
699 % & \horounicode\CapricornSymbol
700 % & \horowasysym\CapricornSymbol
701 % & \horomarvosym\CapricornSymbol
702 % & \horostarfont\CapricornSymbol \\
703 % |\AquariusSymbol| & \horotextsym\AquariusSymbol
704 % & \horounicode\AquariusSymbol
705 % & \horowasysym\AquariusSymbol
706 % & \horomarvosym\AquariusSymbol
707 % & \horostarfont\AquariusSymbol \\
708 % |\PiscesSymbol| & \horotextsym\PiscesSymbol
709 % & \horounicode\PiscesSymbol
710 % & \horowasysym\PiscesSymbol
711 % & \horomarvosym\PiscesSymbol
712 % & \horostarfont\PiscesSymbol
713 % \end{tabular}}
714 %
715 % \subsubsection{Luminaries and traditional planets}
716 %
717 % These are well-supported by the various fonts.
718 %
719 % {\setlength{\tabcolsep}{0.2em}
720 % \begin{tabular}{lccccc}
721 % macro & |textsym| & |unicode| & |wasysym| & |marvosym| & |starfont| \\
722 % |\SunSymbol| & \horotextsym\SunSymbol
723 % & \horounicode\SunSymbol
724 % & \horowasysym\SunSymbol
725 % & \horomarvosym\SunSymbol
726 % & \horostarfont\SunSymbol \\
727 % |\MoonSymbol| & \horotextsym\MoonSymbol
728 % & \horounicode\MoonSymbol
729 % & \horowasysym\MoonSymbol
730 % & \horomarvosym\MoonSymbol
731 % & \horostarfont\MoonSymbol \\
732 % |\MercurySymbol| & \horotextsym\MercurySymbol
733 % & \horounicode\MercurySymbol
734 % & \horowasysym\MercurySymbol
735 % & \horomarvosym\MercurySymbol
736 % & \horostarfont\MercurySymbol \\
737 % |\VenusSymbol| & \horotextsym\VenusSymbol
738 % & \horounicode\VenusSymbol
739 % & \horowasysym\VenusSymbol
740 % & \horomarvosym\VenusSymbol
741 % & \horostarfont\VenusSymbol \\
742 % |\MarsSymbol| & \horotextsym\MarsSymbol
743 % & \horounicode\MarsSymbol
744 % & \horowasysym\MarsSymbol
745 % & \horomarvosym\MarsSymbol
746 % & \horostarfont\MarsSymbol \\
747 % |\JupiterSymbol| & \horotextsym\JupiterSymbol
748 % & \horounicode\JupiterSymbol
749 % & \horowasysym\JupiterSymbol
750 % & \horomarvosym\JupiterSymbol
751 % & \horostarfont\JupiterSymbol \\
752 % |\SaturnSymbol| & \horotextsym\SaturnSymbol
753 % & \horounicode\SaturnSymbol
754 % & \horowasysym\SaturnSymbol
755 % & \horomarvosym\SaturnSymbol
756 % & \horostarfont\SaturnSymbol \\
757 % |\UranusSymbol| & \horotextsym\UranusSymbol
758 % & \horounicode\UranusSymbol
759 % & \horowasysym\UranusSymbol
760 % & \horomarvosym\UranusSymbol
761 % & \horostarfont\UranusSymbol \\
762 % |\NeptuneSymbol| & \horotextsym\NeptuneSymbol
763 % & \horounicode\NeptuneSymbol
764 % & \horowasysym\NeptuneSymbol
765 % & \horomarvosym\NeptuneSymbol
766 % & \horostarfont\NeptuneSymbol \\
767 % |\PlutoSymbol| & \horotextsym\PlutoSymbol
768 % & \horounicode\PlutoSymbol
769 % & \horowasysym\PlutoSymbol
770 % & \horomarvosym\PlutoSymbol
771 % & \horostarfont\PlutoSymbol
772 % \end{tabular}}
773 %
774 % \subsubsection{Other objects, cusps, and angles}
775 % The \textsf{starfont} package provides symbols for asteroids, derived
776 % points, angles, and so on. Without it, these things default to the
777 % |textsym| abbreviations. The |unicode| option also has code points for
778 % these. Cusp symbols are listed in this table, but they
779 % generally do not appear in the default templates and will seldom be used
780 % in actual practice.
781 %
782 % {\setlength{\tabcolsep}{0.2em}
783 % \begin{tabular}{lccc}
784 % macro & |textsym| & |unicode| &|starfont| \\
785 % |\ChironSymbol| & \horotextsym\ChironSymbol
786 % & \horounicode\ChironSymbol
787 % & \horostarfont\ChironSymbol \\
788 % |\CeresSymbol| & \horotextsym\CeresSymbol
789 % & \horounicode\CeresSymbol
790 % & \horostarfont\CeresSymbol \\
791 % |\PallasSymbol| & \horotextsym\PallasSymbol
792 % & \horounicode\PallasSymbol
793 % & \horostarfont\PallasSymbol \\
794 % |\JunoSymbol| & \horotextsym\JunoSymbol
795 % & \horounicode\JunoSymbol
796 % & \horostarfont\JunoSymbol \\
797 % |\VestaSymbol| & \horotextsym\VestaSymbol
798 % & \horounicode\VestaSymbol
799 % & \horostarfont\VestaSymbol \\
800 % |\NorthNodeSymbol| & \horotextsym\NorthNodeSymbol
801 % & \horounicode\NorthNodeSymbol
802 % & \horostarfont\NorthNodeSymbol \\
803 % |\SouthNodeSymbol| & \horotextsym\SouthNodeSymbol
804 % & \horounicode\SouthNodeSymbol
805 % & \horostarfont\SouthNodeSymbol \\
806 % |\LilithSymbol| & \horotextsym\LilithSymbol
807 % & \horounicode\LilithSymbol
808 % & \horostarfont\LilithSymbol \\
809 % |\CuspISymbol| & \horotextsym\CuspISymbol
810 % & & \horostarfont\CuspISymbol \\
811 % |\CuspIISymbol| & \horotextsym\CuspIISymbol & \\
812 % |\CuspIIISymbol| & \horotextsym\CuspIIISymbol & \\
813 % |\CuspIVSymbol| & \horotextsym\CuspIVSymbol
814 % & & \horostarfont\CuspIVSymbol \\
815 % |\CuspVSymbol| & \horotextsym\CuspVSymbol & \\
816 % |\CuspVISymbol| & \horotextsym\CuspVISymbol & \\
817 % |\CuspVIISymbol| & \horotextsym\CuspVIISymbol
818 % & & \horostarfont\CuspVIISymbol \\
819 % |\CuspVIIISymbol| & \horotextsym\CuspVIIISymbol & \\
820 % |\CuspIXSymbol| & \horotextsym\CuspIXSymbol & \\
821 % |\CuspXSymbol| & \horotextsym\CuspXSymbol
822 % & & \horostarfont\CuspXSymbol \\
823 % |\CuspXISymbol| & \horotextsym\CuspXISymbol & \\
824 % |\CuspXIISymbol| & \horotextsym\CuspXIISymbol & \\
825 % |\AscendantSymbol| & \horotextsym\AscendantSymbol
826 % & & \horostarfont\AscendantSymbol \\
827 % |\MCSymbol| & \horotextsym\MCSymbol
828 % & & \horostarfont\MCSymbol \\
829 % |\VertexSymbol| & \horotextsym\VertexSymbol
830 % & & \horostarfont\VertexSymbol \\
831 % \end{tabular}}
832 %
833 % Note that \textsf{wasysym} provides a symbol it calls |\ascnode|, but it's
834 % actually identical to the symbol it calls |\leo|, and the symbol (\leo)
835 % looks more like a Leo symbol; to prevent insanity, \textsf{horoscop} won't
836 % use that symbol for the node unless you force the issue by redefining
837 % |\NorthNodeSymbol|. The corresponding |\descnode| symbol is just the Leo
838 % symbol again, turned upside-down; it is aesthetically offensive enough
839 % that it also won't be used for South node by default.
840 %
841 % \DescribeMacro{\MeanNodeSymbol}\DescribeMacro{\TrueNodeSymbol} There are
842 % no well-agreed standard symbols for ``mean'' as opposed to ``true''
843 % (osculating) definitions of the Lunar nodes. The macros |\MeanNodeSymbol|
844 % and |\TrueNodeSymbol| by default typeset the current value of
845 % |\NorthNodeSymbol| with a subscript $M$ or $T$, as \MeanNodeSymbol\ and
846 % \TrueNodeSymbol.
847 %
848 % Note that the default symbols for cusps assume an angular house system
849 % like that attributed to Placidus, in which the first house cusp is by
850 % definition equal to the ascendant, and so on. If you use a house system
851 % where that isn't true, and you will typeset symbols for the house cusps,
852 % then you must manually define appropriate symbols for them distinct from
853 % whatever symbols you are using for the actual angles. However, it's rare
854 % to need symbols for house cusps at all. Most wheel charts don't use them.
855 %
856 % \subsubsection{Aspects}
857 % When typesetting aspect webs, macros having names of the form
858 % |\horo|\meta{aspect}|Symbol| will be used to print symbols identifying the
859 % aspects at the middle of each aspect line. These have the |\horo| prefix
860 % to keep them separated from the object symbols. If you define custom
861 % aspects, you should define corresponding symbols in the same pattern. The
862 % \textsf{marvosym} package does not define any aspect symbols (defaults to
863 % |textsym|), and \textsf{wasysym} only defines a few. The symbols for
864 % quintile and biquintile with \textsf{starfont}, and the one for trine with
865 % \textsf{wasysym}, are
866 % actually made from standard \LaTeX\ symbols rather than using the named
867 % fonts. The table
868 % below also shows the default angles and orbs for the aspects; see
869 % Subsection~\ref{sub:aspect-web}.
870 %
871 % \noindent{\setlength{\tabcolsep}{0.1em}
872 % \begin{tabular}{lccccc}
873 % macro & |textsym| & |unicode| & |wasysym| & |starfont| & angle\\
874 % |\horoConjunctionSymbol| & \horotextsym\horoConjunctionSymbol
875 % & \horounicode\horoConjunctionSymbol
876 % & \horowasysym\horoConjunctionSymbol
877 % & \horostarfont\horoConjunctionSymbol & $0\horodegrees\pm6\horodegrees$ \\
878 % |\horoOppositionSymbol| & \horotextsym\horoOppositionSymbol
879 % & \horounicode\horoOppositionSymbol
880 % & \horowasysym\horoOppositionSymbol
881 % & \horostarfont\horoOppositionSymbol & $180\horodegrees\pm6\horodegrees$ \\
882 % |\horoTrineSymbol| & \horotextsym\horoTrineSymbol
883 % & \horounicode\horoTrineSymbol
884 % & \horowasysym\horoTrineSymbol
885 % & \horostarfont\horoTrineSymbol & $120\horodegrees\pm5\horodegrees$ \\
886 % |\horoSquareSymbol| & \horotextsym\horoSquareSymbol
887 % & \horounicode\horoSquareSymbol
888 % & \horowasysym\horoSquareSymbol
889 % & \horostarfont\horoSquareSymbol & $90\horodegrees\pm5\horodegrees$ \\
890 % |\horoQuintileSymbol| & \horotextsym\horoQuintileSymbol
891 % & & & \horostarfont\horoQuintileSymbol & $72\horodegrees\pm2\horodegrees$ \\
892 % |\horoBiquintileSymbol| & \horotextsym\horoBiquintileSymbol
893 % & & & \horostarfont\horoBiquintileSymbol & $144\horodegrees\pm2\horodegrees$ \\
894 % |\horoSextileSymbol| & \horotextsym\horoSextileSymbol
895 % & \horounicode\horoSextileSymbol
896 % & \horowasysym\horoSextileSymbol
897 % & \horostarfont\horoSextileSymbol & $60\horodegrees\pm4\horodegrees$ \\
898 % |\horoQuincunxSymbol| & \horotextsym\horoQuincunxSymbol
899 % & \horounicode\horoQuincunxSymbol
900 % & & \horostarfont\horoQuincunxSymbol & $150\horodegrees\pm3\horodegrees$ \\
901 % |\horoSemisextileSymbol| & \horotextsym\horoSemisextileSymbol
902 % & \horounicode\horoSemisextileSymbol
903 % & & \horostarfont\horoSemisextileSymbol & $30\horodegrees\pm3\horodegrees$ \\
904 % |\horoSemisquareSymbol| & \horotextsym\horoSemisquareSymbol
905 % & \horounicode\horoSemisquareSymbol
906 % & & \horostarfont\horoSemisquareSymbol & $45\horodegrees\pm2\horodegrees$ \\
907 % |\horoSesquiquadrateSymbol| & \horotextsym\horoSesquiquadrateSymbol
908 % & \horounicode\horoSesquiquadrateSymbol
909 % & & \horostarfont\horoSesquiquadrateSymbol & $135\horodegrees\pm2\horodegrees$
910 % \end{tabular}}
911 %
912 % \subsubsection{Text angle and direction symbols}
913 % \DescribeMacro{\horodegrees}
914 % \DescribeMacro{\horominutes}
915 % \DescribeMacro{\horoseconds}
916 % Symbols for degrees, minutes, and seconds (|\horodegrees|, |\horominutes|,
917 % and |\horoseconds|) are provided for use when an
918 % angle will be described numerically, as in 12\horodegrees 34\horominutes
919 % 56\horoseconds. As with other symbols, the macros can be redefined to
920 % change \textsf{horoscop}'s behaviour. These three use standard \LaTeX\
921 % math symbols and do not require any special package support.
922 %
923 % \DescribeMacro{\horoRetrogradeSymbol}
924 % The |\horoRetrogradeSymbol| macro is in a similar category: it will be
925 % used to typeset ``retrograde'' for labels that display that information.
926 %
927 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
928 %
929 % \section{Calculating Horoscopes}
930 %
931 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
932 %
933 % \subsection{Entering Chart Data}
934 %
935 % Before erecting a chart we need the astrological locations of all the
936 % objects to be included. The \textsf{horoscop} package is not primarily a
937 % chart-computing system, but it can interface with other software to do the
938 % computation. The external interface takes the time and location data from
939 % macros named \DescribeMacro{\horocalcyear}|\horocalcyear|,
940 % \DescribeMacro{\horocalcmonth}|\horocalcmonth|,
941 % \DescribeMacro{\horocalcday}|\horocalcday|,
942 % \DescribeMacro{\horocalctime}|\horocalctime|,
943 % \DescribeMacro{\horocalclon}|\horocalclon|,
944 % and \DescribeMacro{\horocalclat}|\horo|-|calclat|, which should be
945 % defined to contain the year, month, day, time, longitude, and latitude
946 % respectively. Each one should be a decimal number, with only whole
947 % numbers for year and month; |\horocalctime| is the number of hours from
948 % midnight (so that a time like 4:30pm would be 16.5); and longitude and
949 % latitude are numbers of degrees. Use positive numbers for North and East
950 % and negative for South and West. Times and dates must be UTC. For
951 % example, the birth data for Uri Geller could be entered as follows.
952 %
953 % \begin{verbatim}
954 % \renewcommand{\horocalcyear}{1946}
955 % \renewcommand{\horocalcmonth}{12}
956 % \renewcommand{\horocalcday}{20}
957 % \renewcommand{\horocalctime}{0}
958 % \renewcommand{\horocalclon}{34.76667}
959 % \renewcommand{\horocalclat}{32.06667}
960 % \end{verbatim}
961 %
962 % Setting all those macros one at a time is messy and inconvenient, so a
963 % simplified interface is available through the
964 % \DescribeMacro{\horocalcparms}|\horocalcparms| macro, which sets them all
965 % at once and translates minutes and seconds, both of time and of arc.
966 % \begin{verbatim}
967 % \horocalcparms{1946}{12}{20}{0:0:0}{E34:46:0}{N32:4:0}
968 % \end{verbatim}
969 % Although this macro is slightly more forgiving than the lower-level ones,
970 % one should nonetheless stick closely to the example format. In
971 % particular, do not omit the minutes and seconds even when they are zero.
972 %
973 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
974 %
975 % \subsection{Calculating Object Positions}
976 %
977 % Once the chart data is defined, call
978 % \DescribeMacro{\horocalculate}|\horocalculate| to invoke the external
979 % calculation program and actually compute the object positions. As already
980 % mentioned, this requires |\write18| support in your \TeX\ interpreter,
981 % which is not the default and should not be turned on without caution.
982 %
983 % The exact mechanics of chart calculation depend on the backend selected.
984 % With Swiss Ephemeris, which is the default, the package runs the ``test''
985 % program |swetest| once for each object and once more for all cusps, with
986 % the standard-output results directed into a |.hor| file which it will read
987 % in to get the data. With Astrolog, the |astrolog| program is run once and
988 % told to save its results directly to the |.hor| file as if to be read as
989 % options by a later invocation of Astrolog. Then the package reads that
990 % and parses the (undocumented) Astrolog command-line format to get the
991 % results.
992 %
993 % Either way, the |\horoobjects| macro already described determines the list
994 % of objects whose positions will be calculated, and the positions go into
995 % the variables Pos (longitude), DPos (initially equal to longitude, but
996 % subject to later adjustment), and Vel (velocity). Pos and DPos are
997 % measured from 0\horodegrees\AriesSymbol. Vel is degrees per day, positive
998 % for direct and negative for retrograde. Similar Pos and DPos
999 % values are calculated for the cusp pseudo-objects CuspI, CuspII, and so on
1000 % (listed in |\horocusps|). In the case of Swiss Ephemeris, some extra
1001 % pseudo-objects (Ascendant, MC, ARMC, and Vertex) are always calculated
1002 % too.
1003 %
1004 % The house system used in the calculation can be set by invoking a macro
1005 % named like |\horo|\meta{system}|Houses| before calling |\horocalculate|.
1006 % The default for both backends is |\horoPlacidusHouses|. Astrolog supports
1007 % systems called Alcabitus, Campanus, Equal, EqualMC, Koch, Meridian,
1008 % Morinus, NeoPorphyry, Placidus, PolichPage, Porphyry, Regiomontanus,
1009 % Vedic, and Whole. Swiss Ephemeris supports systems called Alcabitus,
1010 % Axial, Azimuthal, Campanus, Equal, Koch, Krusinski, Morinus, Placidus,
1011 % PolichPage, Porphyry, Regiomontanus, and Vehlow. Consult the external
1012 % software's documentation for details of these systems.
1013 %
1014 % \changes{v0.91}{2008/08/30}{Documentation on equal-house systems}
1015 % Please note that despite the inclusion of non-angular house systems like
1016 % Equal among the choices for the Astrolog backend, their actual utility is
1017 % severely limited because Astrolog overloads two objects it calls ``Asc''
1018 % and ``Mid'' to serve as both angles and house cusps; Asc can be the first
1019 % house cusp, but then Astrolog will not write out the Ascendant, or it can
1020 % be the Ascendant, but then Astrolog will not write out the first house
1021 % cusp. A future version of this package will probably solve this issue by
1022 % running Astrolog twice to get out both pieces of information. Another
1023 % possibility would be to tell Astrolog to write out the angles, and then
1024 % derive the first and tenth house cusps by calculating points opposite the
1025 % seventh and fourth house cusps (which always seem to be house cusps rather
1026 % than angles). Such a change might also be an opportunity to fix the
1027 % annoying differences between the Astrolog and Swiss Ephemeris backends, as
1028 % far as possible. In the mean time, the recommendation for Astrolog users who
1029 % want equal houses is to select Porphyry (as a system that uses the
1030 % Ascendant and Midheaven and does not break down near the poles) and then
1031 % compute house cusps internally to \textsf{horoscop} as described below,
1032 % rather than attempting to use Astrolog's calculation. Note that the
1033 % object names for the Ascendant and Midheaven will be CuspI and CuspX, not
1034 % the Swiss Ephemeris names used in the examples.
1035 %
1036 % It is possible for \textsf{horoscop} to calculate its own house cusps
1037 % internally, to provide equal-sized houses starting from any position. Use
1038 % \DescribeMacro{\horomakeequalcusps}|\horomakeequalcusps| to make twelve
1039 % cusps spaced equally (30\horodegrees\ apart) with CuspI set to the single
1040 % argument. For instance, if using |swetest|, which calculates an object
1041 % called Ascendant automatically, you can use
1042 % |\horomakeequalcusps{\horoAscendantPos}| to make equal houses starting
1043 % from the Ascendant, simulating the ``Equal'' house system that actually is
1044 % already provided anyway. That particular application may seem pointless;
1045 % but the feature can also be used with any other object to create house
1046 % systems unavailable from the backend. Someone who wanted to drop the
1047 % concept of houses entirely, as for an unknown birth time, but still use a
1048 % chart template that shows houses, might use |\horomakecusps{0}| to make
1049 % houses equivalent to signs (Aries=first, Taurus=second, and so on).
1050 %
1051 % The |\horomakeequalcusps| macro should be called after |\horocalculate| if
1052 % it is to take effect, because they overwrite each others' house cusp
1053 % results. Any house system may be used for the original |\horocalculate|
1054 % call because the results will be discarded anyway, except for the concern
1055 % that a broken house calcuation in |\horocalculate| (for instance, using
1056 % polar latitudes with Placidus and without the |egrep| option) may cause
1057 % typesetting of the whole document to fail.
1058 %
1059 % A similar macro, \DescribeMacro{\horomakesigncusps}|\horomakesigncusps|,
1060 % makes equally-spaced cusps just like |\horomakeequalcusps| (in fact, using
1061 % a call to it) but starting from the start of the sign that contains the
1062 % argument value instead of starting at the argument value itself. This is
1063 % useful for creating historical whole-sign systems. See also the use of
1064 % |\horoshiftcusps| described in section~\ref{sub:manipulation} for ways to
1065 % expand this feature to (for instance) simulate the Vehlow equal-house
1066 % system, or base the system on the location of a cusp other than the first.
1067 %
1068 % Note that in all cases \textsf{horoscop} follows the common astrological
1069 % practice of computing house cusps based on the intersections of the house
1070 % boundaries with the ecliptic and then placing objects into houses based
1071 % solely on their longitude. In effect, the assumption is that all objects
1072 % are located exactly on the ecliptic. For some house systems (with
1073 % boundaries that do not follow lines of longitude) it can be argued that it
1074 % would be better to assign house positions in a way that takes latitude
1075 % into account. See the article ``The Problems of House Division'' by
1076 % Deborah Houlding, available online at
1077 % \changes{v1.0}{2020/07/20}{Upgrade links to HTTPS}
1078 % \url{https://www.skyscript.co.uk/houprob_print.html}, for more discussion
1079 % of this issue. In some future version \textsf{horoscop} may be extended
1080 % to provide more options for handling of this kind of thing.
1081 %
1082 % Note also that in some house systems, the angles (\CuspISymbol,
1083 % \CuspVIISymbol, \CuspXSymbol, and \CuspIVSymbol) do not coincide with
1084 % house cusps, and in such cases you may wish to compute and chart them as
1085 % extra objects.
1086 %
1087 % \DescribeMacro{\horoastrologopt}
1088 % \DescribeMacro{\horosweopt}
1089 % The macros |\horoastrologopt| and |\horosweopt| define extra command-line
1090 % options for the external calculation programs (Astrolog and |swetest|
1091 % respectively). These default to empty, but may be redefined to pass
1092 % global configuration settings to these programs.
1093 %
1094 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1095 %
1096 % \subsection{Entering Positions Manually}
1097 %
1098 % If it is not desired to compute the positions with \textsf{horoscop}'s
1099 % external program interface, they can be entered manually instead. This
1100 % approach might be useful if you use other software to do your
1101 % calculations, or if you need to create \TeX\ source that will run on a
1102 % system without the external calculation software installed. The macros
1103 % that would be created by |\horocalculate| simply need to be created
1104 % directly, as in the example below.
1105 %
1106 % \changes{v1.0}{2020/07/20}{Correct macro names for manual position example}
1107 % \changes{v1.01}{2020/07/31}{Correct macro names for manual position example, again}
1108 % \begin{verbatim}
1109 % \def\horoSunPos{267.5002492}\def\horoSunVel{1.0185515}
1110 % \def\horoMoonPos{229.2067659}\def\horoMoonVel{11.9237313}
1111 % \def\horoMercuryPos{249.2355412}\def\horoMercuryVel{1.4004420}
1112 % \def\horoVenusPos{229.6610785}\def\horoVenusVel{0.4165367}
1113 % \def\horoMarsPos{271.9242409}\def\horoMarsVel{0.7571908}
1114 % \def\horoJupiterPos{228.1368358}\def\horoJupiterVel{0.1927896}
1115 % \def\horoSaturnPos{128.1056809}\def\horoSaturnVel{-0.0516070}
1116 % \def\horoUranusPos{79.4428694}\def\horoUranusVel{-0.0421386}
1117 % \def\horoNeptunePos{190.6482218}\def\horoNeptuneVel{0.0133648}
1118 % \def\horoPlutoPos{133.0955746}\def\horoPlutoVel{-0.0150157}
1119 % \def\horoNorthNodePos{70.7814892}\def\horoNorthNodeVel{-0.0529425}
1120 % \def\horoLilithPos{265.3475147}\def\horoLilithVel{0.1108368}
1121 % \def\horoCuspIPos{207.9120843}
1122 % \def\horoCuspIIPos{236.5553269}
1123 % \def\horoCuspIIIPos{267.6976404}
1124 % \def\horoCuspIVPos{300.5365877}
1125 % \def\horoCuspVPos{332.9973490}
1126 % \def\horoCuspVIPos{2.5292853}
1127 % \def\horoCuspVIIPos{27.9120843}
1128 % \def\horoCuspVIIIPos{56.5553269}
1129 % \def\horoCuspIXPos{87.6976404}
1130 % \def\horoCuspXPos{120.5365877}
1131 % \def\horoCuspXIPos{152.9973490}
1132 % \def\horoCuspXIIPos{182.5292853}
1133 % \end{verbatim}
1134 %
1135 % A few less obvious macros also need to be set for manually-entered
1136 % positions to work correctly. Load |\horoobjects| with a list of the
1137 % objects with manual positions, and set the DPos values to match the Pos
1138 % values. The |\horocopyvar| macro can help with setting DPos. Finally, set
1139 % the \DescribeMacro{\horocalculatedtrue}|\horocalculatedtrue| flag so that
1140 % other parts of the system will know there is valid data in the variables.
1141 % That flag is normally set by the calculation interface when it has read
1142 % usable data from the backend.
1143 %
1144 % \begin{verbatim}
1145 % \def\horoobjects{Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn,%
1146 % Uranus,Neptune,Pluto,NorthNode,Lilith}
1147 % \horocopyvar{\horoobjects}{Pos}{DPos}
1148 % \horocopyvar{\horocusps}{Pos}{DPos}
1149 % \horocalculatedtrue
1150 % \end{verbatim}
1151 %
1152 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1153 %
1154 % \subsection{Saving and Manipulating Positions}
1155 % \label{sub:manipulation}
1156 %
1157 % In documents that contain multiple charts it may be useful to save the
1158 % results of one calculation for use later. Something similar is also
1159 % required for single charts that contain more than one person's objects, or
1160 % for mixing the results of one calculation with another as when making
1161 % synastry charts. The package provides macros for storing results in
1162 % macros to handle these situations.
1163 %
1164 % The \DescribeMacro{\horosaveobjects}|\horosaveobjects| macro takes one
1165 % argument which is the name of a new macro to create (or to redefine,
1166 % without warning, if it already exists). All the Pos and Vel values for
1167 % objects in |\horoobjects|, and the current value of |\horoobjects| itself,
1168 % are stored in the newly defined macro. When that macro is run later, it
1169 % will restore all those values, and set DPos values to the restored Pos
1170 % values. The effect is that |\horosaveobjects| creates a macro
1171 % representing the object-related results of the last |\horocalculate|, so
1172 % we can return to the current state later.
1173 %
1174 % The \DescribeMacro{\horosavecusps}|\horosavecusps| macro does something
1175 % similar, but instead of saving the objects it saves the current values of
1176 % |\hororightcoord|, |\horocusps|, and the Pos of all cusps. This function
1177 % is split into a separate macro to make it easy to create synastry charts:
1178 % calculate one chart, save the objects, calculate the other chart, and
1179 % restore the first chart's objects, to get one chart's objects in the
1180 % other's houses.
1181 %
1182 % Some manipulations can be applied to calculated positions to alter the
1183 % appearance of the resulting chart. First, the
1184 % \DescribeMacro{\hororotatechart}|\hororotatechart|\marg{object}\marg{angle}
1185 % macro will rotate a chart to
1186 % place a specified object at a specified place. The default is for CuspVII
1187 % (the descendant) to be at the right. The angle must be specified
1188 % in degrees according to the mathematical convention: 0 is to the right and
1189 % it increases counterclockwise, so 90 is up, 180 is to the left, and
1190 % 270 is down. For instance, |\hororotatechart{Sun}{90}| would place the
1191 % Sun at the top. This macro works by manipulating an internal macro called
1192 % |\hororightcoord|, mentioned above as one of the things saved by
1193 % |\horosavecusps|. This rotation does not change the actual stored
1194 % positions of the objects and cusps, only the way in which they will be
1195 % plotted on the page.
1196 %
1197 % The \DescribeMacro{\horocalcharmonic}|\horocalcharmonic|\marg{harmonic}
1198 % macro multiplies all the Pos values of objects in |\horoobjects| by its
1199 % argument and sets the Pos and DPos values to the result. The harmonic
1200 % should be an integer, and no more than 45 (because of \TeX's limits on
1201 % number magnitude). Higher harmonics, if they are not prime numbers, can
1202 % be achieved by calling it twice; for instance, with 20 and 10 to get 200.
1203 % The internal representation of Zodiac positions is only good to
1204 % approximately $1/18$ of a second of arc in the original position; that
1205 % will be multiplied by the harmonic, limiting the precision of the result
1206 % for high harmonics. Your original input data is probably even less good
1207 % than that. The precision of positions in high-harmonic charts is
1208 % inherently limited by the nature of high-harmonic charts, and users must
1209 % understand that. Note also that this macro does not change the house cusp
1210 % positions. The most popular current practices seem to be to leave cusps
1211 % unchanged, or not to use them at all, in harmonic charts; and multiplying
1212 % them like object positions could lead to problematic situations such as
1213 % cusps ending up out of order, especially in higher harmonics.
1214 %
1215 % \changes{v0.91}{2008/08/30}{Documentation on new shift macros}
1216 % The macros \DescribeMacro{\horoshiftobjects}|\horoshiftobjects| and
1217 % \DescribeMacro{\horoshiftcusps}|\horoshiftcusps| apply an additive shift,
1218 % specified in decimal degrees as the single argument, to all the object or
1219 % cusp Pos values respectively, and sets the Pos and DPos values to the
1220 % results. These macros, unlike |\horochartrotate| above, do change the
1221 % stored values of the variables; they can be seen as moving the planets
1222 % instead of moving the chart. This kind of shift can be applied to object
1223 % positions to create solar arc charts. With cusp positions, it can be used
1224 % to create a variety of equal-house systems that may or may not also be
1225 % available directly from the calculation backends. For instance, assuming
1226 % the |swetest| backend, this code will calculate whole-sign houses such
1227 % that the midheaven is contained in the tenth house:
1228 % \begin{verbatim}
1229 % \horocalculate
1230 % \horomakesigncusps{\horoMCPos}
1231 % \horoshiftcusps{90}
1232 % \end{verbatim}
1233 %
1234 % That says: calculate the chart, including the implicit pseudo-object
1235 % ``MC''; create whole-sign houses with CuspI set to the start of
1236 % the sign containing the MC pseudo-object and CuspX three signs
1237 % (90\horodegrees) earlier than that; and then shift the cusps forwards
1238 % 90\horodegrees, so that we end up with CuspX set to the start of the sign
1239 % containing the MC object. A similar chart but with the midheaven actually
1240 % on the tenth house cusp (instead of using whole signs), duplicating
1241 % Astrolog's EqualMC system, could be obtained by substituting
1242 % |\horomakeequalcusps| for |\horomakesigncusps|.
1243 %
1244 % In charts like these where the cusps do not necessarily coincide with the
1245 % angles, one would probably also want to include MC and Ascendant in
1246 % |\horoobjects| so that they will be plotted like objects on the chart.
1247 % The angle-highlighting features of the standard templates remain
1248 % associated with the angular cusps (CuspI, CuspIV, CuspVII, and CuspX)
1249 % rather than the angle pseudo-objects like Ascendant and MC. It may be
1250 % appropriate to turn off the highlighting features for charts in which the
1251 % angular cusps are not actually the angles, but that is left to the user's
1252 % discretion.
1253 %
1254 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1255 %
1256 % \subsection{Printing the Results as Text}
1257 %
1258 % Instead of or in addition to printing a wheel chart, one may want to print
1259 % the numerical values of object positions as text with astrological
1260 % symbols. The \DescribeMacro{\horodsmstext}|\horodsmstext| macro prints
1261 % its argument as an astrological longitude with degree, (Zodiac) sign,
1262 % minutes, and seconds. The argument can be a macro set by |\horocalculate|
1263 % or a raw number in decimal degrees. For instance,
1264 % |\horodsmstext{\horoVenusPos}| might print \horodsmstext{229.6610785}.
1265 %
1266 % The \DescribeMacro{\horotimetext}|\horotimetext| has a similar function
1267 % for times. Its argument should be hours after midnight, and it prints the
1268 % value as hours, minutes, and seconds separated by colons. For instance,
1269 % |\horotimetext{12.58222}| prints \horotimetext{12.58222}. This might
1270 % typically be used with |\horocalctime|.
1271 %
1272 % For latitudes and longitudes,
1273 % \DescribeMacro{\horolatlontext}|\horolatlontext| takes three arguments.
1274 % The first is the number of degrees, which may be positive or negative, and
1275 % it prints the number of degrees, minutes, and seconds followed by either
1276 % the second or third argument depending on whether the angle was positive
1277 % or negative. For instance, |\horolatlontext{50}{N}{S}|
1278 % and |\horolatlontext{-40}{E}{W}| print \horolatlontext{50}{N}{S}
1279 % and \horolatlontext{-40}{E}{W}.
1280 %
1281 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1282 %
1283 % \section{Ready-Made Chart Templates}
1284 %
1285 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1286 %
1287 % \subsection{Basic Wheel Charts}
1288 %
1289 % \DescribeEnv{horoscope}
1290 % \DescribeMacro{\horowheelVancouver}
1291 % The package provides several ready-made chart templates for different
1292 % purposes. The basic wheel chart, similar to the best ones produced by
1293 % other software, is called Vancouver. It's easy to use in the simplest
1294 % case: just open a |horoscope| environment and invoke
1295 % |\horowheelVancouver|, as in the birth chart for John Lennon shown in
1296 % Figure~\ref{fig:basic-wheel}.
1297 %
1298 % \changes{v1.0}{2020/07/21}{Emphasize that template names do not determine
1299 % geographic locations of charts}
1300 % Please note that the standard templates are named after Canadian cities,
1301 % but these names are only \emph{thematic names for the visual styles of the
1302 % charts}\footnote{I was inspired to use this naming theme by Ruskey and
1303 % Weston's work on Venn diagrams; see
1304 % \url{https://www.combinatorics.org/files/Surveys/ds5/ds5v3-2005/VennEJC.html}.}
1305 % and the names of the templates have no connection with the geographic
1306 % locations the charts refer to. You can plot a chart for any location in
1307 % Vancouver style, and you can plot a chart that does happen to be for
1308 % Vancouver (any of the multiple places in the world with that name) using any
1309 % template. The geographic location for the chart must be specified by
1310 % latitude and longitude, independently of the template name.
1311 %
1312 % \begin{figure}
1313 % \horocalcparms{1940}{10}{9}{17:30:0}{W2:55:0}{N53:25:0}
1314 % \horocalculate
1315 % \begin{horoscope}
1316 % \horowheelVancouver
1317 % \end{horoscope}
1318 %
1319 % \begin{verbatim}
1320 % \horocalcparms{1940}{10}{9}{17:30:0}{W2:55:0}{N53:25:0}
1321 % \horocalculate
1322 % \begin{horoscope}
1323 % \horowheelVancouver
1324 % \end{horoscope}
1325 % \end{verbatim}
1326 % \caption{Basic wheel chart (John Lennon).}
1327 % \label{fig:basic-wheel}
1328 % \end{figure}
1329 %
1330 % The |horoscope| environment is a |picture| environment, 100
1331 % unit-lengths square with the origin in the centre, so that coordinates
1332 % range from $-50\ldots 50$ on both axes. The unit length is set to
1333 % \DescribeMacro{\horounitlength}|\horounitlength|, which defaults to
1334 % 0.00952 times |\textwidth|, so that a |horoscope| environment will be
1335 % just slightly less than the full text width of the page. Change it to
1336 % change the size of horoscope wheels, though if it is changed much the text
1337 % size will need to be adjusted also.
1338 %
1339 % \subsubsection{Notes}
1340 % \DescribeMacro{\horoULnote}
1341 % \DescribeMacro{\horoURnote}
1342 % \DescribeMacro{\horoLLnote}
1343 % \DescribeMacro{\horoLRnote}
1344 % \DescribeMacro{\horoCnote}
1345 % Five macros are provided for typesetting notes in the corners or centre of
1346 % a wheel chart. They are called |\horoULnote|, |\horoURnote|, |\horoLLnote|,
1347 % |\horoLRnote|, and |\horoCnote|, for upper left, upper right, lower left,
1348 % lower right, and centre respectively; each takes a single argument
1349 % specifying the text to put there, which may include |\\| commands for line
1350 % breaks. Typesetting is flushed into the corners for corner notes and
1351 % centred for the centre note. If you're using a chart style that
1352 % puts things of its own in the space where you want to put a note,
1353 % then the note will collide with the chart, so depending on configuration
1354 % it may not always make sense to use all five of these.
1355 % Figure~\ref{fig:notes} demonstrates the use of these macros.
1356 %
1357 % \begin{figure}
1358 % \horocalcparms{1875}{10}{12}{23:30:0}{W1:31:0}{N52:18:0}
1359 % \horocalculate
1360 % \begin{horoscope}
1361 % \horowheelVancouver
1362 % \horoULnote{Aleister Crowley\\Natal chart}
1363 % \horoURnote{Leamington Spa\\1\horodegrees31\horominutes W 52\horodegrees18\horominutes N}
1364 % \horoLLnote{The Master Therion\\$\tau o\ \mu\eta\gamma\alpha\ \theta\eta\rho\iota o\nu$}
1365 % \horoLRnote{$7=4$, $666$,\\and other nonsense}
1366 % \end{horoscope}
1367 %
1368 % \begin{verbatim}
1369 % \horocalcparms{1875}{10}{12}{23:30:0}{W1:31:0}{N52:18:0}
1370 % \horocalculate
1371 % \begin{horoscope}
1372 % \horowheelVancouver
1373 % \horoULnote{Aleister Crowley\\Natal chart}
1374 % \horoURnote{Leamington Spa\\
1375 % 1\horodegrees31\horominutes W 52\horodegrees18\horominutes N}
1376 % \horoLLnote{The Master Therion\\
1377 % $\tau o\ \mu\eta\gamma\alpha\ \theta\eta\rho\iota o\nu$}
1378 % \horoLRnote{$7=4$; 666;\\and other nonsense}
1379 % \end{horoscope}
1380 % \end{verbatim}
1381 % \caption{Corner notes.}
1382 % \label{fig:notes}
1383 % \end{figure}
1384 %
1385 % \subsubsection{Aspect webs}\label{sub:aspect-web}
1386 % \DescribeMacro{\horoaspectwebtrue}
1387 % \DescribeMacro{\horoaspectwebfalse}
1388 % The pattern in the centre of the Vancouver wheel, showing which objects
1389 % are or are not in aspect to each other, is called the
1390 % \emph{aspect web}. It can be turned on and off with |\horoaspectwebtrue|
1391 % and |\horoaspectwebfalse|.
1392 %
1393 % \DescribeMacro{\horoaspectobjectsa}
1394 % \DescribeMacro{\horoaspectobjectsb}
1395 % By default, the aspect web will show aspects between any two objects from
1396 % |\horoobjects|. That may not be desirable in charts with many minor
1397 % objects; an aspect between two small asteroids may not be important enough
1398 % to be worth displaying in the web. You can override the default to show
1399 % only selected aspects by defining new values for |\horoaspectobjectsa| and
1400 % |\horoaspectobjectsb|. Each should be a comma-separated list of object
1401 % names; an aspect will be displayed if it goes between one object from one
1402 % list and one from the other. Thus, if you set one to a list of objects to
1403 % consider ``major'' while leaving the other set to all objects, you will
1404 % get an aspect web showing only aspects that involve at least one major
1405 % object, as in Figure~\ref{fig:selected-aspects}.
1406 %
1407 % \begin{figure}
1408 % \horocalcparms{1949}{9}{24}{2:50:0}{W74:17:0}{N40:16:0}
1409 % \horocalculate
1410 % \begin{horoscope}
1411 % \renewcommand{\horoaspectobjectsa}%
1412 % {Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn}
1413 % \horowheelVancouver
1414 % \horoULnote{Bruce Springsteen}
1415 % \end{horoscope}
1416 %
1417 % \begin{verbatim}
1418 % \horocalcparms{1949}{9}{24}{2:50:0}{W74:17:0}{N40:16:0}
1419 % \horocalculate
1420 % \begin{horoscope}
1421 % \renewcommand{\horoaspectobjectsa}%
1422 % {Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn}
1423 % \horowheelVancouver
1424 % \horoULnote{Bruce Springsteen}
1425 % \end{horoscope}
1426 % \end{verbatim}
1427 % \caption{Limiting the objects for the aspect web.}
1428 % \label{fig:selected-aspects}
1429 % \end{figure}
1430 %
1431 % \DescribeMacro{\horoaspects}
1432 % The |\horoaspects| macro stores a list of aspects to include in aspect webs,
1433 % much in the manner that |\horoobjects| lists objects to include in charts.
1434 % The default is to include Opposition, Trine, Square, and Sextile. The other
1435 % predefined aspects users can add to the list are all those for which
1436 % Symbol macros were defined earlier: Conjunction, Quintile, Biquintile,
1437 % Quincunx, Semisextile, Semisquare, and Sesquiquadrate. Other
1438 % (user-defined) aspects may be added by defining
1439 % |\horo|\meta{aspect}|Symbol|, |\horo|\meta{aspect}|Angle|, and
1440 % |\horo|\meta{aspect}|Orb| macros, with the angle and orb given in decimal
1441 % degrees.
1442 %
1443 % \subsubsection{House and angle markings}
1444 % The ready-made wheel templates also support several options for marking
1445 % the houses and the angles. Exactly which options are supported depends
1446 % on the template; the Vancouver template supports them all.
1447 %
1448 % \DescribeMacro{\horointhouselabelstrue}
1449 % \DescribeMacro{\horointhouselabelsfalse}
1450 % \DescribeMacro{\horohouselabel}
1451 % Internal house labels are numbers that appear inside the houses among the
1452 % object labels, selected
1453 % with the |\horointhouselabelstrue| and |\horointhouse|-|labelsfalse| macros.
1454 % The default
1455 % is false, because they take up a fair bit of space and can lead to
1456 % crowding. By default they are uppercase Roman numerals; you can make them
1457 % be something else by redefining the |\horohouselabel| command to print the
1458 % |horohouse| \LaTeX\ counter in the desired style.
1459 %
1460 % \DescribeMacro{\horoboldanglestrue}
1461 % \DescribeMacro{\horoboldanglesfalse}
1462 % \DescribeMacro{\horoanglecuspwidth}
1463 % With |\horoboldanglestrue| and |\horoboldanglesfalse| the user can select
1464 % whether to display angular house cusps as extra-bold lines. The default
1465 % is true. The actual width to use is set by the \LaTeX\ length
1466 % |\horoanglecuspwidth|, which defaults to 1.44pt.
1467 %
1468 % \DescribeMacro{\horoanglearrowstrue}
1469 % \DescribeMacro{\horoanglearrowsfalse}
1470 % Angular cusps can also be highlighted by giving them arrowheads; this is
1471 % selected with |\horoanglearrowstrue| and |\horoanglearrowsfalse|, default
1472 % true. The size of the arrowheads is fixed as part of the template.
1473 %
1474 % Figure~\ref{fig:angle-highlight} shows all the cusp-highlighting features
1475 % set to the opposite from their defaults.
1476 %
1477 % \begin{figure}
1478 % \horocalcparms{1920}{10}{22}{14:45:0}{W72:35:0}{N42:06:0}
1479 % \horocalculate
1480 % \begin{horoscope}
1481 % \horointhouselabelstrue
1482 % \horoboldanglesfalse
1483 % \horoanglearrowsfalse
1484 % \horowheelVancouver
1485 % \horoULnote{Timothy Leary}
1486 % \end{horoscope}
1487 %
1488 % \begin{verbatim}
1489 % \horocalcparms{1920}{10}{22}{14:45:0}{W72:35:0}{N42:06:0}
1490 % \horocalculate
1491 % \begin{horoscope}
1492 % \horointhouselabelstrue
1493 % \horoboldanglesfalse
1494 % \horoanglearrowsfalse
1495 % \horowheelVancouver
1496 % \horoULnote{Timothy Leary}
1497 % \end{horoscope}
1498 % \end{verbatim}
1499 % \caption{Cusp-highlighting features}
1500 % \label{fig:angle-highlight}
1501 % \end{figure}
1502 %
1503 % \subsubsection{Smart labels}
1504 % By default, the Vancouver chart template will display a label for each
1505 % object containing its symbol, longitude down to the minute of arc, and
1506 % the retrograde symbol if the object is retrograde. It will automatically
1507 % adjust the sequence of the different parts of the label so that the
1508 % longitude part will read in degree-sign-minute order in as close as
1509 % possible to left-to-right, top-to-bottom order, with the object's symbol
1510 % at the outside near the rim of the wheel and the retrograde symbol on the
1511 % inside near the hub. However, this labelling scheme can be customized in
1512 % several ways.
1513 %
1514 % First, the |\horowheelVancouver| command can take an optional argument
1515 % which is a format string specifying what ``chunks'' should be typeset in
1516 % each object label. The format string should be some sequence of the
1517 % letters |d|, |m|, |s|, |z|, |y|, and |r|, which refer respectively to
1518 % Degrees, Minutes, and Seconds of longitude, Zodiac sign symbol, object
1519 % sYmbol, and possible Retrograde. If a label string like |ydzmsr| is
1520 % specified it will be read in an inward direction; that example would
1521 % typeset object symbols at the outside, then degrees, sign, minutes,
1522 % seconds, and retrograde at successively smaller radii.
1523 %
1524 % If two label strings are specified separated by a slash, then the first
1525 % one will be used for all labels typeset above an imaginary line drawn at a
1526 % 45\horodegrees\ angle from lower left to upper right, and the second
1527 % string will be used for labels below that line. The idea is that for the
1528 % first class of labels, the preferred reading direction will be inward, and
1529 % for the second class it will be outward, so by reversing the appropriate
1530 % letters between the two strings one can keep sections of the label reading
1531 % in the correct direction. The default format string is |ydzmr/ymzdr|,
1532 % which implements the default behaviour described above.
1533 %
1534 % \DescribeMacro{\horotextsize}
1535 % The Vancouver chart template automatically adjusts the size of text in its
1536 % labels according to how much detail was selected in the labels. Formally,
1537 % it counts the number of letters in the format string (the first one if two
1538 % were specified) and uses that to index into the sequence of \LaTeX\ type
1539 % size commands |\Large|, |\large|, |\normalsize|, |\small|, |\scriptsize|,
1540 % |\scriptsize| (twice---by trial and error, that seems to work best),
1541 % |\tiny|. That results in larger text for shorter labels. Similar
1542 % trickery changes the radii on which the different chunks are shown, to
1543 % keep the labels reasonable-looking even when different levels of detail
1544 % are chosen. However, this process is by no means foolproof and the result
1545 % may not be the desired size. If necessary, the |\horotextsize| macro can
1546 % be changed with |\renewcommand| to a positive or negative size adjustment.
1547 % For instance, if it is set to |2|, the labels will use text two sizes
1548 % larger than the default.
1549 %
1550 % \changes{v0.91}{2008/08/30}{Label example to use rounding}
1551 % Figure~\ref{fig:degrees-only} is an example with lower-detail labels
1552 % than default (showing longitude only down to the degree) and larger text.
1553 % Rounding options described in section~\ref{sub:rounding} are used because
1554 % the default rounding assumes the labels will show minutes.
1555 %
1556 % \begin{figure}
1557 % \horocalcparms{1950}{8}{11}{16:45:0}{W121:53:0}{N37:20:0}
1558 % \horocalculate
1559 % \begin{horoscope}
1560 % \renewcommand{\horotextsize}{2}%
1561 % \hororoundautofalse
1562 % \hororoundtodegkeepsign
1563 % \horowheelVancouver[ydzr/yzdr]
1564 % \horoULnote{Steve Wozniak}
1565 % \end{horoscope}
1566 %
1567 % \begin{verbatim}
1568 % \horocalcparms{1950}{8}{11}{16:45:0}{W121:53:0}{N37:20:0}
1569 % \horocalculate
1570 % \begin{horoscope}
1571 % \renewcommand{\horotextsize}{2}
1572 % \hororoundautofalse
1573 % \hororoundtodegkeepsign
1574 % \horowheelVancouver[ydzr/yzdr]
1575 % \horoULnote{Steve Wozniak}
1576 % \end{horoscope}
1577 % \end{verbatim}
1578 % \caption{Custom label string and text size adjustment.}
1579 % \label{fig:degrees-only}
1580 % \end{figure}
1581 %
1582 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1583 %
1584 % \subsection{Dial Charts}
1585 %
1586 % The Vancouver chart template is designed for a traditional style of wheel
1587 % chart with house cusps featuring prominently. For some kinds of
1588 % interpretation, you may want to focus more on the angles between objects
1589 % without much reference to house cusps. The dial chart templates are
1590 % designed to support that kind of view; they emphasize angles and do not
1591 % include cusps. They are loosely based on the style of charts popular in
1592 % Cosmobiology; they might also be worthwhile for charts where the birth
1593 % time or location are unknown, so that house cusps cannot be meaningfully
1594 % calculated. Templates are offered for comparing up to four sets of
1595 % objects.
1596 %
1597 % All dial charts are printed with the 0\horodegrees\AriesSymbol\ mark at the
1598 % top. In the case of harmonic charts, that may coincide with other
1599 % longitudes as well---for instance, 0\horodegrees\CancerSymbol,
1600 % 0\horodegrees\LibraSymbol, and 0\horodegrees\CapricornSymbol\ on a
1601 % 90\horodegrees\ dial.
1602 %
1603 % \DescribeMacro{\horowheelIqaluit}
1604 % Figure~\ref{fig:iqaluit} shows the basic single 360\horodegrees\ dial chart
1605 % style, available through the |\horowheelIqaluit| macro. This macro, like
1606 % all the dial chart macros, has an optional first argument for a harmonic
1607 % number. The popular 90\horodegrees\ dial is available with
1608 % |\horowheelIqaluit[4]|, as shown in Figure~\ref{fig:iqaluit-ninety}.
1609 % Other harmonics may be chosen to give dials with other numbers of degrees.
1610 %
1611 % \begin{figure}
1612 % \horocalcparms{1942}{11}{2}{2:10:0}{W83:04:0}{N37:45:0}
1613 % \horocalculate
1614 % \begin{horoscope}
1615 % \horoaspectwebfalse
1616 % \horowheelIqaluit
1617 % \horoULnote{Larry Flynt}
1618 % \end{horoscope}
1619 %
1620 % \begin{verbatim}
1621 % \horocalcparms{1942}{11}{2}{2:10:0}{W83:04:0}{N37:45:0}
1622 % \horocalculate
1623 % \begin{horoscope}
1624 % \horoaspectwebfalse
1625 % \horowheelIqaluit
1626 % \horoULnote{Larry Flynt}
1627 % \end{horoscope}
1628 % \end{verbatim}
1629 % \caption{Single 360\horodegrees\ dial (Iqaluit).}
1630 % \label{fig:iqaluit}
1631 % \end{figure}
1632 %
1633 % \begin{figure}
1634 % \horocalcparms{1926}{4}{9}{22:20:0}{W87:39:0}{N41:52:0}
1635 % \horocalculate
1636 % \begin{horoscope}
1637 % \horowheelIqaluit[4]
1638 % \horoULnote{Hugh Hefner}
1639 % \end{horoscope}
1640 %
1641 % \begin{verbatim}
1642 % \horocalcparms{1926}{4}{9}{22:20:0}{W87:39:0}{N41:52:0}
1643 % \horocalculate
1644 % \begin{horoscope}
1645 % \horowheelIqaluit[4]
1646 % \horoULnote{Hugh Hefner}
1647 % \end{horoscope}
1648 % \end{verbatim}
1649 % \caption{Single 90\horodegrees\ dial (Iqaluit).}
1650 % \label{fig:iqaluit-ninety}
1651 % \end{figure}
1652 %
1653 % All the dial templates support an aspect web, turned on by default. The
1654 % aspect web will be based on whatever values are currently in the Pos
1655 % variables when the chart is drawn, which will normally be the last ones
1656 % calculated. Most users will probably prefer that those be the positions
1657 % for the innermost dial in the case of a multi-dial chart, but by careful
1658 % sequencing or use of |\horosaveobjects|, other selections are possible.
1659 %
1660 % As seen in Figure~\ref{fig:iqaluit-ninety}, the aspects refer to the object
1661 % longitudes {\em after} any harmonic transformation. For instance,
1662 % Hefner's Moon and Chiron are shown as in opposition in the aspect web
1663 % because they are close to 180\horodegrees\ apart on the chart. It is a
1664 % fourth-harmonic chart, the objects are actually about 45\horodegrees\ apart
1665 % in the sky, and so the aspect is really a semisquare. His Jupiter and
1666 % Saturn, on the other hand, really are square to each other in the sky, but
1667 % appear as conjunct on the dial. Users who choose to use an aspect web
1668 % with harmonic charts are assumed to understand these issues. If desired,
1669 % the aspect symbols may be redefined to correspond to aspects in the sky
1670 % (before harmonics) rather than on the chart (after harmonics).
1671 %
1672 % If the aspect web is turned off, the dial chart will include a small cross
1673 % at the centre of the dials, for centering the moveable pointer that some
1674 % interpreters like to use. Note that that style of interpretation is not
1675 % part of the author's background; people who do want to do it are
1676 % encouraged to comment on how the package's features could be better tuned
1677 % to their purposes.
1678 %
1679 % \DescribeMacro{\horowheelIgloolik}
1680 % The |\horowheelIgloolik| command creates a double dial, as shown in
1681 % Figure~\ref{fig:igloolik}. It has two required arguments which should be
1682 % saved object position macros created by the |\horosaveobjects| command, as
1683 % illustrated by the example code. The first will be used for the inner
1684 % dial and the second for the outer dial. An optional argument in square
1685 % brackets may be added before the required ones (in the standard
1686 % \LaTeX\ usage) for a dial of less than 360\horodegrees.
1687 %
1688 % \begin{figure}
1689 % \horocalcparms{1955}{2}{24}{15:0:0}{W122:25:0}{N37:46:0}
1690 % \horocalculate\horosaveobjects{\SteveJobs}
1691 % \horocalcparms{1955}{10}{29}{6:0:0}{W122:20:0}{N47:36:0}
1692 % \horocalculate\horosaveobjects{\BillGates}
1693 % \begin{horoscope}
1694 % \horowheelIgloolik{\BillGates}{\SteveJobs}
1695 % \horoULnote{Inner: Bill Gates}
1696 % \horoURnote{Outer: Steve Jobs}
1697 % \end{horoscope}
1698 %
1699 % \begin{verbatim}
1700 % \horocalcparms{1955}{2}{24}{15:0:0}{W122:25:0}{N37:46:0}
1701 % \horocalculate\horosaveobjects{\SteveJobs}
1702 % \horocalcparms{1955}{10}{29}{6:0:0}{W122:20:0}{N47:36:0}
1703 % \horocalculate\horosaveobjects{\BillGates}
1704 % \begin{horoscope}
1705 % \horowheelIgloolik{\BillGates}{\SteveJobs}
1706 % \horoULnote{Inner: Bill Gates}
1707 % \horoURnote{Outer: Steve Jobs}
1708 % \end{horoscope}
1709 % \end{verbatim}
1710 % \caption{Double 360\horodegrees\ dial (Igloolik).}
1711 % \label{fig:igloolik}
1712 % \end{figure}
1713 %
1714 % \DescribeMacro{\horowheelRankin}
1715 % \DescribeMacro{\horowheelResolute}
1716 % Triple and quadruple dials are also available, through |\horowheelRankin|
1717 % and |\horowheelResolute| respectively. These are illustrated in
1718 % Figures~\ref{fig:resolute} and~\ref{fig:rankin}. Their operation is
1719 % fundamentally the same as |\horowheelIgloolik|, just extended to three or
1720 % four sets of objects.
1721 %
1722 % \begin{figure}
1723 % \horocalcparms{1961}{1}{26}{12:45:0}{W80:16:0}{N43:08:0}
1724 % \horocalculate\horosaveobjects{\WayneGretzky}
1725 % \horocalcparms{1939}{3}{20}{12:47:0}{W68:30:0}{N49:13:0}
1726 % \horocalculate\horosaveobjects{\BrianMulroney}
1727 % \horocalcparms{1938}{11}{17}{12:0:0}{W79:25:0}{N44:37:0}
1728 % \horocalculate\horosaveobjects{\GordonLightfoot}
1729 % \begin{horoscope}
1730 % \horowheelResolute{\GordonLightfoot}{\BrianMulroney}{\WayneGretzky}
1731 % \horoULnote{Inner: Gordon Lightfoot}
1732 % \horoURnote{Middle: Brian Mulroney}
1733 % \horoLLnote{Outer: Wayne Gretzky}
1734 % \end{horoscope}
1735 %
1736 % \begin{verbatim}
1737 % \horocalcparms{1961}{1}{26}{12:45:0}{W80:16:0}{N43:08:0}
1738 % \horocalculate\horosaveobjects{\WayneGretzky}
1739 % \horocalcparms{1939}{3}{20}{12:47:0}{W68:30:0}{N49:13:0}
1740 % \horocalculate\horosaveobjects{\BrianMulroney}
1741 % \horocalcparms{1938}{11}{17}{12:0:0}{W79:25:0}{N44:37:0}
1742 % \horocalculate\horosaveobjects{\GordonLightfoot}
1743 % \begin{horoscope}
1744 % \horowheelResolute{\GordonLightfoot}{\BrianMulroney}{\WayneGretzky}
1745 % \horoULnote{Inner: Gordon Lightfoot}
1746 % \horoURnote{Middle: Brian Mulroney}
1747 % \horoLLnote{Outer: Wayne Gretzky}
1748 % \end{horoscope}
1749 % \end{verbatim}
1750 % \caption{Triple 360\horodegrees\ dial (Resolute).}
1751 % \label{fig:resolute}
1752 % \end{figure}
1753 %
1754 % \begin{figure}
1755 % \horocalcparms{1934}{2}{6}{2:25:0}{W88:03:0}{N30:41:0}
1756 % \horocalculate\horosaveobjects{\HankAaron}
1757 % \horocalcparms{1931}{5}{7}{4:30:0}{W86:55:0}{N33:28:0}
1758 % \horocalculate\horosaveobjects{\WillieMays}
1759 % \horocalcparms{1925}{5}{12}{8:0:0}{W90:12:0}{N38:37:0}
1760 % \horocalculate\horosaveobjects{\YogiBerra}
1761 % \horocalcparms{1919}{1}{31}{24:30:0}{W84:13:0}{N30:52:0}
1762 % \horocalculate\horosaveobjects{\JackieRobinson}
1763 % \begin{horoscope}
1764 % \horoaspectwebfalse
1765 % \horowheelRankin{\JackieRobinson}{\YogiBerra}%
1766 % {\WillieMays}{\HankAaron}
1767 % \horoCnote{Inner to outer:\\ Jackie Robinson\\
1768 % Yogi Berra\\ Willie Mays\\ Hank Aaron}
1769 % \end{horoscope}
1770 %
1771 % \begin{verbatim}
1772 % \horocalcparms{1934}{2}{6}{2:25:0}{W88:03:0}{N30:41:0}
1773 % \horocalculate\horosaveobjects{\HankAaron}
1774 % \horocalcparms{1931}{5}{7}{4:30:0}{W86:55:0}{N33:28:0}
1775 % \horocalculate\horosaveobjects{\WillieMays}
1776 % \horocalcparms{1925}{5}{12}{8:0:0}{W90:12:0}{N38:37:0}
1777 % \horocalculate\horosaveobjects{\YogiBerra}
1778 % \horocalcparms{1919}{1}{31}{24:30:0}{W84:13:0}{N30:52:0}
1779 % \horocalculate\horosaveobjects{\JackieRobinson}
1780 % \begin{horoscope}
1781 % \horoaspectwebfalse
1782 % \horowheelRankin{\JackieRobinson}{\YogiBerra}%
1783 % {\WillieMays}{\HankAaron}
1784 % \horoCnote{Inner to outer:\\ Jackie Robinson\\
1785 % Yogi Berra\\ Willie Mays\\ Hank Aaron}
1786 % \end{horoscope}
1787 % \end{verbatim}
1788 % \caption{Quadruple 360\horodegrees\ dial (Rankin).}
1789 % \label{fig:rankin}
1790 % \end{figure}
1791 %
1792 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1793 %
1794 % \subsection{Decorative Wheel Charts}
1795 %
1796 % The standard wheel chart emphasizes house cusps, and the dial
1797 % charts concentrate on longitudes without showing the houses. For other
1798 % styles of interpretation it may be desirable to put more emphasis on the
1799 % houses containing objects and less on the geometry of objects' physical
1800 % locations in the sky. The decorative wheel chart templates are designed
1801 % to support that kind of emphasis, provide visually appealing designs
1802 % similar to some historical chart styles, and demonstrate the possibilities
1803 % for customized templates.
1804 %
1805 % \DescribeMacro{\horowheelMontreal}
1806 % The |\horowheelMontreal| macro generates a chart like that shown in
1807 % Figure~\ref{fig:montreal}. It shows labels for the angular cusps down to
1808 % the minute of arc and for objects showing object symbol, degree and sign,
1809 % and possible retrograde. Most of the house cusps are drawn as curves,
1810 % creating a floral effect. This template does not support an automatic
1811 % aspect web (it wouldn't make sense because there are no object-location
1812 % ticks) nor modification of the label content.
1813 %
1814 % \begin{figure}
1815 % \horocalcparms{1942}{11}{27}{17:15:0}{W122:20:0}{N47:36:0}
1816 % \horocalculate
1817 % \begin{horoscope}
1818 % \horowheelMontreal
1819 % \horoULnote{Jimi Hendrix}
1820 % \end{horoscope}
1821 %
1822 % \begin{verbatim}
1823 % \horocalcparms{1942}{11}{27}{17:15:0}{W122:20:0}{N47:36:0}
1824 % \horocalculate
1825 % \begin{horoscope}
1826 % \horowheelMontreal
1827 % \horoULnote{Jimi Hendrix}
1828 % \end{horoscope}
1829 % \end{verbatim}
1830 % \caption{Decorative chart template (Montreal).}
1831 % \label{fig:montreal}
1832 % \end{figure}
1833 %
1834 % \DescribeMacro{\horowheelQuebecCity}
1835 % The |\horowheelQuebecCity| macro is another take on the decorative wheel
1836 % chart concept: here eight houses are on the outside and four on the
1837 % inside, in contrast to the eight on the inside and four around the outside
1838 % of the Montreal template. As a result of the different layout it becomes
1839 % possible to draw the cusps as straight lines rather than curves. The
1840 % result is shown in Figure~\ref{fig:quebec-city}. This template style
1841 % shows degree-sign-minute labels for all twelve cusps, and
1842 % degree-sign-retrograde labels for objects. As with Montreal, the label
1843 % detail is fixed and there is no provision for an aspect web (which would
1844 % need to be stretched to fit the roughly square shape of the wheel's hub).
1845 %
1846 % \begin{figure}
1847 % \horocalcparms{1958}{8}{16}{12:05:0}{W83:54:0}{N43:36:0}
1848 % \horocalculate
1849 % \begin{horoscope}
1850 % \horowheelQuebecCity
1851 % \horoULnote{Madonna Ciccone}
1852 % \end{horoscope}
1853 %
1854 % \begin{verbatim}
1855 % \horocalcparms{1958}{8}{16}{12:05:0}{W83:54:0}{N43:36:0}
1856 % \horocalculate
1857 % \begin{horoscope}
1858 % \horowheelQuebecCity
1859 % \horoULnote{Madonna Ciccone}
1860 % \end{horoscope}
1861 % \end{verbatim}
1862 % \caption{Decorative chart template (QuebecCity).}
1863 % \label{fig:quebec-city}
1864 % \end{figure}
1865 %
1866 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1867 %
1868 % \section{Advanced Topics}
1869 %
1870 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1871 %
1872 % \subsection{Rounding and Mixed-Base Conversion}
1873 % \label{sub:rounding}
1874 % \changes{v0.91}{2008/07/04}{Added smart rounding features}
1875 %
1876 % \subsubsection{The rounding problem}
1877 % Astrologers traditionally describe Zodiac positions with a mixed-base
1878 % number system in which a position might be written like
1879 % 2\horodegrees\AriesSymbol34\horominutes56\horoseconds. This format
1880 % descends from Babylonian sexagesimal arithmetic, representing fractions in
1881 % terms of multiples of powers of $1/60$. It is convenient for hand
1882 % calculation and human analysis because it makes it easy for humans to
1883 % recognize important boundaries (like sign cusps) and relationships
1884 % (like aspects). Humans are generally good at doing arithmetic on small
1885 % integers, which is the necessary skill for using this representation.
1886 %
1887 % The mixed-base system is less convenient for computer arithmetic, however.
1888 % Computers generally record positions in other formats, such as floating-
1889 % or fixed-point degrees, radians, or ``centiseconds'' past
1890 % the Pisces-Aries cusp; \textsf{horoscop} in particular uses degrees
1891 % stored in \TeX\ length variables with a scaling of 1\horodegrees=1pt. At
1892 % that scale the inherent precision of a \TeX\ length means that the angles
1893 % can be reproduced to an accuracy of $1\horodegrees/65536$, which is
1894 % just under $1/18$ of a second of arc.
1895 %
1896 % When an internal-format Zodiac position has to be displayed in
1897 % human-readable form, some kind of rounding must necessarily occur. Each
1898 % position needs a name. A name like
1899 % 2\horodegrees\AriesSymbol34\horominutes56\horoseconds\ strictly speaking
1900 % represents just one point on the Zodiac. There are an infinite number of
1901 % points and only a finite number of possible names (about 1.3~million if we
1902 % use whole seconds of arc as the precision level); so for any given point
1903 % on the Zodiac, in general there will be no name exactly describing its
1904 % location. How shall we assign names to points? Most astrological
1905 % software has built-in arbitrary and undocumented assumptions on how to
1906 % round positions for display; in \textsf{horoscop}, we attempt to do it
1907 % in a more principled way, and expose the decisions to interested users.
1908 %
1909 % Rounding is already a serious issue in general numerical computation, and
1910 % people have developed a variety of solutions to serve varying purposes.
1911 % Some of them are non-obvious---for instance, the ``banker's rounding''
1912 % rule designed to reduce overall rounding error when taking the sum of a
1913 % set of rounded numbers. Rounding for astrological purposes presents
1914 % unique challenges because of the way humans will use the rounded results.
1915 % In particular, sign and degree boundaries are important in astrology and
1916 % otherwise-good rounding schemes may cause problems if they do not respect
1917 % those boundaries.
1918 %
1919 % For example, suppose some object in a horoscope has a Zodiac position
1920 % 29.9999\horodegrees\ past the Pisces-Aries cusp. It is before the
1921 % Aries-Taurus cusp, but by less than half a second of arc. If we round it
1922 % to the nearest second, we get
1923 % 0\horodegrees\TaurusSymbol0\horominutes0\horoseconds. That misrepresents
1924 % the position in an important way: the object has not yet entered Taurus,
1925 % but the rounded position says it has. A similar issue shows up around the
1926 % 10\horodegrees\ and 20\horodegrees\ boundaries if we are interested in
1927 % decans; or around \emph{all} the degree boundaries if we are interested in
1928 % Sabian symbols.
1929 %
1930 % This kind of issue also becomes worse when positions are rounded to larger
1931 % units (minutes or degrees). With rounding to the nearest degree, a
1932 % position can be represented as being in the next sign while actually being
1933 % up to half a degree before the cusp. In the case of the Sun in
1934 % particular, this kind of issue can only exacerbate existing public
1935 % misunderstandings of what Sun-sign cusps actually mean. See
1936 % Figure~\ref{fig:pure-round-deg}: the range of positions that will be
1937 % labelled as a particular sign in a pure round-to-nearest-degree scheme
1938 % actually starts half a degree before the start of the sign and ends half a
1939 % degree before the end of the sign. Pure rounding seems to be a problem if
1940 % we care about which signs things are really in.
1941 %
1942 % \begin{figure}
1943 % \begin{center}
1944 % \setlength{\unitlength}{1.2pt}
1945 % \begin{picture}(260,50)(-130,-20)
1946 % \put(-125,0){\line(1,0){250}}
1947 % \multiput(-120,-2)(10,0){25}{\line(0,1){4}}
1948 % \put(-120,-5){\line(0,1){10}}
1949 % \put(-60,-5){\line(0,1){10}}
1950 % \put(0,-5){\line(0,1){10}}
1951 % \put(60,-5){\line(0,1){10}}
1952 % \put(120,-5){\line(0,1){10}}
1953 % \put(-120,-10){\makebox(0,0){28\horodegrees\AriesSymbol}}
1954 % \put(-60,-10){\makebox(0,0){29\horodegrees\AriesSymbol}}
1955 % \put(0,-10){\makebox(0,0){0\horodegrees\TaurusSymbol}}
1956 % \put(60,-10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
1957 % \put(120,-10){\makebox(0,0){2\horodegrees\TaurusSymbol}}
1958 % \put(-120,20){\makebox(0,0){28\horodegrees\AriesSymbol}}
1959 % \put(-109,20){\line(1,0){19}}
1960 % \put(-90,20){\makebox(0,0){)}}
1961 % \put(-90,10){\makebox(0,0){[}}
1962 % \put(-90,10){\line(1,0){19}}
1963 % \put(-60,10){\makebox(0,0){29\horodegrees\AriesSymbol}}
1964 % \put(-49,10){\line(1,0){19}}
1965 % \put(-30,10){\makebox(0,0){)}}
1966 % \put(-30,20){\makebox(0,0){[}}
1967 % \put(-30,20){\line(1,0){22}}
1968 % \put(0,20){\makebox(0,0){0\horodegrees\TaurusSymbol}}
1969 % \put(8,20){\line(1,0){22}}
1970 % \put(30,20){\makebox(0,0){)}}
1971 % \put(30,10){\makebox(0,0){[}}
1972 % \put(30,10){\line(1,0){22}}
1973 % \put(60,10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
1974 % \put(68,10){\line(1,0){22}}
1975 % \put(90,10){\makebox(0,0){)}}
1976 % \put(90,20){\makebox(0,0){[}}
1977 % \put(90,20){\line(1,0){22}}
1978 % \put(120,20){\makebox(0,0){2\horodegrees\TaurusSymbol}}
1979 % \end{picture}
1980 % \end{center}
1981 % \caption{Pure rounding to nearest degree.}
1982 % \label{fig:pure-round-deg}
1983 % \end{figure}
1984 %
1985 % One possible solution is to use pure truncation, as shown in
1986 % Figure~\ref{fig:truncate-deg}. This approach has the advantage of being
1987 % very simple. Each name corresponds to an interval stretching from the
1988 % named point to the next named point. All the intervals are the same size.
1989 % It respects sign and degree boundaries, and smaller-unit boundaries when
1990 % generalized to higher precision. The lower-precision truncated version of
1991 % any position is always identical to the most significant few digits of the
1992 % higher-precision truncated version. However, because the labels refer to
1993 % the lower extremes of the rounding intervals, this approach maximizes the
1994 % rounding error. A position truncated to the next lower degree may be as
1995 % much as one degree away from its named position; and it may be much closer
1996 % to the next degree than to its named position. Because this scheme is
1997 % asymmetrical, truncating a batch of randomly chosen points to the degree
1998 % level will tend to shift them backwards by an average of half a degree.
1999 %
2000 % \begin{figure}
2001 % \begin{center}
2002 % \setlength{\unitlength}{1.2pt}
2003 % \begin{picture}(260,50)(-130,-20)
2004 % \put(-125,0){\line(1,0){250}}
2005 % \multiput(-120,-2)(10,0){25}{\line(0,1){4}}
2006 % \put(-120,-5){\line(0,1){10}}
2007 % \put(-60,-5){\line(0,1){10}}
2008 % \put(0,-5){\line(0,1){10}}
2009 % \put(60,-5){\line(0,1){10}}
2010 % \put(120,-5){\line(0,1){10}}
2011 % \put(-120,-10){\makebox(0,0){28\horodegrees\AriesSymbol}}
2012 % \put(-60,-10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2013 % \put(0,-10){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2014 % \put(60,-10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2015 % \put(120,-10){\makebox(0,0){2\horodegrees\TaurusSymbol}}
2016 % \put(-120,10){\makebox(0,0){)}}
2017 % \put(-120,20){\makebox(0,0){[}}
2018 % \put(-120,20){\line(1,0){19}}
2019 % \put(-90,20){\makebox(0,0){28\horodegrees\AriesSymbol}}
2020 % \put(-79,20){\line(1,0){19}}
2021 % \put(-60,20){\makebox(0,0){)}}
2022 % \put(-60,10){\makebox(0,0){[}}
2023 % \put(-60,10){\line(1,0){19}}
2024 % \put(-30,10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2025 % \put(-19,10){\line(1,0){19}}
2026 % \put(0,10){\makebox(0,0){)}}
2027 % \put(0,20){\makebox(0,0){[}}
2028 % \put(0,20){\line(1,0){22}}
2029 % \put(30,20){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2030 % \put(38,20){\line(1,0){22}}
2031 % \put(60,20){\makebox(0,0){)}}
2032 % \put(60,10){\makebox(0,0){[}}
2033 % \put(60,10){\line(1,0){22}}
2034 % \put(90,10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2035 % \put(98,10){\line(1,0){22}}
2036 % \put(120,10){\makebox(0,0){)}}
2037 % \put(120,20){\makebox(0,0){[}}
2038 % \end{picture}
2039 % \end{center}
2040 % \caption{Truncation to degree.}
2041 % \label{fig:truncate-deg}
2042 % \end{figure}
2043 %
2044 % Another option might be to do rounding to nearest at the lowest level, but
2045 % add extra rounding boundaries, and extra names, to solve the ``signs start
2046 % too early'' problem. There are many equivalent ways of stating this
2047 % scheme; one way to describe it is that we use truncation for all
2048 % mixed-base digits except the least significant and then round the least
2049 % significant digit to nearest without allowing it to carry into higher
2050 % digits. The result is shown schematically in
2051 % Figure~\ref{fig:nocarry-round-deg}.
2052 %
2053 % In the rounding without carry scheme, a position very near the end of
2054 % Aries might be named 30\horodegrees\AriesSymbol. Such a name may be
2055 % upsetting to readers who expect every sign to contain 30 degrees named
2056 % 0\horodegrees\ldots29\horodegrees. It also creates strange exceptional
2057 % degrees at either end of every sign: 0\horodegrees\ and 30\horodegrees\
2058 % are each 30\horominutes\ long, while 1\horodegrees\ldots29\horodegrees\
2059 % are 60\horominutes\ each. However, it has significant advantages. It
2060 % makes the sign boundaries clear; it makes positions near sign boundaries
2061 % stand out in an obvious way to informed readers; it keeps the maximum
2062 % rounding error to half a degree, improving on truncation's maximum error
2063 % of one degree; and because of its symmetry, randomly chosen points do not
2064 % tend to shift in a particular direction under this scheme. This scheme is
2065 % used by some printed ephemerides, and is preferred by the author of
2066 % \textsf{horoscop}.
2067 %
2068 % \begin{figure}
2069 % \begin{center}
2070 % \setlength{\unitlength}{1.2pt}
2071 % \begin{picture}(260,50)(-130,-20)
2072 % \put(-125,0){\line(1,0){250}}
2073 % \multiput(-120,-2)(10,0){25}{\line(0,1){4}}
2074 % \put(-120,-5){\line(0,1){10}}
2075 % \put(-60,-5){\line(0,1){10}}
2076 % \put(0,-5){\line(0,1){10}}
2077 % \put(60,-5){\line(0,1){10}}
2078 % \put(120,-5){\line(0,1){10}}
2079 % \put(-120,-10){\makebox(0,0){28\horodegrees\AriesSymbol}}
2080 % \put(-60,-10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2081 % \put(0,-10){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2082 % \put(60,-10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2083 % \put(120,-10){\makebox(0,0){2\horodegrees\TaurusSymbol}}
2084 % \put(-120,20){\makebox(0,0){28\horodegrees\AriesSymbol}}
2085 % \put(-109,20){\line(1,0){19}}
2086 % \put(-90,20){\makebox(0,0){)}}
2087 % \put(-90,10){\makebox(0,0){[}}
2088 % \put(-90,10){\line(1,0){19}}
2089 % \put(-60,10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2090 % \put(-49,10){\line(1,0){19}}
2091 % \put(-30,10){\makebox(0,0){)}}
2092 % \put(-30,20){\makebox(0,0){[}}
2093 % \put(-30,20){\line(1,0){4}}
2094 % \put(-15,20){\makebox(0,0){30\horodegrees\AriesSymbol}}
2095 % \put(-4,20){\line(1,0){4}}
2096 % \put(0,20){\makebox(0,0){)}}
2097 % \put(0,10){\makebox(0,0){[}}
2098 % \put(0,10){\line(1,0){7}}
2099 % \put(15,10){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2100 % \put(22,10){\line(1,0){8}}
2101 % \put(30,10){\makebox(0,0){)}}
2102 % \put(30,20){\makebox(0,0){[}}
2103 % \put(30,20){\line(1,0){22}}
2104 % \put(60,20){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2105 % \put(68,20){\line(1,0){22}}
2106 % \put(90,20){\makebox(0,0){)}}
2107 % \put(90,10){\makebox(0,0){[}}
2108 % \put(90,10){\line(1,0){22}}
2109 % \put(120,10){\makebox(0,0){2\horodegrees\TaurusSymbol}}
2110 % \end{picture}
2111 % \end{center}
2112 % \caption{Rounding without carry.}
2113 % \label{fig:nocarry-round-deg}
2114 % \end{figure}
2115 %
2116 % Some astrological software uses another scheme, illustrated in
2117 % Figure~\ref{fig:clamped-round-deg}, where positions are in general rounded
2118 % to nearest but the rule changes to truncation at the end of each sign.
2119 % This is essentially the same as the previous rounding mode with the added
2120 % rule that any digit given an out of range value (such as 30\horodegrees)
2121 % is changed to the next lower value. Swiss Ephemeris offers this as one of
2122 % several options in the |swe_split_deg| library function, along with a
2123 % similar mode that introduces truncation at the end of every degree. These
2124 % rounding schemes obey sign (or degree) boundaries, and preserve the
2125 % advantages of rounding to nearest elsewhere. However, this technique is
2126 % asymmetrical, and it creates two different kinds of exceptional degrees
2127 % around sign boundaries: 0\horodegrees\ is 30\horominutes\ long,
2128 % 1\horodegrees\ldots28\horodegrees\ are 60\horominutes\ each, and then
2129 % 29\horodegrees\ is 90\horominutes. This technique is mentioned for
2130 % completeness and because some users may want it; it is not particularly
2131 % recommended. Its advantage over rounding without carry is that it will
2132 % never produce confusing labels like 30\horodegrees.
2133 %
2134 % \begin{figure}
2135 % \begin{center}
2136 % \setlength{\unitlength}{1.2pt}
2137 % \begin{picture}(260,50)(-130,-20)
2138 % \put(-125,0){\line(1,0){250}}
2139 % \multiput(-120,-2)(10,0){25}{\line(0,1){4}}
2140 % \put(-120,-5){\line(0,1){10}}
2141 % \put(-60,-5){\line(0,1){10}}
2142 % \put(0,-5){\line(0,1){10}}
2143 % \put(60,-5){\line(0,1){10}}
2144 % \put(120,-5){\line(0,1){10}}
2145 % \put(-120,-10){\makebox(0,0){28\horodegrees\AriesSymbol}}
2146 % \put(-60,-10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2147 % \put(0,-10){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2148 % \put(60,-10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2149 % \put(120,-10){\makebox(0,0){2\horodegrees\TaurusSymbol}}
2150 % \put(-120,20){\makebox(0,0){28\horodegrees\AriesSymbol}}
2151 % \put(-109,20){\line(1,0){19}}
2152 % \put(-90,20){\makebox(0,0){)}}
2153 % \put(-90,10){\makebox(0,0){[}}
2154 % \put(-90,10){\line(1,0){34}}
2155 % \put(-45,10){\makebox(0,0){29\horodegrees\AriesSymbol}}
2156 % \put(-34,10){\line(1,0){34}}
2157 % \put(0,10){\makebox(0,0){)}}
2158 % \put(0,20){\makebox(0,0){[}}
2159 % \put(0,20){\line(1,0){7}}
2160 % \put(15,20){\makebox(0,0){0\horodegrees\TaurusSymbol}}
2161 % \put(22,20){\line(1,0){8}}
2162 % \put(30,20){\makebox(0,0){)}}
2163 % \put(30,10){\makebox(0,0){[}}
2164 % \put(30,10){\line(1,0){22}}
2165 % \put(60,10){\makebox(0,0){1\horodegrees\TaurusSymbol}}
2166 % \put(68,10){\line(1,0){22}}
2167 % \put(90,10){\makebox(0,0){)}}
2168 % \put(90,20){\makebox(0,0){[}}
2169 % \put(90,20){\line(1,0){22}}
2170 % \put(120,20){\makebox(0,0){2\horodegrees\TaurusSymbol}}
2171 % \end{picture}
2172 % \end{center}
2173 % \caption{Rounding with truncation at end of sign.}
2174 % \label{fig:clamped-round-deg}
2175 % \end{figure}
2176 %
2177 % A philosophical issue exists regarding treatment of points that may happen
2178 % to be exactly on sign boundaries. Is the exact equinoctial point, for
2179 % instance, properly described as part of Aries, part of Pisces, neither, or
2180 % both? This is essentially the same question as whether the exact moment
2181 % of noon (in civil time) should be called ``12:00~AM,'' ``12:00~PM,'' or
2182 % something special of its own. In mathematical terms, the question is
2183 % whether signs are open or closed at their ends. As implied by the use of
2184 % ``['' and ``)'' in the figures in this section, \textsf{horoscop} assumes
2185 % that signs are half-open intervals closed at the beginning and open at the
2186 % end, so that the equinoctial point is part of Aries and not part of
2187 % Pisces. This approach is consistent with the convention that noon is
2188 % 12:00~PM and midnight is 12:00~AM.
2189 %
2190 % It is possible to argue using antiscion relationships that the Zodiac
2191 % ought to be symmetric under a flip between retrograde and direct. The
2192 % half-open interval scheme breaks that symmetry. Preserving it would
2193 % require that cusps must be in both signs, or in neither---like saying that
2194 % noon and midnight must always be called noon and midnight instead of AM or
2195 % PM, or that ``12:00~AM'' and ``12:00~PM'' each refer to both moments.
2196 % Such an approach has obvious problems for computer systems that try to
2197 % assign one of twelve sign symbols to every position. Because of the
2198 % limited precision both of computer arithmetic and the observations on
2199 % which astrological calculations ultimately rest, it is not clear that we
2200 % can ever really say a calculated position is \emph{exactly} on a cusp
2201 % anyway; there is always some amount of fuzz;\footnote{The eminent
2202 % Professor Doron Zeilberger has suggested an ``ultrafinitist''
2203 % intepretation under which the real number line itself has limited
2204 % precision, so that points exactly on certain boundaries do not necessarily
2205 % exist \emph{even in theory}. He was probably joking, but so might I be.
2206 % See \emph{``Real'' Analysis is a Degenerate Case of Discrete Analysis},
2207 % D.~Zeilberger,
2208 % \changes{v1.0}{2020/07/20}{Upgrade links to HTTPS}
2209 % \url{https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/real.html}.}
2210 % so the decision on how to represent truly exact cusps seems not to be of
2211 % much practical consequence anyway.
2212 %
2213 % \subsubsection{Automatic rounding}
2214 % The default configuration of \textsf{horoscop} is to automatically choose
2215 % a sensible rounding mode in each situation. As long as you stick to the
2216 % ready-made wheel templates, don't change the smart label strings, and
2217 % don't care about the arcane details described in the previous subsection,
2218 % you don't need to do anything about rounding and it will just work.
2219 %
2220 % \DescribeMacro{\hororoundautofalse}
2221 % \DescribeMacro{\hororoundautotrue}
2222 % In more detail: automatic rounding mode selection is on by default. It
2223 % can be turned off and on with |\hororoundautofalse| and
2224 % |\hororoundautotrue| respectively. When this mode is active, the package
2225 % will switch to |\hororoundtoseckeepmin| for text-mode typeset positions from
2226 % |\horodsmstext|, |\hororoundtruncate| for times and latitude-longitude
2227 % coordinates, |\hororoundtominkeepdeg| for labels typeset in the Vancouver
2228 % wheel template, and |\hororoundtodegkeepsign| for labels in the Montreal
2229 % and Quebec City templates. These modes are described in more detail
2230 % below. The rationale for their choice is that time and geographic
2231 % coordinates would have been entered by the user to precision of
2232 % seconds, and should always match what the user entered. For Zodiac
2233 % positions as such, the automated choice is rounding without carry, as
2234 % shown in Figure~\ref{fig:nocarry-round-deg}, generalized to the level of
2235 % precision in the particular label.
2236 %
2237 % If you design a template of your own, it would be a nice added feature to
2238 % make it automatically choose an appropriate rounding mode when automatic
2239 % rounding mode selection is in force. \DescribeMacro{\ifhororoundauto} Test
2240 % it with |\ifhororoundauto|; see the source code of the existing templates
2241 % for examples of how this test can be used.
2242 %
2243 % \subsubsection{Manual rounding modes}
2244 % When |\hororoundautofalse| is active, the user must choose rounding modes
2245 % manually. There are 11 basic modes, and six of them can be modified
2246 % by turning on clamping, for a total of 17 manually-selected rounding
2247 % modes.
2248 %
2249 % \DescribeMacro{\hororoundtruncate}
2250 % Truncation, as in Figure~\ref{fig:truncate-deg}, is selected by
2251 % |\hororoundtruncate|. This rounding mode is actually not pure truncation;
2252 % it adds an offset of $1\horodegrees/65536$ before doing the truncation in
2253 % order to compensate for precision lost in the internal representation of
2254 % angles. Without the offset, values entered in degrees or hours, minutes,
2255 % and integer seconds, converted to internal form, and then converted back,
2256 % would usually end up one second less than the input value. The offset
2257 % makes sure that exact whole-second values will survive a round trip
2258 % conversion. However, if for some reason a really strict truncation with
2259 % no offset is desired, that can be selected with
2260 % \DescribeMacro{\hororoundstricttruncate}|\hororoundstricttruncate|. It is
2261 % not necessary to specify what boundaries to truncate to, because the digit
2262 % values are the same; if you want less precision, just write out fewer of
2263 % the mixed-base digits.
2264 %
2265 % True rounding to the nearest unit, as shown for degrees in
2266 % Figure~\ref{fig:pure-round-deg}, is not recommended for the reasons
2267 % described in the previous subsection. However, it is available if
2268 % desired, via the macros
2269 % \DescribeMacro{\hororoundtosec}
2270 % \DescribeMacro{\hororoundtomin}
2271 % \DescribeMacro{\hororoundtodeg}
2272 % |\hororoundtosec|, |\hororoundtomin|, and |\hororoundtodeg|. Note that if
2273 % you select rounding to a unit larger than seconds, then rounding will put
2274 % nonsense values in the smaller-unit digits; so, for instance, if using the
2275 % Vancouver template (which displays degrees and minutes by default) with
2276 % rounding to the nearest degree, it is important to change the label string
2277 % to only display degrees.
2278 %
2279 % The remaining manual modes specify rounding to the nearest of one unit
2280 % while keeping the boundaries of a larger unit intact, in a generalization of
2281 % the scheme shown in Figure~\ref{fig:nocarry-round-deg}. The choices are
2282 % \DescribeMacro{\hororoundtoseckeepsign}
2283 % \DescribeMacro{\hororoundtoseckeepdeg}
2284 % \DescribeMacro{\hororoundtoseckeepmin}
2285 % \DescribeMacro{\hororoundtominkeepsign}
2286 % \DescribeMacro{\hororoundtominkeepdeg}
2287 % \DescribeMacro{\hororoundtodegkeepsign}
2288 % |\hororoundtoseckeepsign|,
2289 % |\hororoundtoseckeepdeg|,
2290 % |\hororoundtoseckeepmin|,
2291 % |\hororoundtominkeepsign|,
2292 % |\hororoundtominkeepdeg|, and
2293 % |\hororoundtodegkeepsign|. In general it is probably most useful to round
2294 % to the smallest unit you will be displaying and keep the boundaries of the
2295 % next larger unit (i.e.\ -|seckeepmin|, -|minkeepdeg|, or -|degkeepsign|),
2296 % but the others are provided to cover some possibilities offered by other
2297 % software. As with the pure rounding modes, these modes leave garbage in
2298 % any digits smaller than the rounding unit and you should not display any
2299 % digits less significant than the one you rounded to.
2300 %
2301 % By default the ``keep boundaries'' modes can generate out-of-range digits
2302 % like 30\horodegrees. If you want to prevent that by switching to
2303 % truncation (clamping the values) at the ends of higher-level units, as in
2304 % \DescribeMacro{\hororoundclamptrue}
2305 % Figure~\ref{fig:clamped-round-deg}, turn on |\hororoundclamptrue|. This
2306 % modification of the rounding algorithm is deprecated, but provided for
2307 % compatibility. It can also be used to modify the automatic mode selection
2308 % of |\hororoundautotrue|. Turn it off with
2309 % \DescribeMacro{\hororoundclampfalse}
2310 % |\hororoundclampfalse|.
2311 %
2312 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2313 %
2314 % \subsection{Adding Custom Objects}
2315 % \label{sub:adding-objects}
2316 %
2317 % The Swiss Ephemeris calculation backend can potentially compute
2318 % positions for a great many objects beyond the ones enabled by default.
2319 % This section describes how to add support for a customized object, with
2320 % the example of adding the dwarf planet 136199~Eris (formerly
2321 % 2003~UB$_{313}$, once tentatively named Xena) to the birth chart of Lucy
2322 % Lawless.
2323 %
2324 % First, define a |\horo|\meta{object}|SEOpt| macro specifying the
2325 % |swetest| command-line option(s)
2326 % for calculating the object's position. For Eris, those are |-ps| (planet
2327 % to calculate is one of the ``small'' ones to be designated by number) and
2328 % \changes{v0.92}{2013/05/15}{Use official MPC number for Eris}
2329 % |-xs136199| (planet number 136199\footnote{For current versions of
2330 % Swiss Ephemeris. Some versions published between the discovery of the
2331 % planet and the assignment of its official number referred to it as object
2332 % number 999001.}). Other asteroid-like objects would be designated
2333 % similarly; see the |swetest| documentation for how to select other kinds
2334 % of objects.
2335 %
2336 % \begin{verbatim}
2337 % \newcommand{\horoErisSEOpt}{-ps -xs136199}
2338 % \end{verbatim}
2339 %
2340 % The chart plotting system also needs a |\|\meta{object}|Symbol| macro.
2341 % The symbol macro can be as complicated as necessary; for the example we
2342 % just use a letter X.
2343 %
2344 % \begin{verbatim}
2345 % \newcommand{\ErisSymbol}{X}
2346 % \end{verbatim}
2347 %
2348 % Having defined those macros it only remains to add the new object to the
2349 % |\horoobjects| list and proceed as with any other chart. The result is
2350 % shown in Figure~\ref{fig:custom-object}.
2351 %
2352 % \begin{figure}
2353 % \horocalcparms{1968}{3}{28}{18:25:0}{E174:46:0}{S36:52:0}
2354 % \newcommand{\horoErisSEOpt}{-ps -xs136199}
2355 % \newcommand{\ErisSymbol}{X}
2356 % \renewcommand{\horoobjects}{Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn,Uranus,Neptune,Pluto,Eris}
2357 % \horocalculate
2358 % \begin{horoscope}
2359 % \renewcommand{\horotextsize}{1}
2360 % \horowheelVancouver
2361 % \horoULnote{Lucy Lawless}
2362 % \end{horoscope}
2363 %
2364 % \begin{verbatim}
2365 % \horocalcparms{1968}{3}{28}{18:25:0}{E174:46:0}{S36:52:0}
2366 % \newcommand{\horoErisSEOpt}{-ps -xs136199}
2367 % \newcommand{\ErisSymbol}{X}
2368 % \renewcommand{\horoobjects}{Sun,Moon,Mercury,Venus,%
2369 % Mars,Jupiter,Saturn,Uranus,Neptune,Pluto,Eris}
2370 % \horocalculate
2371 % \begin{horoscope}
2372 % \renewcommand{\horotextsize}{1}
2373 % \horowheelVancouver
2374 % \horoULnote{Lucy Lawless}
2375 % \end{horoscope}
2376 % \end{verbatim}
2377 % \caption{Adding a custom object.}
2378 % \label{fig:custom-object}
2379 % \end{figure}
2380 %
2381 % Adding customized objects for use with the Astrolog calculation backend
2382 % may be possible, but less easy. Macros would have to be defined for
2383 % two-way translation between the names used in \textsf{horoscop} and the
2384 % abbreviations used in the Astrolog command line and output file. That is
2385 % unsupported and so the macros involved have been given @ names to mark
2386 % them as private. It is less useful in the case of Astrolog anyway
2387 % because, unlike Swiss Ephemeris, current Astrolog does not support an
2388 % arbitrarily growing set of calculable objects.
2389 %
2390 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2391 %
2392 % \subsection{Special Charts}
2393 %
2394 % People sometimes want to compute and display special kinds of charts,
2395 % other than the basic one representing the time and place of a native's
2396 % birth. Here are some notes on those.
2397 %
2398 % Relocation:
2399 % A relocation chart is just the chart for a different geographic
2400 % location at the native's moment of birth, so you can substitute the
2401 % appropriate coordinates into the |\horocalcparms| command and proceed as
2402 % with any other chart.
2403 %
2404 % Transits, Solar returns, horary, etc.:
2405 % These charts are also just ordinary charts for special times and
2406 % locations, so they can be calculated normally given the right data.
2407 % There is currently no
2408 % special support for automatically calculating the data to use, for
2409 % instance to get the exact time of a Solar return.
2410 %
2411 % Secondary progressions:
2412 % A progressed chart is basically a standard birth chart with the birth time
2413 % advanced (or retarded, in the case of converse progression) by a number of
2414 % days equal to the number of years since the birth.
2415 % The package can calculate these with no problem if you enter an
2416 % appropriately modified birth date and time. However, there is no special
2417 % support for computing the right data to enter. Some astrologers
2418 % also use computation methods that are not equivalent to computing a
2419 % standard chart for any real time and place---for instance, moving house
2420 % cusps by a fixed angle while moving planets according to their actual
2421 % motion in the sky. Some of these can be accomplished by computing a
2422 % standard chart and then using |\horoshiftobjects| or |\horoshiftcusps| to
2423 % move the objects or cusps by the appropriate angle, but the user must
2424 % calculate for themselves the angles they wish to use.
2425 %
2426 % Solar arc progression:
2427 % This consists of computing an angle based on the Sun's progression and
2428 % then adding it uniformly to all the object locations. The result does not
2429 % represent the sky at any real time and place. This kind of chart can be
2430 % calculated by computing the original natal chart and then using
2431 % |\horoshiftobjects| to move the objects through the appropriate angle.
2432 % There is no built-in support for computing the appropriate angle; the user
2433 % must provide that,
2434 %
2435 % Synastry:
2436 % A synastry chart normally shows one person's objects in another person's
2437 % houses. These can be typeset using the |\horosavecusps| command: compute
2438 % one chart, use |\horosavecusps| to save the cusps to a macro, then compute
2439 % the other chart and restore the cusps from the first one by calling the
2440 % created macro before typesetting the synastry chart. See the next section
2441 % for information on creating an aspect web between the objects of two
2442 % different charts; though at present, there is no template for showing two
2443 % sets of objects on a Vancouver-like traditional wheel chart.
2444 %
2445 % Midpoint composite:
2446 % No current support. Many things can go wrong with these charts in the
2447 % worst case (for instance, house cusps can end up out of sequence if the
2448 % two ascendants are near opposition), and they do not represent the actual
2449 % sky at any real time and place. If necessary, they can be typeset by
2450 % manually setting the Pos variables for the objects, then copying Pos to
2451 % DPos, before calling the template macros.
2452 %
2453 % Time-space midpoint (Davison):
2454 % This type of midpoint chart does represent the actual sky at a real time
2455 % and place (the midpoint of the birth times and locations of two people) so
2456 % it can be obtained by entering the appropriate midpoint with
2457 % |\horocalcparms| and proceeding normally. There is no built-in support
2458 % provided for calculating that midpoint, and supporting it would require a
2459 % clearer definition of geographic ``midpoint.'' Most people\footnote{For
2460 % instance, based on an inspection of the source code this seems to be what
2461 % Astrolog does.} seem to do it by
2462 % computing the numerical midpoint of the latitude and longitude, as angles,
2463 % but that is not necessarily the same as the midpoint of the great-circle
2464 % line between the two points, which might have more symbolic
2465 % validity. This kind of issue seems to be beyond the intended scope of the
2466 % current version of \textsf{horoscop}.
2467 %
2468 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2469 %
2470 % \subsection{Aspects Between Two Charts}
2471 % \label{sub:between-two}
2472 %
2473 % The aspect web in the standard chart templates normally shows aspects
2474 % among the objects within a single chart. By clever hacking of the
2475 % |\horoaspectobjectsa| and |\horoaspectobjectsb| macros, however, it is
2476 % possible to make it display aspects between two different sets of objects,
2477 % for instance between natal and transiting objects. See
2478 % Figure~\ref{fig:marilyn-transit} for an example.\footnote{The figure shows
2479 % the death of Marilyn Monroe, an event which happened at an uncertain time;
2480 % 3:00~AM, when her housekeeper phoned the psychiatrist after discovering
2481 % the body, was used for the calculation.}
2482 %
2483 % \begin{figure}
2484 % \horocalcparms{1962}{8}{5}{10:0:0}{W118:19:0}{N34:08:0}
2485 % \horocalculate\horosaveobjects{\MarilynDeath}
2486 % \horocopyvar{\horoobjects}{Pos}{XPos}
2487 % \horocalcparms{1926}{6}{1}{17:30:0}{W118:15:0}{N34:04:0}
2488 % \horocalculate\horosaveobjects{\MarilynBirth}
2489 % \horocalculate
2490 % \begin{horoscope}
2491 % \renewcommand\horoaspectobjectsa{SunX,MoonX,MercuryX,VenusX,MarsX,JupiterX,SaturnX,UranusX,NeptuneX,PlutoX,MeanNodeX,LilithX,ChironX,CeresX,PallasX,JunoX,VestaX}
2492 % \horowheelIgloolik{\MarilynBirth}{\MarilynDeath}
2493 % \horoULnote{Inner: Marilyn Monroe (birth)}
2494 % \horoURnote{Outer: Marilyn Monroe (death)}
2495 % \horoLLnote{Birth to death aspects}
2496 % \end{horoscope}
2497 %
2498 % \begin{verbatim}
2499 % \horocalcparms{1962}{8}{5}{10:0:0}{W118:19:0}{N34:08:0}
2500 % \horocalculate\horosaveobjects{\MarilynDeath}
2501 % \horocopyvar{\horoobjects}{Pos}{XPos}
2502 % \horocalcparms{1926}{6}{1}{17:30:0}{W118:15:0}{N34:04:0}
2503 % \horocalculate\horosaveobjects{\MarilynBirth}
2504 % \horocalculate
2505 % \begin{horoscope}
2506 % \renewcommand\horoaspectobjectsa%
2507 % {SunX,MoonX,MercuryX,VenusX,MarsX,JupiterX,SaturnX,%
2508 % UranusX,NeptuneX,PlutoX,%
2509 % NorthNodeX,LilithX,ChironX,CeresX,PallasX,JunoX,VestaX}
2510 % \horowheelIgloolik{\MarilynBirth}{\MarilynDeath}
2511 % \horoULnote{Inner: Marilyn Monroe (birth)}
2512 % \horoURnote{Outer: Marilyn Monroe (death)}
2513 % \horoLLnote{Birth to death aspects}
2514 % \end{horoscope}
2515 % \end{verbatim}
2516 % \caption{Aspects between two charts.}
2517 % \label{fig:marilyn-transit}
2518 % \end{figure}
2519 %
2520 % We start by calculating both sets of objects and saving them to macros
2521 % named |\MarilynBirth| and |\MarilynDeath|. After calculating the first
2522 % set we use the |\horocopyvar| macro to copy what is currently in the Pos
2523 % variable for each object (the positions at death) into a new variable
2524 % called XPos. Since this is not a standard variable used by the rest of
2525 % the system, other macros will not touch it by default.
2526 %
2527 % Then we redefine |\horoaspectobjectsa| to be the list of default objects
2528 % with X appended to each of their names. That's the clever bit. When the
2529 % aspect web attempts to look up the Pos of an object like the Sun, it will
2530 % look in a macro called |\horoSunXPos|, which is the copied value of Pos
2531 % from the Sun at the time we did the copying. That is the death
2532 % location; meanwhile the Pos values will be for the inner chart, using the
2533 % default value of |\horoaspectobjectsb|. The inner chart is the birth
2534 % chart, so the aspect web shows aspects between birth objects and death
2535 % objects.
2536 %
2537 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2538 %
2539 % \subsection{Label Adjustments}
2540 %
2541 % In general, it is desirable to put object labels on the chart in
2542 % angular positions that correspond to their actual longitudes. However,
2543 % when objects are close together in longitude, that can result in labels
2544 % being printed on top of each other. The problem gets worse when other
2545 % things are added to the chart, such as house cusps and internal house
2546 % labels. One of the steps in typesetting a wheel chart involves an
2547 % adjustment process that moves the labels around to keep them from
2548 % interfering with each other and with house cusps. This process has a
2549 % number of adjustable parameters, set by redefining internal macros. In
2550 % general it should not be necessary to change these parameters while using
2551 % the ready-made templates, but designers of new templates may need to set
2552 % them, and some changes may also be needed if you modify the sizes of labels.
2553 %
2554 % See Figures~\ref{fig:lee-interfering}--\ref{fig:lee-strange} for some
2555 % examples of the effects of these options. In
2556 % Figure~\ref{fig:lee-interfering} the adjustment process has been disabled
2557 % by setting the minimum distances to zero, so labels are free to interfere.
2558 % Internal house labels are turned on to exacerbate the crowding.
2559 % In Figure~\ref{fig:lee-default}, the distances have been increased to show
2560 % how cusps will be modified to expand houses where necessary. Note the
2561 % crowded eleventh house, which the system has expanded to make room for
2562 % all the labels that must fit there. In Figure~\ref{fig:lee-strange},
2563 % the options have been set to prevent cusps from being modified, even at
2564 % the cost of crowding a house. Note the difference between this situation
2565 % and Figure~\ref{fig:lee-interfering}, visible for instance in the eighth
2566 % and ninth houses: labels can still move, but cusps cannot.
2567 %
2568 % \begin{figure}
2569 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2570 % \horocalculate
2571 % \begin{horoscope}
2572 % \horointhouselabelstrue
2573 % \renewcommand{\horotextsize}{2}
2574 % \renewcommand{\horooomindist}{0}
2575 % \renewcommand{\horoocmindist}{0}
2576 % \horowheelVancouver
2577 % \horoULnote{Bruce Lee}
2578 % \end{horoscope}
2579 %
2580 % \begin{verbatim}
2581 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2582 % \horocalculate
2583 % \begin{horoscope}
2584 % \horointhouselabelstrue
2585 % \renewcommand{\horotextsize}{2}
2586 % \renewcommand{\horooomindist}{0}
2587 % \renewcommand{\horoocmindist}{0}
2588 % \horowheelVancouver
2589 % \horoULnote{Bruce Lee}
2590 % \end{horoscope}
2591 % \end{verbatim}
2592 % \caption{Labels printed at their longitudes without adjustment.}
2593 % \label{fig:lee-interfering}
2594 % \end{figure}
2595 %
2596 % \begin{figure}
2597 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2598 % \horocalculate
2599 % \begin{horoscope}
2600 % \horointhouselabelstrue
2601 % \renewcommand{\horotextsize}{2}
2602 % \renewcommand{\horooomindist}{15.0}
2603 % \renewcommand{\horoocmindist}{10.0}
2604 % \renewcommand{\horomaxrepulsion}{15.0}
2605 % \horowheelVancouver
2606 % \horoULnote{Bruce Lee}
2607 % \end{horoscope}
2608 %
2609 % \begin{verbatim}
2610 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2611 % \horocalculate
2612 % \begin{horoscope}
2613 % \horointhouselabelstrue
2614 % \renewcommand{\horotextsize}{2}
2615 % \renewcommand{\horooomindist}{15.0}
2616 % \renewcommand{\horoocmindist}{10.0}
2617 % \renewcommand{\horomaxrepulsion}{15.0}
2618 % \horowheelVancouver
2619 % \horoULnote{Bruce Lee}
2620 % \end{horoscope}
2621 % \end{verbatim}
2622 % \caption{Extra space between labels.}
2623 % \label{fig:lee-default}
2624 % \end{figure}
2625 %
2626 % \begin{figure}
2627 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2628 % \horocalculate
2629 % \begin{horoscope}
2630 % \horointhouselabelstrue
2631 % \renewcommand{\horotextsize}{2}
2632 % \renewcommand{\horocuspadjusttrigger}{1}
2633 % \horowheelVancouver
2634 % \horoULnote{Bruce Lee}
2635 % \end{horoscope}
2636 %
2637 % \begin{verbatim}
2638 % \horocalcparms{1940}{11}{27}{15:12:0}{W122:25:0}{N37:47:0}
2639 % \horocalculate
2640 % \begin{horoscope}
2641 % \horointhouselabelstrue
2642 % \renewcommand{\horotextsize}{2}
2643 % \renewcommand{\horocuspadjusttrigger}{1}
2644 % \horowheelVancouver
2645 % \horoULnote{Bruce Lee}
2646 % \end{horoscope}
2647 % \end{verbatim}
2648 % \caption{Crowded houses permitted.}
2649 % \label{fig:lee-strange}
2650 % \end{figure}
2651 %
2652 % \DescribeMacro{\horooomindist}
2653 % \DescribeMacro{\horoocmindist}
2654 % The minimum distance targets in degrees are set by |\horooomindist| (note
2655 % triple |o| in name) and |\horocmindist|, for ``|\horo| object-object
2656 % minimum distance'' and ``|\horo| object-cusp minimum distance''
2657 % respectively. The defaults are 6\horodegrees\ object to object and
2658 % 4\horodegrees\ object to cusp. Any labels that are separated by less than
2659 % this will be subject to movement.
2660 %
2661 % \DescribeMacro{\horoposattobj}
2662 % \DescribeMacro{\horoposattcusp}
2663 % \DescribeMacro{\hororepulsion}
2664 % The sizes of the adjustments (or strengths of the springs) are determined
2665 % by three divisors applied to the distances between things and where they
2666 % should be. Note that these must be integers, and they are {\em divisors},
2667 % so larger values mean weaker attraction or repulsion. The
2668 % |\horoposattobj| macro sets the attraction between objects and their
2669 % longitudes; the |\horoposattcusp| macro is, similarly, the attraction
2670 % between cusps and their longitudes; and the |\hororepulsion| macro sets
2671 % the repulsion between things (both cusps and objects) that are closer than
2672 % their target distances. The defaults are |20|, |7|, and |3| respectively,
2673 % so cusps spring toward their longitudes about three times as strongly as
2674 % objects do (if cusps are allowed to move at all), and things that are
2675 % crowded together spring apart a little more than twice as strongly as
2676 % that.
2677 %
2678 % Note that the spring strength settings are for adjusting
2679 % the {\em relative} strengths of the different kind of adjustments. It
2680 % will not work to increase or decrease all three uniformly to make
2681 % the overall layout looser or tighter, because the system will simply make
2682 % more or fewer iterations and end up with substantially the same solution.
2683 % Overall looser-tighter control should instead be exercised by changing
2684 % the minimum distances.
2685 %
2686 % \DescribeMacro{\horosignificantadj}
2687 % Label adjustment is done by an iterative processes that approximately
2688 % simulates a system of springs. Each label is subject to tension when it
2689 % is too close to its neighbours or too far from its longitude, and the
2690 % system makes small adjustments to the label locations to reduce the
2691 % tension. The usual way for the process to terminate is if the adjustments
2692 % become so small as to make no visible difference. The
2693 % |\horosignificantadjust| macro sets the threshold in degrees for
2694 % terminating the loop; it defaults to |0.1|.
2695 %
2696 % \DescribeMacro{\horoadjcycles}
2697 % There is also a hard limit on how many cycles of adjustment the system
2698 % will do, set by |\horoadjcycles|. The default is |30|, which is almost
2699 % never reached in practice because the |\horosignificantadj| terminating
2700 % condition will normally trigger before that. However, the
2701 % |\horoadjcycles| is for each overall attempt at convergence; if cusp
2702 % adjustment, described next, happens to be triggered, then it will start
2703 % over with a fresh set of |30| (or however many) iterations.
2704 %
2705 % \DescribeMacro{\horocuspadjusttrigger}
2706 % Adjustment will first try to find a converged solution without moving any
2707 % house cusps. Once it does, it will compare the worst separation among
2708 % objects and cusps actually achieved, against the configured target
2709 % separation. If the result is less than |\horocuspadjusttrigger| as a
2710 % percentage of the target, then adjustment without moving house cusps is
2711 % considered to have failed, and the system will try again with house cusps
2712 % permitted to move. The default is |65|.
2713 %
2714 % \DescribeMacro{\horoadjust}
2715 % The ready-made templates will invoke |\horoadjust| automatically at the
2716 % right time to adjust the locations of objects, but it can also be invoked
2717 % manually in the context of user-created templates. Since most of the
2718 % chart-drawing macros use the current DPos values, it is important to
2719 % invoke |\horoadjust| at the right time: after all things that should be
2720 % drawn at the ``true'' Pos locations and before all things that should have
2721 % their locations adjusted. Consult the source code, and the next section,
2722 % for examples and information useful in deciding exactly when to run the
2723 % adjustment.
2724 %
2725 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2726 %
2727 % \subsection{Designing New Templates}
2728 %
2729 % Many users will be content to simply use the provided horoscope wheel
2730 % templates, but \textsf{horoscop} also provides a set of tools intended for
2731 % more advanced users to design their own wheels. Interested users are
2732 % encouraged to read the relevant parts of the source code and its
2733 % comments for details on how the existing templates work, and imitate their
2734 % approach. This section provides a brief summary of the user-visible
2735 % macros provided.
2736 %
2737 % \subsubsection{Ticks and keys}
2738 % Generally, a wheel template starts by drawing the basic furniture that
2739 % will be shared by all wheels of that type---typically one or more circles,
2740 % a key showing the twelve sign symbols, and perhaps some radial ticks that
2741 % provide an angle scale. Circles can be drawn with the ordinary |\circle|
2742 % command, bearing in mind that the |horoscope| environment is just a
2743 % |picture| of fixed dimensions. Template authors are urged to design for a
2744 % basic radius of 50 to match the existing templates.
2745 %
2746 % \DescribeMacro{\horoputticks}
2747 % The |\horoputticks|\marg{r}\marg{length}\marg{interval} macro creates a
2748 % set of ticks going around the circle starting at
2749 % 0\horodegrees\AriesSymbol\ and every \meta{interval}\horodegrees\
2750 % thereafter, with inner radius \meta{r} and length \meta{length}, so that
2751 % the outer radius is \meta{r}+\meta{length}. All radii are in
2752 % |\horounitlength| units.
2753 %
2754 % \DescribeMacro{\horoputsignkey}
2755 % The |\horoputsignkey|\marg{r} macro creates a sign key, which consists of
2756 % all twelve Zodiac sign symbols, each placed with its centre at radius
2757 % \meta{r} and longitude 15\horodegrees\ into its own sign. One would
2758 % typically use this along with a set of ticks at 30\horodegrees\ intervals
2759 % and spanning the radius of the sign key, to mark the boundaries between
2760 % signs.
2761 %
2762 % \subsubsection{Conditionals for use in templates}
2763 % \DescribeMacro{\ifhorocalculated}
2764 % Macros that operate on the locations of things---especially
2765 % |\horoadjust|---will generally take a long time to run or produce ugly
2766 % results if they happen to run when there are no valid locations in the
2767 % variables. To avoid that scenario, the ready-made templates wrap all such
2768 % macros inside an |\ifhorocalculated|\ldots|\fi| conditional; if the
2769 % template is invoked without valid data, then the relevant parts of the
2770 % chart will simply be blank in the typeset document. Similar measures are
2771 % recommended for any newly-defined templates, because it is inevitable that
2772 % users will eventually attempt to run the template without valid object
2773 % positions.
2774 %
2775 % \DescribeMacro{\ifhorodrawcusps}
2776 % \DescribeMacro{\ifhoroboldangles}
2777 % \DescribeMacro{\ifhoroanglearrows}
2778 % \DescribeMacro{\ifhorointhouselabels}
2779 % \DescribeMacro{\ifhoroaspectweb}
2780 % Some user-settable configuration flags are available through the conditional
2781 % macros named
2782 % |\ifhorodrawcusps|, |\ifhoroboldangles|, |\ifhoroanglearrows|,
2783 % |\ifhorointhouselabels|, and |\ifhoroaspectweb|, and template authors
2784 % may wish to use these to turn on or off special features in the template.
2785 %
2786 % \subsubsection{Drawing sets of graphical elements}
2787 % Most chart designs include sets of lines drawn at angles determined by the
2788 % positions of objects or cusps. The following macros draw things at the
2789 % DPos values of sets of items. A template will typically invoke some of
2790 % these to draw things like the true-location ticks corresponding to
2791 % objects, then call |\horoadjust| to set the DPos values to keep labels
2792 % from interfering, then draw the labels and call these macro again to draw
2793 % things like the possibly-shifted house cusps that are subject to
2794 % adjustment.
2795 %
2796 % \DescribeMacro{\horoputradials}
2797 % Most templates draw radial lines at angles corresponding to object or cusp
2798 % longitudes, using |\horoputradials|\marg{objects}\marg{r}\marg{length}.
2799 % The \meta{objects} argument should be a comma-separated list of things
2800 % that will describe the longitudes for the radials. It might typically be
2801 % |\horoobjects|, |\horocusps|, or
2802 % \DescribeMacro{\horoangularcusps}|\horoangularcusps|. The inner radius is
2803 % equal to \meta{r}, and the length of each line is \meta{length}. Radials
2804 % will be drawn at the DPos values for all the listed objects.
2805 %
2806 % \DescribeMacro{\horoputarrows}
2807 % The |\horoputarrows| macro has the same syntax as
2808 % |\horoputradials|. It places arrowheads (not actually complete arrows)
2809 % pointing outward with their tips on the circle of radius \meta{r}. The
2810 % \meta{length} value sets the size of the arrowheads: they will be sized to
2811 % fit inside boxes of $3\times 2$ this length. To draw complete arrows,
2812 % draw a matching set of radial lines to connect with the arrowheads.
2813 %
2814 % \DescribeMacro{\horoputinthouselabels}
2815 % Use |\horoputinthouselabels|\marg{radius} to draw a set of internal house
2816 % labels. For
2817 % this to work, |\ifhorointhouselabels| must be true and |\horoadjust| must
2818 % have been called; otherwise, the locations for the labels will not have
2819 % been calculated. Each house label results in a call to |\horohouselabel|,
2820 % which by default typesets the |horohouse| \LaTeX\ counter in uppercase Roman
2821 % numerals. It can be redefined to get some other style. The centres of
2822 % the labels are set at radius \meta{radius}; they are attracted to the
2823 % longitudes of the midpoints of the houses, but may be shifted somewhat by
2824 % the adjustment process to avoid interfering with other labels.
2825 %
2826 % \subsubsection{Single linework objects}
2827 % For finer control, template authors can also invoke macros to draw
2828 % things on the chart one at a time at specified coordinates, instead of in
2829 % sets. Object positions are available to use as coordinates, by invoking
2830 % the relevant variable macros such as |\horoSunDPos|. It is generally
2831 % preferable to use DPos rather than Pos so as to pick up the results of any
2832 % adjustment.
2833 %
2834 % \DescribeMacro{\horoputradial}
2835 % Note this is distinct from the similarly-named |\horoputradials|. The
2836 % |\horo|-|putradial|\marg{radius}\marg{length}\marg{theta} macro draws a
2837 % radial line out from the point at radius \meta{radius} and
2838 % longitude \meta{theta} for a length of \meta{length}.
2839 %
2840 % \DescribeMacro{\horoputline}
2841 % The more general line-drawing macro,
2842 % |\horoputline|\marg{r1}\marg{theta1}\marg{r2}-\marg{theta2}, draws a line
2843 % between any two points given in polar coordinates.
2844 %
2845 % \DescribeMacro{\horoputarrowhead}
2846 % The |\horoputarrowhead|\marg{r}\marg{theta}\marg{size} macro creates an
2847 % arrowhead just like the ones made by |\horoputarrows|, at the specified
2848 % polar coordinates and with the size determined by \meta{size}; the
2849 % arrowhead fits into a box of $3\times 2$ the value of \meta{size}. It
2850 % always points outward from the origin.
2851 %
2852 % \DescribeMacro{\horoputcurve}
2853 % The |\horoputcurve|\marg{r1}\marg{theta1}\marg{r2}\marg{theta2} draws a
2854 % smooth curve connecting two points designated by their polar coordinates.
2855 % If the points happen to be at the same radius and not too far apart, the
2856 % curve will approximate a circular arc centred on the origin. If they
2857 % happen to be at the same longitude (theta coordinate) then the curve will
2858 % be a straight line. In other cases it will be somewhere in between these.
2859 % The main intended use is for the jogs drawn when a house cusp is displaced
2860 % by adjustment in charts like Vancouver, although it was later applied to
2861 % the floral shapes in Montreal as well. To draw a complete circle instead
2862 % of an arc, use the existing \LaTeX\ |\circle| macro.
2863 %
2864 % \subsubsection{For-each and things to put in it}
2865 %
2866 % \DescribeMacro{\horoforeach}
2867 % To run a macro on every object in a comma-separated list, call
2868 % |\horoforeach|\marg{list}\marg{macro}. The contents of \meta{macro} will
2869 % be invoked once for each comma-separated item in \meta{list}, with the
2870 % item (in curly braces) added to the end. For instance,
2871 % an invocation of |\horoforeach{x,y,z}{\foo{a}}| would call |\foo{a}{x}|,
2872 % |\foo{a}{y}|, and
2873 % |\foo{a}{z}|. The single-item commands below are all designed to take an
2874 % object or cusp name as their last argument, to make them easy to use with
2875 % |\horoforeach|.
2876 %
2877 % \DescribeMacro{\horoconncurve}
2878 % The |\horoconncurve|\marg{r1}\marg{r2}\marg{object} macro draws a
2879 % connecting curve showing the relationship between the Pos and DPos of
2880 % an object. This would typically be used after |\horoadjust| to connect the
2881 % label of an object, which might have been moved by adjustment, with the
2882 % radial tick showing its true longitude. The curve goes from radius
2883 % \meta{r1} and the object's Pos, to radius \meta{r2} and its DPos.
2884 %
2885 % \DescribeMacro{\horoputcusplabel}
2886 % The |\horoputcusplabel|\marg{radius}\marg{spacing}\marg{object} macro draws a
2887 % style of label designed to show the longitude of an angle or cusp. This
2888 % kind of label appears in the Montreal and QuebecCity chart templates. It
2889 % consists of the degrees, Zodiac sign, and minutes of arc of the object's Pos,
2890 % placed on the circle at radius \meta{r} with the sign symbol at the
2891 % object's DPos and the other two things arranged \meta{spacing} degrees
2892 % away from it on either side, ordered so that they will read
2893 % degrees-sign-minutes as nearly as possible to left-to-right top-to-bottom.
2894 %
2895 % \DescribeMacro{\horoputobjsymbol}
2896 % The |\horoputobjsymbol|\marg{radius}\marg{object} places an object's symbol
2897 % at its DPos and the specified radius
2898 %
2899 % There are three macros called
2900 % \DescribeMacro{\horoputobjdeglabel}|\horoputobjdeglabel|,
2901 % \DescribeMacro{\horoputobjminlabel}|\horoputobjminlabel|, and
2902 % \DescribeMacro{\horoputobjseclabel}|\horoputobjseclabel| for typesetting a
2903 % label showing an object's longitude down to the degree, minute, or second of
2904 % arc. The labels consist of two to four chunks showing the
2905 % the object's Pos in degrees, sign, and possibly minutes and seconds,
2906 % arranged radially on concentric circles and ordered to read in
2907 % degree-sign-minute-second order as nearly as possible to left-to-right
2908 % top-to-bottom. The macros each take three arguments
2909 % \marg{radius}\marg{spacing}\marg{object}, where \meta{radius} is the
2910 % radius on which to place the centre of the innermost label chunk and
2911 % \meta{spacing} is the spacing between successive chunks outward from
2912 % there.
2913 %
2914 % The
2915 % \DescribeMacro{\horoputrxlabel}|\horoputrxlabel|\marg{radius}\marg{object}
2916 % macro typesets an optional retrograde label for the object at the object's
2917 % DPos and radius \meta{radius}: if the object's Vel is negative then the
2918 % label will appear as the value of
2919 % |\horoRetrogradeSymbol| and otherwise it will be blank. A similar
2920 % function for use in text (possibly in tables showing numeric data) is
2921 % provided by \DescribeMacro{\hororxtext}|\hororxtext|\marg{object}.
2922 %
2923 % The \DescribeMacro{\horoputsmartlabel}|\horoputsmartlabel|\marg{object}
2924 % macro provides elaborately-configurable labels as seen in the Vancouver
2925 % template. The macro itself simply plots the label for an object; it must
2926 % be configured in advance using other macros. First,
2927 % \DescribeMacro{\horoscanlabels}|\horoscanlabels|\marg{string} takes
2928 % one or two label format specifiers (separated by a slash if there are two)
2929 % just as documented for the Vancouver template. After calling that to set
2930 % the format strings, use
2931 % \DescribeMacro{\horosetsmartradii}|\horosetsmartradii|%
2932 % \marg{outer}\marg{stepbase}\marg{stepadj} to set the radii for the chunks of
2933 % the label. The outermost chunk will be set with its centre at radius
2934 % \meta{outer}. Successive chunks will be set inside that at a spacing of
2935 % \meta{stepbase}$-n\times$\meta{stepadj}, where $n$ is the number of
2936 % chunks. For instance, with |\horosetsmartradii{30}{7}{1}| and four
2937 % chunks, the radii will be 30, 27, 24, and 21. The reason for this
2938 % apparently unusual design is that a simple even division of a fixed amount
2939 % of space tends to produce excessively wide spacing when there are few
2940 % chunks; with carefully chosen coefficients, this formula seems to produce
2941 % more visually appealing results across the range of typical label lengths.
2942 %
2943 % Label commands set things in the current text size. With smart labels it
2944 % may be desirable to change the text size depending on how many chunks are
2945 % in the label; \DescribeMacro{\horochoosetextsize}|\horochoosetextsize| does
2946 % that, according to the scheme documented for the Vancouver template.
2947 %
2948 % \subsubsection{Drawing the aspect web}
2949 % Low-level macros used in drawing the aspect web are exposed primarily to
2950 % make it easier to do more sophisticated aspect handling than the default,
2951 % such as varying the orb based on the objects involved or more carefully
2952 % selecting which individual aspects to show at all.
2953 %
2954 % The macro
2955 % \DescribeMacro{\horoputaspect}|\horoputaspect|%
2956 % \marg{radius}\marg{theta1}\marg{theta2}\marg{symbol} draws a single
2957 % aspect consisting of a line connecting the points at radius \meta{radius}
2958 % and longitudes \meta{theta1} and \meta{theta2}. The contents of
2959 % \meta{symbol} will be typeset on the midpoint of the line.
2960 %
2961 % To automatically find and draw aspects of a given type, use
2962 % \DescribeMacro{\horoautoaspect}|\horoautoaspect|-%
2963 % \marg{list1}\marg{list2}\marg{angle}\marg{orb}\marg{radius}\marg{symbol}.
2964 % This searches for all
2965 % pairs of one object from \meta{list1} with one object from \meta{list2}
2966 % whose Pos values are \meta{angle}\horodegrees\ apart (in either direction)
2967 % to within \meta{orb}\horodegrees. For each one it invokes |\horoputaspect|
2968 % with the specified \meta{radius} and \meta{symbol}.
2969 %
2970 % Finally, \DescribeMacro{\horoautoaspects}|\horoautoaspects|\marg{radius}
2971 % (note plural) draws a complete aspect web of the kind demonstrated by the
2972 % default templates. It loops through the aspects listed in |\horoaspects|
2973 % running |\horoautoaspect| on each one and using the angle and orb
2974 % information from the corresponding |\horo|\meta{aspect}|Angle| and
2975 % |\horo|\meta{aspect}|Orb| macros.
2976 %
2977 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2978 %
2979 % \StopEventually{}
2980 %
2981 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2982 %
2983 % \section{Implementation}
2984 %
2985 % We start by declaring that this is the start of a \LaTeX$2\varepsilon$
2986 % package and giving it a name.
2987 %
2988 % \begin{macrocode}
2989 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
2990 \ProvidesPackage{horoscop}%
2991 [2020/07/31 v1.01 Astrological chart macros by Matthew Skala]
2992 % \end{macrocode}
2993 %
2994 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2995 %
2996 % \subsection{Initial Option Handling}
2997 %
2998 % All the options correspond to Boolean flags created by |\newif|, which
2999 % then get set appropriately by |\ProcessOptions|. The actual consequences
3000 % of the options are implemented later.
3001 %
3002 % \subsubsection{Symbol choices}
3003 %
3004 % These can all be turned on and off independently.
3005 %
3006 % \changes{v1.0}{2020/07/20}{\texttt{unicode} option}
3007 % \begin{macrocode}
3008 \newif\ifhoro@textsym\horo@textsymfalse
3009 \newif\ifhoro@unicode\horo@unicodefalse
3010 \newif\ifhoro@wasysym\horo@wasysymfalse
3011 \newif\ifhoro@marvosym\horo@marvosymfalse
3012 \newif\ifhoro@starfont\horo@starfontfalse
3013 \DeclareOption{textsym}{\horo@textsymtrue}
3014 \DeclareOption{unicode}{\horo@unicodetrue}
3015 \DeclareOption{wasysym}{\horo@wasysymtrue}
3016 \DeclareOption{marvosym}{\horo@marvosymtrue}
3017 \DeclareOption{starfont}{\horo@starfonttrue}
3018 % \end{macrocode}
3019 %
3020 % \subsubsection{Calculation backends}
3021 %
3022 % At most one of these may be selected, so choosing
3023 % either also turns off the other one's flag, and the
3024 % |nocalc| option turns both flags off.
3025 %
3026 % \begin{macrocode}
3027 \newif\ifhoro@strolog\horo@strologfalse
3028 \newif\ifhoro@swetest\horo@swetesttrue
3029 \DeclareOption{nocalc}{\horo@strologfalse\horo@swetestfalse}
3030 \DeclareOption{astrolog}{\horo@strologtrue\horo@swetestfalse}
3031 \DeclareOption{swetest}{\horo@strologfalse\horo@swetesttrue}
3032 % \end{macrocode}
3033 %
3034 % Declare an |\if| and associated option for |egrep| filtering.
3035 % \begin{macrocode}
3036 \newif\ifhoro@egrep\horo@egrepfalse
3037 \DeclareOption{egrep}{\horo@egreptrue}
3038 % \end{macrocode}
3039 %
3040 % \subsubsection{Higher-level features}
3041 %
3042 % Wheels (the general support for drawing wheels) and
3043 % templates (the specific ready-made wheel designs) can each be turned off.
3044 % Templates require wheels, so turning off wheels also turns off templates.
3045 %
3046 % \begin{macrocode}
3047 \newif\ifhoro@wheels\horo@wheelstrue
3048 \newif\ifhoro@templates\horo@templatestrue
3049 \DeclareOption{nowheels}{\horo@wheelsfalse\horo@templatesfalse}
3050 \DeclareOption{notemplates}{\horo@templatesfalse}
3051 % \end{macrocode}
3052 %
3053 % \subsubsection{Processing the options}
3054 %
3055 % Let \LaTeX\ interpret the option settings.
3056 %
3057 % \begin{macrocode}
3058 \ProcessOptions\relax
3059 % \end{macrocode}
3060 %
3061 % If none of the symbol options were set, then pretend |starfont| was set.
3062 % This is actually expected to be the most common case in actual use.
3063 %
3064 % \begin{macrocode}
3065 \ifhoro@textsym\else
3066 \ifhoro@unicode\else
3067 \ifhoro@wasysym\else
3068 \ifhoro@marvosym\else
3069 \horo@starfonttrue
3070 \fi
3071 \fi
3072 \fi
3073 \fi
3074 % \end{macrocode}
3075 %
3076 % Because \textsf{iftex} defines conditionals, we must load it
3077 % unconditionally. Otherwise the parse of our style file (when it skims
3078 % over not-taken conditional bodies) fails.
3079 %
3080 % \changes{v1.0}{2020/07/02}{Require \textsf{iftex}}
3081 % \begin{macrocode}
3082 \RequirePackage{iftex}%
3083 % \end{macrocode}
3084 %
3085 % Load other packages as needed by the selected options. Since
3086 % there are some name conflicts between macros defined by in different
3087 % packages and we want to retain access to both versions, we save each
3088 % package's versions immediately after loading the packages.
3089 %
3090 % \begin{macrocode}
3091 \ifhoro@wasysym
3092 \RequirePackage{wasysym}%
3093 \let\horow@sySquare\Square
3094 \fi
3095 \ifhoro@marvosym
3096 \RequirePackage{marvosym}%
3097 \let\horom@rvAries\Aries
3098 \let\horom@rvTaurus\Taurus
3099 \let\horom@rvGemini\Gemini
3100 \let\horom@rvCancer\Cancer
3101 \let\horom@rvLeo\Leo
3102 \let\horom@rvVirgo\Virgo
3103 \let\horom@rvLibra\Libra
3104 \let\horom@rvScorpio\Scorpio
3105 \let\horom@rvSagittarius\Sagittarius
3106 \let\horom@rvCapricorn\Capricorn
3107 \let\horom@rvAquarius\Aquarius
3108 \let\horom@rvPisces\Pisces
3109 \let\horom@rvSun\Sun
3110 \let\horom@rvMoon\Moon
3111 \let\horom@rvMercury\Mercury
3112 \let\horom@rvVenus\Venus
3113 \let\horom@rvMars\Mars
3114 \let\horom@rvJupiter\Jupiter
3115 \let\horom@rvSaturn\Saturn
3116 \let\horom@rvUranus\Uranus
3117 \let\horom@rvNeptune\Neptune
3118 \let\horom@rvPluto\Pluto
3119 \fi
3120 \ifhoro@starfont\RequirePackage{starfont}%
3121 \let\horost@rAries\Aries
3122 \let\horost@rTaurus\Taurus
3123 \let\horost@rGemini\Gemini
3124 \let\horost@rCancer\Cancer
3125 \let\horost@rLeo\Leo
3126 \let\horost@rVirgo\Virgo
3127 \let\horost@rLibra\Libra
3128 \let\horost@rScorpio\Scorpio
3129 \let\horost@rSagittarius\Sagittarius
3130 \let\horost@rCapricorn\Capricorn
3131 \let\horost@rAquarius\Aquarius
3132 \let\horost@rPisces\Pisces
3133 \let\horost@rSun\Sun
3134 \let\horost@rMoon\Moon
3135 \let\horost@rMercury\Mercury
3136 \let\horost@rVenus\Venus
3137 \let\horost@rMars\Mars
3138 \let\horost@rJupiter\Jupiter
3139 \let\horost@rSaturn\Saturn
3140 \let\horost@rUranus\Uranus
3141 \let\horost@rNeptune\Neptune
3142 \let\horost@rPluto\Pluto
3143 \let\horost@rSquare\Square
3144 \fi
3145 \ifhoro@wheels
3146 \RequirePackage{pict2e}
3147 \RequirePackage{trig}
3148 \fi
3149 % \end{macrocode}
3150 %
3151 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3152 %
3153 % \subsection{Symbols}
3154 %
3155 % \subsubsection{General symbols}
3156 %
3157 % No special packages needed for these angle symbols; they're all based
3158 % on standard \LaTeX\ symbols.
3159 % \begin{macrocode}
3160 \def\horodegrees{\ensuremath{^\circ}}
3161 \def\horominutes{\ensuremath{'}}
3162 \def\horoseconds{\ensuremath{''}}
3163 % \end{macrocode}
3164 %
3165 %\begin{macro}{\Zodiac}
3166 % Although \textsf{marvosym} and \textsf{starfont} both provide their own
3167 % versions of this, we redefine it to use \textsf{horoscop}'s own abstraction
3168 % layer so it can be applied to all the symbol sets.
3169 % \begin{macrocode}
3170 \def\Zodiac#1{\ifcase#1
3171 \or\AriesSymbol\or\TaurusSymbol\or\GeminiSymbol
3172 \or\CancerSymbol\or\LeoSymbol\or\VirgoSymbol
3173 \or\LibraSymbol\or\ScorpioSymbol\or\SagittariusSymbol
3174 \or\CapricornSymbol\or\AquariusSymbol\or\PiscesSymbol\fi}
3175 % \end{macrocode}
3176 % \end{macro}
3177 %
3178 % None of the packages define symbols specifically for mean versus true
3179 % nodes, so this gets abstracted out and will use whatever the current
3180 % setting for |\NorthNodeSymbol| might be.
3181 % \begin{macrocode}
3182 \def\MeanNodeSymbol{\NorthNodeSymbol$_M$}%
3183 \def\TrueNodeSymbol{\NorthNodeSymbol$_T$}%
3184 % \end{macrocode}
3185 %
3186 % \subsubsection{Text abbreviations}
3187 % These are used as defaults and to replace any symbols not provided by
3188 % other packages. They're all built into the |\horotextsym| command so that
3189 % users who mix symbol sets will be able to switch \emph{back} to this set
3190 % after having defined other symbols.
3191 % \begin{macro}{\horotextsym}
3192 % \begin{macrocode}
3193 \newcommand{\horotextsym}{%
3194 % \end{macrocode}
3195 %
3196 % Signs of the Zodiac:
3197 % \begin{macrocode}
3198 \gdef\AriesSymbol{Ar}%
3199 \gdef\TaurusSymbol{Ta}%
3200 \gdef\GeminiSymbol{Ge}%
3201 \gdef\CancerSymbol{Cn}%
3202 \gdef\LeoSymbol{Le}%
3203 \gdef\VirgoSymbol{Vi}%
3204 \gdef\LibraSymbol{Li}%
3205 \gdef\ScorpioSymbol{Sc}%
3206 \gdef\SagittariusSymbol{Sg}%
3207 \gdef\CapricornSymbol{Cp}%
3208 \gdef\AquariusSymbol{Aq}%
3209 \gdef\PiscesSymbol{Pi}%
3210 % \end{macrocode}
3211 %
3212 % Traditional planets and luminaries:
3213 % \begin{macrocode}
3214 \gdef\SunSymbol{Su}%
3215 \gdef\MoonSymbol{Mo}%
3216 \gdef\MercurySymbol{Me}%
3217 \gdef\VenusSymbol{Ve}%
3218 \gdef\MarsSymbol{Ma}%
3219 \gdef\JupiterSymbol{Ju}%
3220 \gdef\SaturnSymbol{Sa}%
3221 \gdef\UranusSymbol{Ur}%
3222 \gdef\NeptuneSymbol{Ne}%
3223 \gdef\PlutoSymbol{Pl}%
3224 % \end{macrocode}
3225 %
3226 % Minor planets:
3227 % \begin{macrocode}
3228 \gdef\ChironSymbol{Chi}%
3229 \gdef\CeresSymbol{Cer}%
3230 \gdef\PallasSymbol{Pal}%
3231 \gdef\JunoSymbol{Jun}%
3232 \gdef\VestaSymbol{Ves}%
3233 % \end{macrocode}
3234 %
3235 % Derived points:
3236 % \begin{macrocode}
3237 \gdef\NorthNodeSymbol{No}%
3238 \gdef\SouthNodeSymbol{SNo}%
3239 \gdef\LilithSymbol{Lil}%
3240 % \end{macrocode}
3241 %
3242 % House cusps:
3243 % \begin{macrocode}
3244 \gdef\CuspISymbol{ASC}%
3245 \gdef\CuspIISymbol{$2^{nd}$}%
3246 \gdef\CuspIIISymbol{$3^{rd}$}%
3247 \gdef\CuspIVSymbol{IC}%
3248 \gdef\CuspVSymbol{$5^{th}$}%
3249 \gdef\CuspVISymbol{$6^{th}$}%
3250 \gdef\CuspVIISymbol{DSC}%
3251 \gdef\CuspVIIISymbol{$8^{th}$}%
3252 \gdef\CuspIXSymbol{$9^{th}$}%
3253 \gdef\CuspXSymbol{MC}%
3254 \gdef\CuspXISymbol{$11^{th}$}%
3255 \gdef\CuspXIISymbol{$12^{th}$}%
3256 % \end{macrocode}
3257 %
3258 % Angles (in case these are distinct from house cusps):
3259 % \begin{macrocode}
3260 \gdef\AscendantSymbol{ASC}%
3261 \gdef\MCSymbol{MC}%
3262 \gdef\VertexSymbol{Vtx}%
3263 % \end{macrocode}
3264 %
3265 % Direction:
3266 % \begin{macrocode}
3267 \gdef\horoRetrogradeSymbol{Rx}%
3268 % \end{macrocode}
3269 %
3270 % Aspects:
3271 % \begin{macrocode}
3272 \gdef\horoConjunctionSymbol{Con}%
3273 \gdef\horoOppositionSymbol{Opp}%
3274 \gdef\horoTrineSymbol{Tri}%
3275 \gdef\horoSquareSymbol{Sqr}%
3276 \gdef\horoQuintileSymbol{Qnt}%
3277 \gdef\horoBiquintileSymbol{Bqi}%
3278 \gdef\horoSextileSymbol{Sex}%
3279 \gdef\horoQuincunxSymbol{Qcx}%
3280 \gdef\horoSemisextileSymbol{Ssx}%
3281 \gdef\horoSemisquareSymbol{Ssq}%
3282 \gdef\horoSesquiquadrateSymbol{Sqq}%
3283 }
3284 % \end{macrocode}
3285 % \end{macro}
3286 %
3287 % Now invoke |\horotextsym| unconditionally to provide initial defaults.
3288 % \begin{macrocode}
3289 \horotextsym
3290 % \end{macrocode}
3291 %
3292 % \subsubsection{Unicode astrological symbols}
3293 %
3294 % \changes{v1.0}{2020/07/20}{\texttt{unicode} option}
3295 % As with |textsym|, the actual setting of the symbol macros is all inside a
3296 % |unicode|-specific macro so that we can switch back to it easily
3297 % after using other symbol sets. The macro |\horounicode@| contains the
3298 % actual code points in caret notation, which traditional \TeX\ engines
3299 % cannot process; this macro is called by |\horounicode| conditionally
3300 % on its detecting a Unicode-compatible engine.
3301 %
3302 % \begin{macro}{\horounicode@}
3303 % \begin{macrocode}
3304 \ifhoro@unicode\newcommand{\horounicode@}{%
3305 % \end{macrocode}
3306 %
3307 % Signs of the Zodiac:
3308 % \begin{macrocode}
3309 \gdef\AriesSymbol{^^^^2648}%
3310 \gdef\TaurusSymbol{^^^^2649}%
3311 \gdef\GeminiSymbol{^^^^264a}%
3312 \gdef\CancerSymbol{^^^^264b}%
3313 \gdef\LeoSymbol{^^^^264c}%
3314 \gdef\VirgoSymbol{^^^^264d}%
3315 \gdef\LibraSymbol{^^^^264e}%
3316 \gdef\ScorpioSymbol{^^^^264f}%
3317 \gdef\SagittariusSymbol{^^^^2650}%
3318 \gdef\CapricornSymbol{^^^^2651}%
3319 \gdef\AquariusSymbol{^^^^2652}%
3320 \gdef\PiscesSymbol{^^^^2653}%
3321 % \end{macrocode}
3322 %
3323 % Traditional planets and luminaries:
3324 % \begin{macrocode}
3325 \gdef\SunSymbol{^^^^2609}%
3326 \gdef\MoonSymbol{^^^^263d}%
3327 \gdef\MercurySymbol{^^^^263f}%
3328 \gdef\VenusSymbol{^^^^2640}%
3329 \gdef\MarsSymbol{^^^^2642}%
3330 \gdef\JupiterSymbol{^^^^2643}%
3331 \gdef\SaturnSymbol{^^^^2644}%
3332 \gdef\UranusSymbol{^^^^2645}%
3333 \gdef\NeptuneSymbol{^^^^2646}%
3334 \gdef\PlutoSymbol{^^^^2647}%
3335 % \end{macrocode}
3336 %
3337 % Minor planets:
3338 % \begin{macrocode}
3339 \gdef\ChironSymbol{^^^^26b7}%
3340 \gdef\CeresSymbol{^^^^26b3}%
3341 \gdef\PallasSymbol{^^^^26b4}%
3342 \gdef\JunoSymbol{^^^^26b5}%
3343 \gdef\VestaSymbol{^^^^26b6}%
3344 % \end{macrocode}
3345 %
3346 % Derived points:
3347 % \begin{macrocode}
3348 \gdef\NorthNodeSymbol{^^^^260a}%
3349 \gdef\SouthNodeSymbol{^^^^260b}%
3350 \gdef\LilithSymbol{^^^^26b8}%
3351 % \end{macrocode}
3352 %
3353 % Direction:
3354 % \begin{macrocode}
3355 \gdef\horoRetrogradeSymbol{^^^^211e}%
3356 % \end{macrocode}
3357 %
3358 % Aspects:
3359 % \begin{macrocode}
3360 \gdef\horoConjunctionSymbol{^^^^260c}%
3361 \gdef\horoOppositionSymbol{^^^^260d}%
3362 \gdef\horoTrineSymbol{^^^^25b3}%
3363 \gdef\horoSquareSymbol{^^^^25a1}%
3364 \gdef\horoSextileSymbol{^^^^26b9}%
3365 \gdef\horoQuincunxSymbol{^^^^26bb}%
3366 \gdef\horoSemisextileSymbol{^^^^26ba}%
3367 \gdef\horoSemisquareSymbol{^^^^2220}%
3368 \gdef\horoSesquiquadrateSymbol{^^^^26bc}%
3369 }
3370 % \end{macrocode}
3371 % \end{macro}
3372 %
3373 % This helper macro typesets a notation that describes a code point in text:
3374 %
3375 % \begin{macro}{\horounicode@point}
3376 % \begin{macrocode}
3377 \newcommand{\horounicode@point}[1]{\ensuremath{\langle\mbox{U+#1}\rangle}}
3378 % \end{macrocode}
3379 % \end{macro}
3380 %
3381 % The |\horounicode| driver can either call |\horounicode@| to really
3382 % use Unicode, or display text-based descriptions of the Unicode code points
3383 % it wants, depending on the engine. Factoring |\horounicode@| into a
3384 % separate macro reduces repetition, since |\horounicode| wants to call it in
3385 % two different places.
3386 %
3387 % \begin{macro}{\horounicode}
3388 % \changes{v1.0}{2020/07/20}{New macro}
3389 % \begin{macrocode}
3390 \newcommand{\horounicode}{%
3391 % \end{macrocode}
3392 %
3393 % Call |\horounicode@| if it is safe to do so:
3394 % \begin{macrocode}
3395 \ifxetex\horounicode@\else
3396 \ifluatex\horounicode@\else
3397 % \end{macrocode}
3398 %
3399 % Now define all the code points, as above, but in text notation.
3400 %
3401 % Signs of the Zodiac:
3402 % \begin{macrocode}
3403 \gdef\AriesSymbol{\horounicode@point{2648}}%
3404 \gdef\TaurusSymbol{\horounicode@point{2649}}%
3405 \gdef\GeminiSymbol{\horounicode@point{264A}}%
3406 \gdef\CancerSymbol{\horounicode@point{264B}}%
3407 \gdef\LeoSymbol{\horounicode@point{264C}}%
3408 \gdef\VirgoSymbol{\horounicode@point{264D}}%
3409 \gdef\LibraSymbol{\horounicode@point{264E}}%
3410 \gdef\ScorpioSymbol{\horounicode@point{264F}}%
3411 \gdef\SagittariusSymbol{\horounicode@point{2650}}%
3412 \gdef\CapricornSymbol{\horounicode@point{2651}}%
3413 \gdef\AquariusSymbol{\horounicode@point{2652}}%
3414 \gdef\PiscesSymbol{\horounicode@point{2653}}%
3415 % \end{macrocode}
3416 %
3417 % Traditional planets and luminaries:
3418 % \begin{macrocode}
3419 \gdef\SunSymbol{\horounicode@point{2609}}%
3420 \gdef\MoonSymbol{\horounicode@point{263D}}%
3421 \gdef\MercurySymbol{\horounicode@point{263F}}%
3422 \gdef\VenusSymbol{\horounicode@point{2640}}%
3423 \gdef\MarsSymbol{\horounicode@point{2642}}%
3424 \gdef\JupiterSymbol{\horounicode@point{2643}}%
3425 \gdef\SaturnSymbol{\horounicode@point{2644}}%
3426 \gdef\UranusSymbol{\horounicode@point{2645}}%
3427 \gdef\NeptuneSymbol{\horounicode@point{2646}}%
3428 \gdef\PlutoSymbol{\horounicode@point{2647}}%
3429 % \end{macrocode}
3430 %
3431 % Minor planets:
3432 % \begin{macrocode}
3433 \gdef\ChironSymbol{\horounicode@point{26B7}}%
3434 \gdef\CeresSymbol{\horounicode@point{26B3}}%
3435 \gdef\PallasSymbol{\horounicode@point{26B4}}%
3436 \gdef\JunoSymbol{\horounicode@point{26B5}}%
3437 \gdef\VestaSymbol{\horounicode@point{26B6}}%
3438 % \end{macrocode}
3439 %
3440 % Derived points:
3441 % \begin{macrocode}
3442 \gdef\NorthNodeSymbol{\horounicode@point{260A}}%
3443 \gdef\SouthNodeSymbol{\horounicode@point{260B}}%
3444 \gdef\LilithSymbol{\horounicode@point{26B8}}%
3445 % \end{macrocode}
3446 %
3447 % Direction:
3448 % \begin{macrocode}
3449 \gdef\horoRetrogradeSymbol{\horounicode@point{211E}}%
3450 % \end{macrocode}
3451 %
3452 % Aspects:
3453 % \begin{macrocode}
3454 \gdef\horoConjunctionSymbol{\horounicode@point{260C}}%
3455 \gdef\horoOppositionSymbol{\horounicode@point{260D}}%
3456 \gdef\horoTrineSymbol{\horounicode@point{25B3}}%
3457 \gdef\horoSquareSymbol{\horounicode@point{25A1}}%
3458 \gdef\horoSextileSymbol{\horounicode@point{26B9}}%
3459 \gdef\horoQuincunxSymbol{\horounicode@point{26BB}}%
3460 \gdef\horoSemisextileSymbol{\horounicode@point{26BA}}%
3461 \gdef\horoSemisquareSymbol{\horounicode@point{2220}}%
3462 \gdef\horoSesquiquadrateSymbol{\horounicode@point{26BC}}%
3463 \fi\fi
3464 }
3465 % \end{macrocode}
3466 % \end{macro}
3467 %
3468 % Now invoke |\horounicode| to make these symbols default at the start of
3469 % the document, except for the few (house cusps, and quintiles) that
3470 % don't exist in Unicode.
3471 % \begin{macrocode}
3472 \horounicode
3473 \fi
3474 % \end{macrocode}
3475 %
3476 % \subsubsection{Symbols from \textsf{wasysym}}
3477 %
3478 % \begin{macro}{\horowasysym}
3479 % These, too, are inside a macro specific to the package so that we can
3480 % switch among multiple symbol sets when more than one is loaded.
3481 % \begin{macrocode}
3482 \ifhoro@wasysym\newcommand{\horowasysym}{%
3483 % \end{macrocode}
3484 %
3485 % Signs of the Zodiac:
3486 % \begin{macrocode}
3487 \gdef\AriesSymbol{\aries}%
3488 \gdef\TaurusSymbol{\taurus}%
3489 \gdef\GeminiSymbol{\gemini}%
3490 \gdef\CancerSymbol{\cancer}%
3491 \gdef\LeoSymbol{\leo}%
3492 \gdef\VirgoSymbol{\virgo}%
3493 \gdef\LibraSymbol{\libra}%
3494 \gdef\ScorpioSymbol{\scorpio}%
3495 \gdef\SagittariusSymbol{\sagittarius}%
3496 \gdef\CapricornSymbol{\capricornus}%
3497 \gdef\AquariusSymbol{\aquarius}%
3498 \gdef\PiscesSymbol{\pisces}%
3499 % \end{macrocode}
3500 %
3501 % Traditional planets and luminaries:
3502 % \begin{macrocode}
3503 \gdef\SunSymbol{\astrosun}%
3504 \gdef\MoonSymbol{\rightmoon}%
3505 \gdef\MercurySymbol{\mercury}%
3506 \gdef\VenusSymbol{\venus}%
3507 \gdef\MarsSymbol{\mars}%
3508 \gdef\JupiterSymbol{\jupiter}%
3509 \gdef\SaturnSymbol{\saturn}%
3510 \gdef\UranusSymbol{\uranus}%
3511 \gdef\NeptuneSymbol{\neptune}%
3512 \gdef\PlutoSymbol{\pluto}%
3513 % \end{macrocode}
3514 %
3515 % Aspects:
3516 % \begin{macrocode}
3517 \gdef\horoConjunctionSymbol{\conjunction}%
3518 \gdef\horoOppositionSymbol{\opposition}%
3519 \gdef\horoTrineSymbol{\ensuremath{\bigtriangleup}}%
3520 \gdef\horoSquareSymbol{\horow@sySquare}%
3521 \gdef\horoSextileSymbol{\hexstar}%
3522 }
3523 % \end{macrocode}
3524 %
3525 % Invoke |\horowasysym| to set it as default:
3526 % \begin{macrocode}
3527 \horowasysym
3528 \fi
3529 % \end{macrocode}
3530 % \end{macro}
3531 %
3532 % \subsubsection{Symbols from \textsf{marvosym}}
3533 %
3534 % \begin{macro}{\horomarvosym}
3535 % As above. Note that because of the macro name conflict between
3536 % \textsf{marvosym} and \textsf{starfont}, we use the saved copies of
3537 % \textsf{marvosym}'s symbols instead of the contested names.
3538 % \begin{macrocode}
3539 \ifhoro@marvosym\newcommand{\horomarvosym}{%
3540 % \end{macrocode}
3541 %
3542 % Signs of the Zodiac:
3543 % \begin{macrocode}
3544 \gdef\AriesSymbol{\horom@rvAries}%
3545 \gdef\TaurusSymbol{\horom@rvTaurus}%
3546 \gdef\GeminiSymbol{\horom@rvGemini}%
3547 \gdef\CancerSymbol{\horom@rvCancer}%
3548 \gdef\LeoSymbol{\horom@rvLeo}%
3549 \gdef\VirgoSymbol{\horom@rvVirgo}%
3550 \gdef\LibraSymbol{\horom@rvLibra}%
3551 \gdef\ScorpioSymbol{\horom@rvScorpio}%
3552 \gdef\SagittariusSymbol{\horom@rvSagittarius}%
3553 \gdef\CapricornSymbol{\horom@rvCapricorn}%
3554 \gdef\AquariusSymbol{\horom@rvAquarius}%
3555 \gdef\PiscesSymbol{\horom@rvPisces}%
3556 % \end{macrocode}
3557 %
3558 % Traditional planets and luminaries:
3559 % \begin{macrocode}
3560 \gdef\SunSymbol{\horom@rvSun}%
3561 \gdef\MoonSymbol{\horom@rvMoon}%
3562 \gdef\MercurySymbol{\horom@rvMercury}%
3563 \gdef\VenusSymbol{\horom@rvVenus}%
3564 \gdef\MarsSymbol{\horom@rvMars}%
3565 \gdef\JupiterSymbol{\horom@rvJupiter}%
3566 \gdef\SaturnSymbol{\horom@rvSaturn}%
3567 \gdef\UranusSymbol{\horom@rvUranus}%
3568 \gdef\NeptuneSymbol{\horom@rvNeptune}%
3569 \gdef\PlutoSymbol{\horom@rvPluto}%
3570 }
3571 % \end{macrocode}
3572 %
3573 % Invoke |\horomarvosym| to set it as default:
3574 % \begin{macrocode}
3575 \horomarvosym
3576 \fi
3577 % \end{macrocode}
3578 % \end{macro}
3579 %
3580 % \subsubsection{Symbols from \textsf{starfont}}
3581 %
3582 % \begin{macro}{\horostarfont}
3583 % This is the preferred set of astrological symbols. Like the others, all the
3584 % definitions are inside a symbol set selection macro; like
3585 % \textsf{marvosym}, we use previously saved copies of the package macros
3586 % instead of invoking the conflicting names directly.
3587 % \begin{macrocode}
3588 \ifhoro@starfont\newcommand{\horostarfont}{%
3589 % \end{macrocode}
3590 %
3591 % Signs of the Zodiac:
3592 % \begin{macrocode}
3593 \gdef\AriesSymbol{\horost@rAries}%
3594 \gdef\TaurusSymbol{\horost@rTaurus}%
3595 \gdef\GeminiSymbol{\horost@rGemini}%
3596 \gdef\CancerSymbol{\horost@rCancer}%
3597 \gdef\LeoSymbol{\horost@rLeo}%
3598 \gdef\VirgoSymbol{\horost@rVirgo}%
3599 \gdef\LibraSymbol{\horost@rLibra}%
3600 \gdef\ScorpioSymbol{\horost@rScorpio}%
3601 \gdef\SagittariusSymbol{\horost@rSagittarius}%
3602 \gdef\CapricornSymbol{\horost@rCapricorn}%
3603 \gdef\AquariusSymbol{\horost@rAquarius}%
3604 \gdef\PiscesSymbol{\horost@rPisces}%
3605 % \end{macrocode}
3606 %
3607 % Traditional planets and luminaries:
3608 % \begin{macrocode}
3609 \gdef\SunSymbol{\horost@rSun}%
3610 \gdef\MoonSymbol{\horost@rMoon}%
3611 \gdef\MercurySymbol{\horost@rMercury}%
3612 \gdef\VenusSymbol{\horost@rVenus}%
3613 \gdef\MarsSymbol{\horost@rMars}%
3614 \gdef\JupiterSymbol{\horost@rJupiter}%
3615 \gdef\SaturnSymbol{\horost@rSaturn}%
3616 \gdef\UranusSymbol{\horost@rUranus}%
3617 \gdef\NeptuneSymbol{\horost@rNeptune}%
3618 \gdef\PlutoSymbol{\horost@rPluto}%
3619 % \end{macrocode}
3620 %
3621 % Asteroids:
3622 % \begin{macrocode}
3623 \gdef\ChironSymbol{\Chiron}%
3624 \gdef\CeresSymbol{\Ceres}%
3625 \gdef\PallasSymbol{\Pallas}%
3626 \gdef\JunoSymbol{\Juno}%
3627 \gdef\VestaSymbol{\Vesta}%
3628 % \end{macrocode}
3629 %
3630 % Derived points:
3631 % \begin{macrocode}
3632 \gdef\NorthNodeSymbol{\NorthNode}%
3633 \gdef\SouthNodeSymbol{\SouthNode}%
3634 \gdef\MeanNodeSymbol{\NorthNode$_M$}%
3635 \gdef\TrueNodeSymbol{\NorthNode$_T$}%
3636 \gdef\LilithSymbol{\Lilith}%
3637 % \end{macrocode}
3638 %
3639 % Cusps and angles:
3640 % \begin{macrocode}
3641 \gdef\CuspISymbol{\ASC}%
3642 \gdef\CuspIVSymbol{\IC}%
3643 \gdef\CuspVIISymbol{\DSC}%
3644 \gdef\CuspXSymbol{\MC}%
3645 \gdef\AscendantSymbol{\ASC}%
3646 \gdef\MCSymbol{\MC}%
3647 \gdef\VertexSymbol{\Vertex}%
3648 % \end{macrocode}
3649 %
3650 % Direction:
3651 % \begin{macrocode}
3652 \gdef\horoRetrogradeSymbol{\Retrograde}%
3653 % \end{macrocode}
3654 %
3655 % Aspects:
3656 % \begin{macrocode}
3657 \gdef\horoConjunctionSymbol{\Conjunction}%
3658 \gdef\horoOppositionSymbol{\Opposition}%
3659 \gdef\horoTrineSymbol{\Trine}%
3660 \gdef\horoSquareSymbol{\horost@rSquare}%
3661 \gdef\horoQuintileSymbol{$\mathsf{Q}$}%
3662 \gdef\horoBiquintileSymbol{$\mathsf{Q}^2$}%
3663 \gdef\horoSextileSymbol{\Sextile}%
3664 \gdef\horoQuincunxSymbol{\Quincunx}%
3665 \gdef\horoSemisextileSymbol{\Semisextile}%
3666 \gdef\horoSemisquareSymbol{\Semisquare}%
3667 \gdef\horoSesquiquadrateSymbol{\Sesquiquadrate}%
3668 }
3669 % \end{macrocode}
3670 %
3671 % Invoke |\horostarfont| to set it as default:
3672 % \begin{macrocode}
3673 \horostarfont
3674 \fi
3675 % \end{macrocode}
3676 % \end{macro}
3677 %
3678 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3679 %
3680 % \subsection{Utilities}
3681 %
3682 % \subsubsection{Trimming spaces}
3683 % This code is from Michael Downes's series of mailing list postings
3684 % available at
3685 % \href{http://ctan.math.utah.edu/ctan/tex-archive/info/aro-bend/answer.015}{\nolinkurl{http://ctan.math.utah.edu/ctan/tex-archive/}}
3686 % \href{http://ctan.math.utah.edu/ctan/tex-archive/info/aro-bend/answer.015}{\nolinkurl{info/aro-bend/answer.015}}.
3687 % The trick of changing the letter Q's catcode to make an exotic
3688 % $\mathcal{Q}$ that can't occur in ordinary token lists, is used elsewhere
3689 % in the \textsf{horoscop} code so we leave it in force after defining
3690 % |\trimspaces|.
3691 % \begin{macrocode}
3692 %% WATCH OUT! MAKING Q EXOTIC HERE!
3693 \catcode`\Q=3
3694 \def\horo@cue{Q}
3695 % \end{macrocode}
3696 %
3697 % \begin{macro}{\trimspaces}
3698 % \begin{macrocode}
3699 \def\trimspaces#1{%
3700 \begingroup
3701 \aftergroup\toks\aftergroup0\aftergroup{%
3702 \expandafter\@trimb\expandafter\noexpand#1Q Q}%
3703 \edef#1{\the\toks0}%
3704 }
3705 \long\def\@trimb#1 Q{\@trimc#1Q}
3706 \long\def\@trimc#1Q#2{\afterassignment\endgroup \vfuzz\the\vfuzz#1}
3707 % \end{macrocode}
3708 % \end{macro}
3709 %
3710 % \subsubsection{Redefine after current group}
3711 %
3712 % Sometimes we want to pass data currently in a |\def|ined macro to the world
3713 % outside the current group, but we don't want to pollute the global namespace
3714 % with a |\gdef|. This code provides a way to do that. It's a bit nasty and
3715 % should only be used with macros whose contents translate to nice
3716 % well-behaved strings. In practice, we use it for macros whose contents are
3717 % decimal numbers.
3718 %
3719 % \begin{macro}{\horo@fterdef}
3720 % First, |\horo@fterdef| puts three tokens into the |\aftergroup| queue to be
3721 % evaluated outside the current group. They are: |\horo@ft@a|, the name of
3722 % the macro being passed out, and a newly-constructed token whose name is
3723 % |\horo@@| followed by the \emph{contents} of the macro being passed out.
3724 % \begin{macrocode}
3725 \def\horo@fterdef#1{%
3726 \aftergroup\horo@ft@a
3727 \aftergroup#1\expandafter\aftergroup\csname horo@@#1\endcsname
3728 }
3729 % \end{macrocode}
3730 % \end{macro}
3731 %
3732 % \begin{macro}{\horo@eathead}
3733 % This will be used in a moment; it simply drops the next seven characters.
3734 % \begin{macrocode}
3735 \def\horo@eathead#1#2#3#4#5#6#7{}
3736 % \end{macrocode}
3737 % \end{macro}
3738 %
3739 % \begin{macro}{\horo@ft@a}
3740 % Now, watch carefully. When we left |\horo@fterdef|, there were three
3741 % tokens queued to run after the group. Now the group has ended and
3742 % it's time to look at those tokens. The first one is |\horo@ft@a|, so this
3743 % macro runs and the next two become its arguments. The first of those is
3744 % the name of the macro we will redefine, and the second is macro whose name
3745 % consists of |\horo@@| and then the contents of the original macro.
3746 %
3747 % So the |\edef| expands its argument, which starts by deferring expansion
3748 % of |\horo@eathead|, and then finding the string value of the
3749 % |\horo@@|\ldots\ token. That string value consists of seven characters
3750 % spelling out ``|\|-|h|-|o|-|r|-|o|-|@|-|@|'' followed by the data to pass.
3751 % When the deferred |\horo@eathead| runs it eats those seven characters.
3752 % What's left in the |\edef| body is just the data, which gets assigned to
3753 % the macro.
3754 % \begin{macrocode}
3755 \def\horo@ft@a#1#2{%
3756 \edef#1{\expandafter\horo@eathead\string#2}%
3757 }
3758 % \end{macrocode}
3759 % \end{macro}
3760 %
3761 % \subsubsection{Polar to Cartesian}
3762 %
3763 % \begin{macro}{\horo@polarconvert}
3764 % Positioning the items on a wheel chart generally makes more sense in polar
3765 % than Cartesian coordinates, so this computes the Cartesian coordinates for
3766 % given polar coordinates. Takes four arguments; \#1 and \#2 are numbers
3767 % containing the polar coordinates $r$ and $\theta$ (in degrees), and \#3
3768 % and \#4 are dimension registers that will contain the result encoded into
3769 % points. The coordinate $\theta$ is zero on the $+X$ axis and increases
3770 % counterclockwise under the standard mathematical convention.
3771 %
3772 % This macro calls |\TG@@sin| from the \textsf{trig} package, which may be
3773 % a slightly dangerous thing to do. It trashes |\dimen@|.
3774 % \begin{macrocode}
3775 \def\horo@polarconvert#1#2#3#4{%
3776 \dimen@=\nin@ty\p@\advance\dimen@-#2\p@\TG@@sin
3777 #3=#1\dimen@
3778 \dimen@=#2\p@\TG@@sin
3779 #4=#1\dimen@
3780 }
3781 % \end{macrocode}
3782 % \end{macro}
3783 %
3784 % \subsubsection{For-each}
3785 % These macros allow applying another macro on each item in a
3786 % comma-separated list. They use exotic $\mathcal{Q}$ for parsing the list
3787 % because it's convenient, but that's probably not necessary.
3788 %
3789 % \begin{macro}{\horo@fe}
3790 % Internal for |\horoforeach|. It checks whether the next comma-separated
3791 % item is $\mathcal{Q}$, and if not, it calls |\horo@fe@b| on it and then
3792 % invokes itself tail-recursively to do the next one.
3793 % \begin{macrocode}
3794 \def\horo@fe#1,{%
3795 \def\horo@fe@c{#1}%
3796 \ifx\horo@fe@c\horo@cue\relax
3797 \else
3798 \horo@fe@b{#1}%
3799 \expandafter\horo@fe
3800 \fi
3801 }
3802 % \end{macrocode}
3803 % \end{macro}
3804 %
3805 % \begin{macro}{\horoforeach}
3806 % No @ in the name because a user could possibly want to use it and it's
3807 % reasonably safe. First argument is the list of items, comma-separated.
3808 % Second is the action to perform on them, which will be invoked with each
3809 % successive items from the list as its first and only argument. The list
3810 % of items gets expanded. The logic is simple: it just saves the arguments
3811 % and calls |\horo@fe| with a list containing an extra $\mathcal{Q}$ item at
3812 % the end to terminate the recursion.
3813 % \begin{macrocode}
3814 \def\horoforeach#1#2{%
3815 \edef\horo@fe@a{#1}%
3816 \def\horo@fe@b{#2}%
3817 \expandafter\horo@fe\horo@fe@a,Q,%
3818 }
3819 % \end{macrocode}
3820 % \end{macro}
3821 %
3822 % \subsubsection{Double for-each}
3823 % This is two nested for-eaches in one; that's a common enough operation
3824 % that it seems useful to have a special feature for it instead of trying to
3825 % nest regular for-eaches. We think of the outer index as $x$ and the inner
3826 % index as $y$, so the list of items for the outer loop is the $x$-list and
3827 % the list of items for the inner loop is the $y$-list.
3828 %
3829 % \begin{macro}{\horo@dfe@b}
3830 % Inner loop. Logic is very similar to |\horo@fe|: it gets a new item from
3831 % the $y$-list, checks whether it is the $\mathcal{Q}$ terminator, and if
3832 % not, applies |\horo@dfe@action| to the pair of |\horo@dfe@x| and
3833 % |\horo@dfe@y| before tail-recursing.
3834 % \begin{macrocode}
3835 \def\horo@dfe@b#1,{%
3836 \def\horo@dfe@y{#1}%
3837 \ifx\horo@dfe@y\horo@cue\relax
3838 \else
3839 \horo@dfe@ction{\horo@dfe@x}{\horo@dfe@y}%
3840 \expandafter\horo@dfe@b
3841 \fi
3842 }
3843 % \end{macrocode}
3844 % \end{macro}
3845 %
3846 % \begin{macro}{\horo@dfe@a}
3847 % Outer loop. The same kind of tail-recursive iteration through the
3848 % $x$-list, applying |\horo@dfe@b| to each item.
3849 % \begin{macrocode}
3850 \def\horo@dfe@a#1,{%
3851 \def\horo@dfe@x{#1}%
3852 \ifx\horo@dfe@x\horo@cue\relax
3853 \else
3854 \expandafter\horo@dfe@b\horo@dfe@ylist,Q,\relax
3855 \expandafter\horo@dfe@a
3856 \fi
3857 }
3858 % \end{macrocode}
3859 % \end{macro}
3860 %
3861 % \begin{macro}{\horo@dblforeach}
3862 % Master entry point for double for-each. This does get an @ because it's
3863 % sufficiently dangerous. Arguments are the $x$-list, the $y$-list, and the
3864 % action. The code just saves those and invokes |\horo@dfe@a| with the
3865 % appropriate terminating $\mathcal{Q}$.
3866 % \begin{macrocode}
3867 \def\horo@dblforeach#1#2#3{%
3868 \edef\horo@dfe@xlist{#1}\edef\horo@dfe@ylist{#2}\def\horo@dfe@ction{#3}%
3869 \expandafter\horo@dfe@a\horo@dfe@xlist,Q,\relax
3870 }
3871 % \end{macrocode}
3872 % \end{macro}
3873 %
3874 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3875 %
3876 % \subsection{Basic Astrological Calculation Routines}
3877 %
3878 % These handle stuff like angle arithmetic. They're included even in the
3879 % |nocalc| state because some of them are needed by the chart graphics
3880 % routines, or are things you might still want to do even with
3881 % manually-entered coordinates.
3882 %
3883 % The |\ifhorocalculated| flag keeps track of whether we expect there to be
3884 % valid data in the object-position variables; that's useful to prevent
3885 % wasted calculation when we're using the emphemeris interface but it isn't
3886 % working (for instance, because of |\write18| being turned off), because in
3887 % such a case the positions are unknown.
3888 %
3889 % \begin{macrocode}
3890 \newif\ifhorocalculated\horocalculatedfalse
3891 % \end{macrocode}
3892 %
3893 % \subsubsection{Cusp information}
3894 % These theoretically might be user-settable, but would seldom be changed in
3895 % practice.
3896 %
3897 % \begin{macro}{\hororightcoord}
3898 % The object, or more correctly, the astrological longitude, to put at the
3899 % right of the chart corresponding to polar coodinate $\theta=0$. This
3900 % normally would be the Descendant, which in turn would normally be the
3901 % seventh house cusp.
3902 % \begin{macrocode}
3903 \def\hororightcoord{\ifhorocalculated\horoCuspVIIPos\else180\fi}%
3904 % \end{macrocode}
3905 % \end{macro}
3906 %
3907 % \begin{macro}{\horocusps}
3908 % A list of all the house cusps.
3909 % \begin{macrocode}
3910 \def\horocusps{CuspI,CuspII,CuspIII,CuspIV,CuspV,CuspVI,%
3911 CuspVII,CuspVIII,CuspIX,CuspX,CuspXI,CuspXII}%
3912 % \end{macrocode}
3913 % \end{macro}
3914 %
3915 % \begin{macro}{\horoangularcusps}
3916 % A list of which cusps correspond to angles, used for showing the
3917 % angles more prominently in some ready-made wheels.
3918 % \begin{macrocode}
3919 \def\horoangularcusps{CuspI,CuspIV,CuspVII,CuspX}
3920 % \end{macrocode}
3921 % \end{macro}
3922 %
3923 % \subsubsection{Calculating harmonics}
3924 % \begin{macro}{\horocalcharmonic}
3925 % Multiplies all the object positions from |\horoobjects| by its parameter.
3926 % Straightforward implementation: it just calls |\horo@calch| on each object.
3927 % House cusps and objects not mentioned in |\horoobjects| will be unchanged.
3928 % Pos is the variable that gets multiplied; DPos gets set to the new value
3929 % of Pos.
3930 % \begin{macrocode}
3931 \def\horocalcharmonic#1{%
3932 \horoforeach{\horoobjects}{\horo@calch{#1}}%
3933 }
3934 % \end{macrocode}
3935 % \end{macro}
3936 %
3937 % \begin{macro}{\horo@calch}
3938 % Internal for |\horocalcharmonic|. Gets the object's Pos into |\dimen@|,
3939 % multiplies it by the harmonic number, takes it modulo 360 degrees, and
3940 % saves it back to Pos and DPos.
3941 % \begin{macrocode}
3942 \def\horo@calch#1#2{%
3943 \dimen@=\csname horo#2Pos\endcsname\p@\relax
3944 \multiply\dimen@ by #1\relax
3945 \horo@fixdimen@
3946 \expandafter\edef\csname horo#2Pos\endcsname{\TG@rem@pt\dimen@}%
3947 \expandafter\edef\csname horo#2DPos\endcsname{\TG@rem@pt\dimen@}%
3948 }
3949 % \end{macrocode}
3950 % \end{macro}
3951 %
3952 % \subsubsection{Shifting positions}
3953 % \begin{macro}{\horoshiftobjects}
3954 % \changes{v0.91}{2008/07/15}{New macro}
3955 % Adds an offset to all the object positions in |\horoobjects|, much like
3956 % |\horocalcharmonic| above.
3957 % \begin{macrocode}
3958 \def\horoshiftobjects#1{%
3959 \horoforeach{\horoobjects}{\horo@shift{#1}}%
3960 }
3961 % \end{macrocode}
3962 % \end{macro}
3963 %
3964 % \begin{macro}{\horoshiftcusps}
3965 % \changes{v0.91}{2008/07/15}{New macro}
3966 % Adds an offset to all the object positions in |\horocusps|, much like
3967 % |\horocalcharmonic| above.
3968 % \begin{macrocode}
3969 \def\horoshiftcusps#1{%
3970 \horoforeach{\horocusps}{\horo@shift{#1}}%
3971 }
3972 % \end{macrocode}
3973 % \end{macro}
3974 %
3975 % \begin{macro}{\horo@shift}
3976 % Internal for |\horoshiftobjects| and -|cusps|. Much like |\horo@calch|
3977 % except it adds instead of multiplying.
3978 % \begin{macrocode}
3979 \def\horo@shift#1#2{%
3980 \dimen@=\csname horo#2Pos\endcsname\p@\relax
3981 \advance\dimen@ by #1\p@\relax
3982 \horo@fixdimen@
3983 \expandafter\edef\csname horo#2Pos\endcsname{\TG@rem@pt\dimen@}%
3984 \expandafter\edef\csname horo#2DPos\endcsname{\TG@rem@pt\dimen@}%
3985 }
3986 % \end{macrocode}
3987 % \end{macro}
3988 %
3989 % \subsubsection{Calculating equal cusps}
3990 %
3991 % \begin{macro}{\horomakeequalcusps}
3992 % \changes{v0.91}{2008/07/15}{New macro}
3993 % Creates a set of equal-house cusps starting from CuspI set to the
3994 % argument. Implementation simply sets them to hardcoded values and then
3995 % shifts.
3996 % \begin{macrocode}
3997 \def\horomakeequalcusps#1{
3998 \def\horoCuspIPos{0}%
3999 \def\horoCuspIIPos{30}%
4000 \def\horoCuspIIIPos{60}%
4001 \def\horoCuspIVPos{90}%
4002 \def\horoCuspVPos{120}%
4003 \def\horoCuspVIPos{150}%
4004 \def\horoCuspVIIPos{180}%
4005 \def\horoCuspVIIIPos{210}%
4006 \def\horoCuspIXPos{240}%
4007 \def\horoCuspXPos{270}%
4008 \def\horoCuspXIPos{300}%
4009 \def\horoCuspXIIPos{330}%
4010 \horoshiftcusps{#1}%
4011 }
4012 % \end{macrocode}
4013 % \end{macro}
4014 %
4015 % \begin{macro}{\horomakesigncusps}
4016 % \changes{v0.91}{2008/07/15}{New macro}
4017 % Truncates the argument to the sign boundary and then uses it for
4018 % |\horomakeequalcusps|. The magic number 1966080 is 30\horodegrees\
4019 % measured in units of $1\horodegrees/65536$.
4020 % \begin{macrocode}
4021 \def\horomakesigncusps#1{
4022 \dimen@=#1\p@\relax
4023 \edef\horo@savecount@{\the\count0}%
4024 \count0=\dimen@\relax
4025 \divide\count0 by 1966080\relax
4026 \multiply\count0 by 30\relax
4027 \expandafter\horomakeequalcusps{\the\count0}%
4028 \count0=\horo@savecount@\relax
4029 }
4030 % \end{macrocode}
4031 % \end{macro}
4032 %
4033 % \subsubsection{Calculating midpoints}
4034 % At present this only includes a private macro used to compute the midpoint
4035 % of two raw angles. A future feature might actually compute midpoint
4036 % charts by the time-space and/or object-position methods.
4037 %
4038 % \begin{macro}{\horo@midpoint}
4039 % Find the midpoint between two angles, going around the circle in the
4040 % shorter direction. Input angles are the two arguments, output goes into
4041 % |\dimen@|.
4042 % \begin{macrocode}
4043 \def\horo@midpoint#1#2{%
4044 \dimen@#1\p@\relax
4045 \advance\dimen@ by-#2\p@\relax
4046 \horo@fixdimen@diff
4047 \divide\dimen@ by2\relax
4048 \advance\dimen@ by#2\p@\relax
4049 \horo@fixdimen@
4050 }
4051 % \end{macrocode}
4052 % \end{macro}
4053 %
4054 % \subsubsection{Angle adjustments}
4055 % These all have to do with fixing the angle currently in |\dimen@|, which
4056 % is assumed to be encoded at one point per degree, one way
4057 % or another to make it well-behaved.
4058 %
4059 % \begin{macro}{\horo@chartrotate}
4060 % Subtract |\hororightcoord| to account for rotation of the entire chart.
4061 % \begin{macrocode}
4062 \def\horo@chartrotate{%
4063 \advance\dimen@-\hororightcoord\p@
4064 \horo@fixdimen@
4065 }
4066 % \end{macrocode}
4067 % \end{macro}
4068 %
4069 % \begin{macro}{\horo@fixdimen@}
4070 % Takes |\dimen@| modulo 360\horodegrees\ so it ends up in the range
4071 % 0\ldots360\horodegrees. The magic number 23592960 is 65536 times 360.
4072 % \begin{macrocode}
4073 \def\horo@fixdimen@{%
4074 \edef\horo@savecount@{\the\count0}%
4075 \count0=\dimen@\relax
4076 \ifnum\count0<0\relax
4077 \divide\count0 by 23592960\relax
4078 \advance\count0 by -1\relax
4079 \else
4080 \divide\count0 by 23592960\relax
4081 \fi
4082 \multiply\count0 by -360\relax
4083 \advance\dimen@ by\count0\p@\relax
4084 \count0=\horo@savecount@\relax
4085 }
4086 % \end{macrocode}
4087 % \end{macro}
4088 %
4089 % \begin{macro}{\horo@fixdimen@diff}
4090 % Very similar to |\horo@fixdimen@| except that the output range is
4091 % $-180\ldots180\horodegrees$, which is useful when we want to find the
4092 % difference between two locations (tells us whether they are clockwise or
4093 % counterclockwise from each other).
4094 % \begin{macrocode}
4095 \def\horo@fixdimen@diff{%
4096 \horo@fixdimen@
4097 \ifdim\dimen@>180\p@\advance\dimen@ by -360\p@\fi
4098 }
4099 % \end{macrocode}
4100 % \end{macro}
4101 %
4102 % \subsubsection{Chart rotation}
4103 % Rotates the chart so that object \#1 appears at angle \#2, which is
4104 % expressed as a $\theta$ coordinate so that 0 is to the right, 90 is up,
4105 % and so on. This works by changing the value of |\hororightcoord|,
4106 % which is checked during the actual plotting. Note it doesn't happen
4107 % globally, and you probably don't want it to; the global definition of
4108 % |\hororightcoord| is a smart one that picks up the Descendant's value.
4109 % \begin{macro}{\hororotatechart}
4110 % \begin{macrocode}
4111 \def\hororotatechart#1#2{%
4112 \begingroup
4113 \dimen@=#2\p@\relax
4114 \advance\dimen@ by-\csname horo#1DPos\endcsname\p@\relax
4115 \multiply\dimen@ by -1\relax
4116 \edef\hororightcoord{\TG@rem@pt\dimen@}%
4117 \horo@fterdef\hororightcoord
4118 \endgroup
4119 }
4120 % \end{macrocode}
4121 % \end{macro}
4122 %
4123 % \subsubsection{Variable copying and saving}
4124 % \begin{macro}{\horocopyvar}
4125 % Copies one variable to another on some objects, such as setting all DPos to
4126 % the value of the corresponding Pos. Arguments are the list of objects,
4127 % the from variable, and the to variable.
4128 % \begin{macrocode}
4129 \def\horocopyvar#1#2#3{%
4130 \horoforeach{#1}{\horo@cv@{#2}{#3}}%
4131 }
4132 % \end{macrocode}
4133 % \end{macro}
4134 %
4135 % \begin{macro}{\horo@cv}
4136 % Internal for |\horocopyvar|. Does the actual copying on one object.
4137 % \begin{macrocode}
4138 \def\horo@cv@#1#2#3{%
4139 \expandafter\edef\csname horo#3#2\endcsname{\csname horo#3#1\endcsname}%
4140 }
4141 % \end{macrocode}
4142 % \end{macro}
4143 %
4144 % \begin{macro}{\horosaveobjects}
4145 % Save all the object positions (Pos) and velocities (Vel)
4146 % to a macro. When the macro is called it
4147 % will set all the Pos and Vel values to the values from when it was created,
4148 % and all the DPos values to match Pos. It also saves and restores the value
4149 % of |\horoobjects| itself. This works by building up the
4150 % appropriate |\def| in the |\aftergroup| queue, and using |\horo@fterdef|
4151 % to put the definitions of the individual variables right inside the body
4152 % of the |\def|. So it's |\def|s within |\def|s going into the queue.
4153 % Several different approaches for this had to be tried before I found one
4154 % that didn't cause \TeX\ to complain about memory.
4155 % \begin{macrocode}
4156 \def\horosaveobjects#1{%
4157 \begingroup
4158 \aftergroup\def\aftergroup#1\aftergroup{%
4159 \horo@fterdef\horoobjects
4160 \horoforeach{\horoobjects}{\horo@svo@a}%
4161 \aftergroup\horo@svo@b
4162 \aftergroup}%
4163 \endgroup
4164 }
4165 % \end{macrocode}
4166 % \end{macro}
4167 %
4168 % \begin{macro}{\horo@svo@a}
4169 % First internal: this adds definitions for Pos and Vel to the |\aftergroup|
4170 % queue.
4171 % \begin{macrocode}
4172 \def\horo@svo@a#1{%
4173 \expandafter\horo@fterdef\csname horo#1Pos\endcsname
4174 \expandafter\horo@fterdef\csname horo#1Vel\endcsname
4175 }
4176 % \end{macrocode}
4177 % \end{macro}
4178 %
4179 % \begin{macro}{\horo@svo@b}
4180 % Second internal: copies Pos to DPos on all objects. This gets invoked by
4181 % the restore-objects command we are creating, after it has restored Pos on
4182 % all objects.
4183 % \begin{macrocode}
4184 \def\horo@svo@b{%
4185 \horocopyvar{\horoobjects}{Pos}{DPos}%
4186 }
4187 % \end{macrocode}
4188 % \end{macro}
4189 %
4190 % \begin{macro}{\horosavecusps}
4191 % This is the same general deal as |\horosaveobjects|, but it saves
4192 % |\horocusps|, |\hororightcoord|, and the Pos of all cusps in |\horocusps|.
4193 % The DPos will be set to Pos on restore.
4194 % \begin{macrocode}
4195 \def\horosavecusps#1{%
4196 \begingroup
4197 \aftergroup\def\aftergroup#1\aftergroup{%
4198 \edef\hororightcoord{\hororightcoord}%
4199 \horo@fterdef\horocusps\horo@fterdef\hororightcoord
4200 \horoforeach{\horocusps}{\horo@svc@a}%
4201 \aftergroup\horo@svc@b
4202 \aftergroup}%
4203 \endgroup
4204 }
4205 % \end{macrocode}
4206 % \end{macro}
4207 %
4208 % \begin{macro}{\horo@svc@a}
4209 % Save Pos of a cusp to the |\aftergroup| queue.
4210 % \begin{macrocode}
4211 \def\horo@svc@a#1{%
4212 \expandafter\horo@fterdef\csname horo#1Pos\endcsname
4213 }
4214 % \end{macrocode}
4215 % \end{macro}
4216 %
4217 % \begin{macro}{\horo@svc@b}
4218 % Copy Pos to DPos; the difference from |\horo@svo@b| is that here we do it
4219 % to all cusps instead of all objects.
4220 % \begin{macrocode}
4221 \def\horo@svc@b{%
4222 \horocopyvar{\horocusps}{Pos}{DPos}%
4223 }
4224 % \end{macrocode}
4225 % \end{macro}
4226 %
4227 % \subsubsection{Sexagesimal arithmetic}
4228 % These routines handle a number of conversions between DMS (degree, minute,
4229 % and second), DDMS (direction, degree, minute, and second),
4230 % SDMS (Zodiac sign, degree, minute, second), HMS (hour,
4231 % minute, second), and flat decimal (which is usually the number of hours or
4232 % degrees). They also handle typesetting things in these kinds of formats.
4233 %
4234 % We generally store flat decimal numbers in macro definitions. For
4235 % arithmetic they get assigned to
4236 % dimension registers encoded as 1 degree = 1 point. Then when
4237 % they get transformed into count registers they end up encoded as
4238 % 1 degree = 65536 counts. That gives 18.2044 counts per second of
4239 % arc, coincidentally very close to the original IBM PC's timer tick
4240 % rate of 18.2065 ticks per second of time, which was a
4241 % convenient fraction of the NTSC colour burst frequency. We have
4242 % just enough bits of precision to be reasonably sure of converting
4243 % DMS format to this format, doing a little bit of arithmetic, and
4244 % converting back while keeping the errors less than a second of arc. If
4245 % you want to calculate insane harmonics to subsecond precision (I have read
4246 % of people seriously attempting the 105th harmonic) then you're out
4247 % of luck, but you shouldn't be doing that anyway because your native
4248 % certainly didn't give you an accurate enough birth time for it to
4249 % be valid.
4250 %
4251 % The decimal number under consideration at the moment is often stored in
4252 % |\horo@data|, or in the form of a number of points in |\dimen@|, although
4253 % some of these macros take arguments instead. Output is returned in
4254 % several ways. Generally the calling
4255 % convention is determined by what's most convenient in the macros that
4256 % will call these ones.
4257 %
4258 % \begin{macro}{\horo@twodig}
4259 % Add a leading zero to a nonnegative integer to make it at least two digits;
4260 % useful for the part after the colon in times like ``12:03.''
4261 % \begin{macrocode}
4262 \def\horo@twodig#1{\ifnum#1<10\relax\edef#1{0#1}\fi}
4263 % \end{macrocode}
4264 % \end{macro}
4265 %
4266 % \begin{macro}{\horo@ddms}
4267 % Takes a direction (one letter from NSEW), degree, minute, and second and
4268 % translates it to decimal. South and West are considered to be negative.
4269 % Note the input format: direction is one argument, but degree, minute, and
4270 % second are separated by colons, and an exotic $\mathcal{Q}$ terminates.
4271 % The output goes to redefine the last argument.
4272 % \begin{macrocode}
4273 \def\horo@ddms#1#2:#3:#4Q#5{%
4274 \def\horo@data{}%
4275 \uppercase{\if#1S\def\horo@data{-}\fi\if#1W\def\horo@data{-}\fi}%
4276 \dimen@=#4\p@
4277 \divide\dimen@ by 60\relax
4278 \advance\dimen@ by #3\p@
4279 \divide\dimen@ by 60\relax
4280 \advance\dimen@ by #2\p@
4281 \edef#5{\horo@data\TG@rem@pt\dimen@}%
4282 \trimspaces{#5}%
4283 }
4284 % \end{macrocode}
4285 % \end{macro}
4286 %
4287 % Now, some configuration for the smart-rounding macros. This is a bit
4288 % complicated because of the diversity of rounding modes the user might
4289 % want. The general idea is that we convert decimal to sexagesimal in
4290 % several stages corresponding to the mixed-based digits of the result, most
4291 % significant down to least significant (i.e.\ sign, degrees, minutes,
4292 % seconds). At each stage we are rounding down, taking the floor function.
4293 % However, at some stage we may add an offset to make the floor function round
4294 % to nearest. For a pure round to nearest, that offset corresponds to half
4295 % the size we're rounding to, and we add right at the start. But if we're
4296 % trying to respect higher-digit boundaries, we'll add the offset later,
4297 % because the higher digits should always have the values they would have
4298 % with truncation. In that case, it becomes possible for the rounded-to digit
4299 % to have an out-of-range value; so there's a flag for whether to expose
4300 % that or round it down. Finally, because configuring all that is such a
4301 % mess, we have some convenience macros that preset commonly-used modes, and
4302 % a super-convenience mode that attempts to auto-select a reasonable
4303 % rounding mode depending on context.
4304 %
4305 % \begin{macro}{\horo@r@offset}
4306 % Amount to add to |\dimen@| when we're ready to add the offset. Default is
4307 % for ``transparent truncate'' mode.
4308 % \begin{macrocode}
4309 \def\horo@r@offset{1sp}%
4310 % \end{macrocode}
4311 % \end{macro}
4312 %
4313 % \begin{macro}{\horo@r@offdig}
4314 % Digit before which to apply the offset. May be Z for Zodiac sign, D for
4315 % degrees, M for minutes, S for seconds, anything else will not add the
4316 % offset at all. Default is add at the start.
4317 % \begin{macrocode}
4318 \def\horo@r@offdig{Z}%
4319 % \end{macrocode}
4320 % \end{macro}
4321 %
4322 % \begin{macro}{\ifhororoundclamp}
4323 % Boolean flag: should we clamp rounded digits to their expected range?
4324 % Default no.
4325 % \begin{macrocode}
4326 \newif\ifhororoundclamp\hororoundclampfalse
4327 % \end{macrocode}
4328 % \end{macro}
4329 %
4330 % Preset rounding modes covering all the reasonable ones. First we offer
4331 % basic truncation, both the transparent version (which is default) and the
4332 % strict version.
4333 % \begin{macrocode}
4334 \def\hororoundstricttruncate{\def\horo@r@offdigit{X}}
4335 \def\hororoundtruncate{\def\horo@r@offset{1sp}\def\horo@r@offdigit{Z}}
4336 % \end{macrocode}
4337 %
4338 % Now, pure round to nearest whatever.
4339 % \begin{macrocode}
4340 \def\hororoundtosec{\def\horo@r@offset{9sp}\def\horo@r@offdigit{Z}}
4341 \def\hororoundtomin{\def\horo@r@offset{546sp}\def\horo@r@offdigit{Z}}
4342 \def\hororoundtodeg{\def\horo@r@offset{0.5pt}\def\horo@r@offdigit{Z}}
4343 % \end{macrocode}
4344 %
4345 % Round to a lower digit but keep the boundaries of a higher digit. This
4346 % may result in out-of-range lower digits if |\hororoundclampfalse| is in
4347 % force.
4348 % \begin{macrocode}
4349 \def\hororoundtoseckeepsign{\def\horo@r@offset{9sp}\def\horo@r@offdigit{D}}
4350 \def\hororoundtoseckeepdeg{\def\horo@r@offset{546sp}\def\horo@r@offdigit{M}}
4351 \def\hororoundtoseckeepmin{\def\horo@r@offset{0.5pt}\def\horo@r@offdigit{S}}
4352 \def\hororoundtominkeepsign{\def\horo@r@offset{546sp}\def\horo@r@offdigit{D}}
4353 \def\hororoundtominkeepdeg{\def\horo@r@offset{0.5pt}\def\horo@r@offdigit{M}}
4354 \def\hororoundtodegkeepsign{\def\horo@r@offset{0.5pt}\def\horo@r@offdigit{D}}
4355 % \end{macrocode}
4356 %
4357 % \begin{macro}{\ifhororoundauto}
4358 % Boolean flag: should the system automatically choose a reasonable rounding
4359 % mode when it's about to do rounding?
4360 % \begin{macrocode}
4361 \newif\ifhororoundauto\hororoundautotrue
4362 % \end{macrocode}
4363 % \end{macro}
4364 %
4365 % \begin{macro}{\horo@d@dms@@}
4366 % This is an internal macro used in truncation and rounding. The first
4367 % argument is a macro name representing the digit to extract; the second is
4368 % the greatest value to allow for that digit if |\hororoundclamptrue| is
4369 % active. The current value of |\dimen@| gets truncated to an integer
4370 % number of points, and clamped if appropriate. That integer gets stored as
4371 % the |\horo@fterdef| definition of the macro whose name was passed in, and
4372 % then it gets subtracted out of |\dimen@| and the remaining fractional
4373 % part is multiplied by 60. The idea here is that we're extracting the
4374 % sexagesimal digits of the number, going from decimal degrees (or hours) to
4375 % integer degrees and decimal minutes; from decimal minutes to integer
4376 % minutes and decimal seconds; or from decimal seconds to integer seconds
4377 % and decimal treyf, which will be discarded.
4378 % \begin{macrocode}
4379 \def\horo@d@dms@@#1#2{%
4380 \count0=\dimen@\relax
4381 \divide\count0by65536\relax
4382 \ifhororoundclamp\ifnum\count0>#2 \count0=#2\relax\fi\fi
4383 \edef#1{\the\count0}%
4384 \horo@fterdef#1%
4385 \advance\dimen@-\count0\p@
4386 \multiply\dimen@ 60\relax
4387 }
4388 % \end{macrocode}
4389 % \end{macro}
4390 %
4391 % \begin{macro}{\horo@d@dms@}
4392 % Do a decimal to sexagesimal conversion using simple truncation.
4393 % This is used internally for angles passed to external software. The magic
4394 % number 100000 is guaranteed to exceed any digit value, so digits will
4395 % never be clamped. The digits go into the |\horo@fterdef| queue, so this
4396 % must be called in a group and the results appear after the group.
4397 % \begin{macrocode}
4398 \def\horo@d@dms@{%
4399 \advance\dimen@1sp\relax
4400 \horo@d@dms@@\horo@d@deg{100000}%
4401 \horo@d@dms@@\horo@d@min{100000}%
4402 \horo@d@dms@@\horo@d@sec{100000}%
4403 }
4404 % \end{macrocode}
4405 % \end{macro}
4406 %
4407 % \begin{macro}{\horo@d@sdms}
4408 % Decimal to SDMS. The number of degrees past 0\horodegrees\AriesSymbol,
4409 % stored
4410 % at one point per degree in |\dimen@|, is converted to macros of decimal
4411 % integers representing Zodiac sign (1=Aries\ldots12=Pisces), degrees,
4412 % minutes, and seconds of arc in |\horo@d@sign|,
4413 % |\horo@d@deg|, |\horo@d@min|, and |\horo@d@sec| respectively. It obeys
4414 % all the complicated rounding instructions set by the above macros.
4415 %
4416 % First, we open a prophylactic group, and add the offset if we're adding it
4417 % before the sign.
4418 % \begin{macrocode}
4419 \def\horo@d@sdms{%
4420 \begingroup
4421 \def\horo@tmp{Z}\ifx\horo@r@offdigit\horo@tmp
4422 \advance\dimen@\horo@r@offset\relax
4423 \fi
4424 % \end{macrocode}
4425 %
4426 % Find the sign by converting |\dimen@| to a count register, and dividing by
4427 % 1966080, which is 30\horodegrees\ measured in counts at 65536 counts per
4428 % degree. We add one to the result, in a separate register, because signs
4429 % are one-based, and save the result in |\horo@d@sign| with |\horo@fterdef|
4430 % to preserve it outside the group.
4431 % \begin{macrocode}
4432 \count0=\dimen@\relax
4433 \divide\count0by1966080\relax
4434 \count1=\count0\relax
4435 \advance\count1by1\relax
4436 \edef\horo@d@sign{\the\count1}%
4437 \horo@fterdef\horo@d@sign
4438 % \end{macrocode}
4439 %
4440 % Subtract out the angle corresponding to the start of the sign, to leave
4441 % just the degree part in |\dimen@|.
4442 % \begin{macrocode}
4443 \multiply\count0by30\relax%
4444 \advance\dimen@-\count0\p@
4445 % \end{macrocode}
4446 %
4447 % Degrees digit: add the offset if this is where we're adding it, then
4448 % extract the degrees into |\horo@d@deg|.
4449 % \begin{macrocode}
4450 \def\horo@tmp{D}\ifx\horo@r@offdigit\horo@tmp
4451 \advance\dimen@\horo@r@offset\relax
4452 \fi
4453 \horo@d@dms@@\horo@d@deg{29}%
4454 % \end{macrocode}
4455 %
4456 % Minutes digit: add the offset if this is where we're adding it, then
4457 % extract the minutes into |\horo@d@min|.
4458 % \begin{macrocode}
4459 \def\horo@tmp{M}\ifx\horo@r@offdigit\horo@tmp
4460 \advance\dimen@\horo@r@offset\relax
4461 \fi
4462 \horo@d@dms@@\horo@d@min{59}%
4463 % \end{macrocode}
4464 %
4465 % Seconds digit: add the offset if this is where we're adding it, then
4466 % extract the seconds into |\horo@d@sec|.
4467 % \begin{macrocode}
4468 \def\horo@tmp{S}\ifx\horo@r@offdigit\horo@tmp
4469 \advance\dimen@\horo@r@offset\relax
4470 \fi
4471 \horo@d@dms@@\horo@d@sec{59}%
4472 \endgroup
4473 }
4474 % \end{macrocode}
4475 % \end{macro}
4476 %
4477 % \begin{macro}{\horo@d@dms}
4478 % Decimal to DMS. This is the same idea as |\horo@d@sdms| without the
4479 % handling of signs.
4480 % \begin{macrocode}
4481 \def\horo@d@dms{%
4482 \begingroup
4483 \def\horo@tmp{Z}\ifx\horo@r@offdigit\horo@tmp
4484 \advance\dimen@ \horo@r@offset\relax
4485 \fi
4486 \def\horo@tmp{D}\ifx\horo@r@offdigit\horo@tmp
4487 \advance\dimen@ \horo@r@offset\relax
4488 \fi
4489 \horo@d@dms@@\horo@d@deg{100000}%
4490 \def\horo@tmp{M}\ifx\horo@r@offdigit\horo@tmp
4491 \advance\dimen@ \horo@r@offset\relax
4492 \fi
4493 \horo@d@dms@@\horo@d@min{59}%
4494 \def\horo@tmp{S}\ifx\horo@r@offdigit\horo@tmp
4495 \advance\dimen@ \horo@r@offset\relax
4496 \fi
4497 \horo@d@dms@@\horo@d@sec{59}%
4498 \endgroup
4499 }
4500 % \end{macrocode}
4501 % \end{macro}
4502 %
4503 % \begin{macro}{\horodsmstext}
4504 % Typeset DSMS text. This might be invoked by the user to print a text
4505 % version of calculated positions. It calls |\horo@d@dms| and then typesets
4506 % the results with the defined symbols. When |\hororoundautotrue| is
4507 % active, this will automatically choose |\hororoundtoseckeepmin| rounding.
4508 % \begin{macrocode}
4509 \def\horodsmstext#1{%
4510 \begingroup
4511 \ifhororoundauto\hororoundtoseckeepmin\fi
4512 \dimen@=#1\p@
4513 \horo@d@sdms
4514 \horo@d@deg\horodegrees\Zodiac{\horo@d@sign}%
4515 \horo@d@min\horominutes\horo@d@sec\horoseconds
4516 \endgroup
4517 }
4518 % \end{macrocode}
4519 % \end{macro}
4520 %
4521 % \begin{macro}{\horotimetext}
4522 % Typeset DMS text as if it were a time, treating ``degrees'' as hours.
4523 % The minutes and seconds are forced to two digits so that times like
4524 % 12:03:04 will come out as such instead of as 12:3:4. No provision for
4525 % AM/PM; if you want that, you're on your own. When |\hororoundautotrue| is
4526 % active, this will automatically choose |\hororoundtruncate| rounding, on
4527 % the theory that the time was probably entered by the user earlier with
4528 % integer seconds and should be preserved.
4529 % \begin{macrocode}
4530 \def\horotimetext#1{%
4531 \begingroup
4532 \ifhororoundauto\hororoundtruncate\fi
4533 \dimen@=#1\p@
4534 \horo@d@sdms
4535 \horo@twodig\horo@d@min\horo@twodig\horo@d@sec
4536 \horo@d@deg:\horo@d@min:\horo@d@sec
4537 \endgroup
4538 }
4539 % \end{macrocode}
4540 % \end{macro}
4541 %
4542 % \begin{macro}{\horo@nsew}
4543 % This is an internal function for the next one: it strips the
4544 % positive/negative (not Zodiac) sign from |\dimen@|, making it positive,
4545 % but uses the sign to select one of the two arguments which will become the
4546 % definition of |\horo@calc@b|. The intended use is for typesetting things
4547 % like longitude that could be East or West.
4548 % \begin{macrocode}
4549 \def\horo@nsew#1#2{%
4550 \ifdim\dimen@<\z@\relax
4551 \def\horo@calc@b{#2}\multiply\dimen@ by-1\relax
4552 \else
4553 \def\horo@calc@b{#1}%
4554 \fi
4555 }
4556 % \end{macrocode}
4557 % \end{macro}
4558 %
4559 % \begin{macro}{\horolatlontext}
4560 % User-callable wrapper for |horo@nsew|. Typesets the first argument as a
4561 % number of degrees, minutes, and seconds, with the second and third
4562 % arguments added at the end for positive or negative respectively.
4563 % Intended for typesetting latitude or longitude. The default rounding is
4564 % |\hororoundtruncate|, to preserve user input.
4565 % \begin{macrocode}
4566 \def\horolatlontext#1#2#3{%
4567 \begingroup
4568 \ifhororoundauto\hororoundtruncate\fi
4569 \dimen@=#1\p@\horo@nsew{#2}{#3}%
4570 \horo@d@dms
4571 \horo@d@deg\horodegrees%
4572 \horo@d@min\horominutes\horo@d@sec\horoseconds~\horo@calc@b
4573 \endgroup
4574 }
4575 % \end{macrocode}
4576 % \end{macro}
4577 %
4578 % \begin{macro}{\hororxtext}
4579 % Typeset a ``retrograde'' symbol if the specified object is retrograde,
4580 % determined by whether its Vel is negative.
4581 % \begin{macrocode}
4582 \def\hororxtext#1{%
4583 \begingroup
4584 \dimen@\csname horo#1Vel\endcsname\p@
4585 \ifdim\dimen@<\z@\relax
4586 \horoRetrogradeSymbol
4587 \fi
4588 \endgroup
4589 }
4590 % \end{macrocode}
4591 % \end{macro}
4592 %
4593 % \subsubsection{Setting all data at once}
4594 % \begin{macro}{\horocalcparms}
4595 % This sets the year, month, day, time of day, latitude, and longitude all
4596 % at once for user convenience, making use of the sexagesimal conversions.
4597 % \begin{macrocode}
4598 \def\horocalcparms#1#2#3#4#5#6{%
4599 \edef\horocalcyear{#1}\edef\horocalcmonth{#2}\edef\horocalcday{#3}%
4600 \horo@ddms N#4Q\horocalctime
4601 \horo@ddms#5Q\horocalclon
4602 \horo@ddms#6Q\horocalclat
4603 }
4604 % \end{macrocode}
4605 % \end{macro}
4606 %
4607 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4608 %
4609 % \subsection{Astrolog Calculation Back End}
4610 %
4611 % These macros handle the interface to Astrolog, if it was selected. We
4612 % start by checking whether it \emph{was} selected:
4613 % \begin{macrocode}
4614 \ifhoro@strolog
4615 % \end{macrocode}
4616 %
4617 % \subsubsection{Name translation}
4618 % We define a bunch of macros that represent the short
4619 % strings used on the Astrolog command line to identify different objects
4620 % and cusps. We also define names in the reverse direction for translating
4621 % the abbreviations from Astrolog's format back to \textsf{horoscop}'s.
4622 % Some of those contain illegal characters for \TeX\ command names, so we
4623 % have to use |\expandafter\def\csname|.
4624 % \begin{macrocode}
4625 \def\horoSun@strologname{Sun }\def\horo@stSunObj{Sun}
4626 \def\horoMoon@strologname{Moo }\def\horo@stMooObj{Moon}
4627 \def\horoMercury@strologname{Mer }\def\horo@stMerObj{Mercury}
4628 \def\horoVenus@strologname{Ven }\def\horo@stVenObj{Venus}
4629 \def\horoMars@strologname{Mar }\def\horo@stMarObj{Mars}
4630 \def\horoJupiter@strologname{Jup }\def\horo@stJupObj{Jupiter}
4631 \def\horoSaturn@strologname{Sat }\def\horo@stSatObj{Saturn}
4632 \def\horoUranus@strologname{Ura }\def\horo@stUraObj{Uranus}
4633 \def\horoNeptune@strologname{Nep }\def\horo@stNepObj{Neptune}
4634 \def\horoPluto@strologname{Plu }\def\horo@stPluObj{Pluto}
4635 \def\horoChiron@strologname{Chi }\def\horo@stChiObj{Chiron}
4636 \def\horoCeres@strologname{Cer }\def\horo@stCerObj{Ceres}
4637 \def\horoPallas@strologname{Pal }\def\horo@stPalObj{Pallas}
4638 \def\horoJuno@strologname{Jun }\def\horo@stJunObj{Juno}
4639 \def\horoVesta@strologname{Ves }\def\horo@stVesObj{Vesta}
4640 \def\horoNorthNode@strologname{Nod }\def\horo@stNodObj{NorthNode}
4641 \def\horoSouthNode@strologname{S.N }
4642 \expandafter\def\csname [email protected]\endcsname{SouthNode}
4643 \def\horoLilith@strologname{Lil }\def\horo@stLilObj{Lilith}
4644 % \end{macrocode}
4645 %
4646 % Zodiac signs and cusps only need to go in the reverse direction.
4647 % The signs expand to the start of the sign in degrees.
4648 % \begin{macrocode}
4649 \def\horo@stAscObj{CuspI}
4650 \expandafter\def\csname horo@st2ndObj\endcsname{CuspII}
4651 \expandafter\def\csname horo@st3rdObj\endcsname{CuspIII}
4652 \def\horo@stNadObj{CuspIV}
4653 \expandafter\def\csname horo@st5thObj\endcsname{CuspV}
4654 \expandafter\def\csname horo@st6thObj\endcsname{CuspVI}
4655 \def\horo@stDesObj{CuspVII}
4656 \expandafter\def\csname horo@st8thObj\endcsname{CuspVIII}
4657 \expandafter\def\csname horo@st9thObj\endcsname{CuspIX}
4658 \def\horo@stMidObj{CuspX}
4659 \expandafter\def\csname horo@st11tObj\endcsname{CuspXI}
4660 \expandafter\def\csname horo@st12tObj\endcsname{CuspXII}
4661 \def\horo@stAriSign{0}
4662 \def\horo@stTauSign{30}
4663 \def\horo@stGemSign{60}
4664 \def\horo@stCanSign{90}
4665 \def\horo@stLeoSign{120}
4666 \def\horo@stVirSign{150}
4667 \def\horo@stLibSign{180}
4668 \def\horo@stScoSign{210}
4669 \def\horo@stSagSign{240}
4670 \def\horo@stCapSign{270}
4671 \def\horo@stAquSign{300}
4672 \def\horo@stPisSign{330}
4673 % \end{macrocode}
4674 %
4675 % \subsubsection{House systems}
4676 % And, similarly, a set of macros the user can use to choose a house system.
4677 % These work by redefining |\horo@housenumber| to the integer codes Astrolog
4678 % uses.
4679 %
4680 % \begin{macrocode}
4681 \def\horoPlacidusHouses{\def\horo@housenumber{0}}
4682 \def\horoKochHouses{\def\horo@housenumber{1}}
4683 \def\horoEqualHouses{\def\horo@housenumber{2}}
4684 \def\horoCampanusHouses{\def\horo@housenumber{3}}
4685 \def\horoMeridianHouses{\def\horo@housenumber{4}}
4686 \def\horoRegiomontanusHouses{\def\horo@housenumber{5}}
4687 \def\horoPorphyryHouses{\def\horo@housenumber{6}}
4688 \def\horoMorinusHouses{\def\horo@housenumber{7}}
4689 \def\horoPolichPageHouses{\def\horo@housenumber{8}}
4690 \def\horoAlcabitusHouses{\def\horo@housenumber{9}}
4691 \def\horoEqualMCHouses{\def\horo@housenumber{10}}
4692 \def\horoNeoPorphyryHouses{\def\horo@housenumber{11}}
4693 \def\horoWholeHouses{\def\horo@housenumber{12}}
4694 \def\horoVedicHouses{\def\horo@housenumber{13}}
4695 % \end{macrocode}
4696 %
4697 % \subsubsection{Interface stuff}
4698 % Define a read for Astrolog's output, and a name for the temporary file.
4699 % \begin{macrocode}
4700 \newread\horo@tmpfile
4701 \edef\horo@tmpfname{\jobname.hor}%
4702 % \end{macrocode}
4703 %
4704 % \begin{macro}{\horoastrologopt}
4705 % The |\horoastrologopt| macro is interpolated onto the Astrolog command
4706 % line, so the user can set it if they have extra options to pass.
4707 % \begin{macrocode}
4708 \def\horoastrologopt{}
4709 % \end{macrocode}
4710 % \end{macro}
4711 %
4712 % \begin{macro}{\horoobjects}
4713 % Default list of objects to calculate.
4714 % \begin{macrocode}
4715 \def\horoobjects{Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn,%
4716 Uranus,Neptune,Pluto,NorthNode,Lilith,%
4717 Chiron,Ceres,Pallas,Juno,Vesta}
4718 % \end{macrocode}
4719 % \end{macro}
4720 %
4721 % Placidus houses are the default:
4722 % \begin{macrocode}
4723 \horoPlacidusHouses
4724 % \end{macrocode}
4725 %
4726 % \subsubsection{The actual calculation}
4727 % \begin{macro}{\horocalculate}
4728 % Okay, here's where the excitement happens. This macro takes the current
4729 % chart data from the |\horocalcyear|, |\horocalcmonth|, |\horocalcday|,
4730 % |\horocalctime|, |\horocalclat|, and |\horocalclong| macros, along with
4731 % various ancillary configuration macros, and runs Astrolog.
4732 %
4733 % First we open the definition, and a group which will be used to prevent
4734 % macro and register pollution.
4735 % \begin{macrocode}
4736 \def\horocalculate{%
4737 \begingroup
4738 % \end{macrocode}
4739 %
4740 % We want to build up a list of all the objects we'll compute,
4741 % space separated, expressed in Astrolog's own abbreviations. That list
4742 % will go on the
4743 % Astrolog command line. Cusps always get computed. We build the list
4744 % by the same trick used earlier in
4745 % |\horosaveobjects|: building up a |\def| command in the |\aftergroup|
4746 % queue while we run a loop inside a group to decide what goes there. The
4747 % macro we are defining is |\horo@calc@a|. In the loop we execute
4748 % |\horo@calc@c| on each object or cusp. It adds a space and the
4749 % appropriate |\horo|\meta{object}|@strologname| macro to the |\aftergroup|
4750 % queue.
4751 % \begin{macrocode}
4752 \begingroup
4753 \aftergroup\def\aftergroup\horo@calc@a\aftergroup{%
4754 \horoforeach{\horoobjects}{\horo@calc@c}%
4755 \aftergroup}%
4756 \endgroup
4757 % \end{macrocode}
4758 % So at this point |\horo@calc@a| contains the list of objects.
4759 %
4760 % Now we get the time of day, which is stored in decimal hours, into hours
4761 % and minutes format and put it in |\horo@calc@d|.
4762 % \begin{macrocode}
4763 \dimen@\horocalctime\p@\horo@d@dms@\horo@twodig\horo@d@min
4764 \edef\horo@calc@d{\horo@d@deg:\horo@d@min\space GMT\space}%
4765 % \end{macrocode}
4766 %
4767 % We process |\horocalclon| into degrees:minutes format with E or W for East
4768 % or West and put it in |\horo@calc@e|. The macro |\horo@calc@b| is used to
4769 % pass out the East/West letter.
4770 % \begin{macrocode}
4771 \dimen@=\horocalclon\p@\horo@nsew EW%
4772 \horo@d@dms@
4773 \horo@twodig\horo@d@min
4774 \edef\horo@calc@e{\horo@d@deg:\horo@d@min\horo@calc@b\space}%
4775 % \end{macrocode}
4776 %
4777 % Similarly, |\horocalclat| goes into degrees:minutes format with N or S for
4778 % North or South and put it in |\horo@calc@f|.
4779 % \begin{macrocode}
4780 \dimen@=\horocalclat\p@\horo@nsew NS%
4781 \horo@d@dms@
4782 \horo@twodig\horo@d@min
4783 \edef\horo@calc@f{\horo@d@deg:\horo@d@min\horo@calc@b\space}%
4784 % \end{macrocode}
4785 %
4786 % Now we run Astrolog with the set of options we've built.
4787 % \begin{macrocode}
4788 \immediate\write18{%
4789 astrolog\space
4790 -o0 \horo@tmpfname\space
4791 -c \horo@housenumber\space
4792 -qa \horocalcmonth\space
4793 \horocalcday\space
4794 \horocalcyear\space
4795 \horo@calc@d\horo@calc@e\horo@calc@f
4796 -R0 \horo@calc@a
4797 \horoastrologopt
4798 }%
4799 % \end{macrocode}
4800 %
4801 % The output will have gone into the file named |\horo@tmpfname|. We open
4802 % it up and then call a parsing routine, which puts the results into
4803 % |\horo@fterdef|s. The |\ifhorocalculated| flag gets set to false; it will
4804 % be upgraded to true if we can successfully read anything out of the output
4805 % file.
4806 % \begin{macrocode}
4807 \openin\horo@tmpfile=\horo@tmpfname\relax
4808 \aftergroup\horocalculatedfalse
4809 \horo@calc@parse
4810 \closein\horo@tmpfile
4811 % \end{macrocode}
4812 %
4813 % Then the group ends, all the |\horo@fterdef|s happen, and that's the end
4814 % of |\horocalculate|.
4815 % \begin{macrocode}
4816 \endgroup
4817 }
4818 % \end{macrocode}
4819 % \end{macro}
4820 %
4821 % \begin{macro}{\horo@calc@c}
4822 % Internal macro for building up the object list. This takes its argument,
4823 % wraps it in |\horo| and |@strologname|, and adds the resulting token to
4824 % the |\aftergroup| queue.
4825 % \begin{macrocode}
4826 \def\horo@calc@c#1{%
4827 \expandafter\aftergroup\csname horo#1@strologname\endcsname
4828 }
4829 % \end{macrocode}
4830 % \end{macro}
4831 %
4832 % \begin{macro}{\horo@calc@parse}
4833 % Parse the Astrolog output file. It has a few kinds of lines in it; the
4834 % ones we are interested in all start with |-YF|;\footnote{|-YF|ing
4835 % in designated areas only.} but every line contains at
4836 % least one space. So the first stage of parsing is to iterate over all the
4837 % lines by tail recursion and call |\horo@calc@parse@b|, which looks for
4838 % |-YF| lines.
4839 % \begin{macrocode}
4840 \def\horo@calc@parse{%
4841 \read\horo@tmpfile to \horo@calc@parse@a
4842 \ifeof\horo@tmpfile\else
4843 \expandafter\horo@calc@parse@b\horo@calc@parse@a\space x\space Q%
4844 \horo@calc@parse
4845 \fi
4846 }
4847 % \end{macrocode}
4848 % \end{macro}
4849 %
4850 % \begin{macro}{\horo@YF}
4851 % Helper for |\horo@calc@parse@b|: simply expands to |-YF|.
4852 % \begin{macrocode}
4853 \def\horo@YF{-YF}
4854 % \end{macrocode}
4855 % \end{macro}
4856 %
4857 % \begin{macro}{\horo@calc@parse@b}
4858 % First stage of parsing a line of Astrolog output. Checks whether the
4859 % first space-separated word of the line is |-YF|, and if it is, calls
4860 % the second-stage parser |\horo@calc@parse@c| on the rest of the line.
4861 % \begin{macrocode}
4862 \def\horo@calc@parse@b#1 #2Q{%
4863 \def\horo@calc@parse@b@{#1}%
4864 \ifx\horo@calc@parse@b@\horo@YF\horo@calc@parse@c#2Q\fi
4865 }
4866 % \end{macrocode}
4867 % \end{macro}
4868 %
4869 % \begin{macro}{\horo@calc@parse@c}
4870 % Second stage of parsing a line of Astrolog output. We use \TeX\ delimited
4871 % argument parsing to find the fields on the line. They
4872 % are a bit complicated but correspond to object name; longitude in degree,
4873 % sign, decimal minutes; the latitude (which we ignore); the longitude speed
4874 % in degrees per day; and the distance. There's also some garbage at the
4875 % end as a result of the safety stuff added by |\horo@calc@parse|.
4876 % \begin{macrocode}
4877 \def\horo@calc@parse@c#1: #2 #3 #4, #5 #6, #7 #8Q{%
4878 % \end{macrocode}
4879 %
4880 % First convert from degrees, sign, and decimal minutes, to decimal degrees:
4881 % \begin{macrocode}
4882 \dimen@=#4\p@
4883 \divide\dimen@ by 60\relax
4884 \advance\dimen@ by #2\p@
4885 \advance\dimen@ by \csname horo@st#3Sign\endcsname\p@
4886 % \end{macrocode}
4887 %
4888 % Save the result in Pos:
4889 % \begin{macrocode}
4890 \expandafter\edef\csname
4891 horo\csname horo@st#1Obj\endcsname Pos\endcsname{%
4892 \TG@rem@pt\dimen@}%
4893 \expandafter\horo@fterdef\csname
4894 horo\csname horo@st#1Obj\endcsname Pos\endcsname
4895 % \end{macrocode}
4896 %
4897 % Save it in DPos as well:
4898 % \begin{macrocode}
4899 \expandafter\edef\csname
4900 horo\csname horo@st#1Obj\endcsname DPos\endcsname{%
4901 \TG@rem@pt\dimen@}%
4902 \expandafter\horo@fterdef\csname
4903 horo\csname horo@st#1Obj\endcsname DPos\endcsname
4904 % \end{macrocode}
4905 %
4906 % Save the velocity, which is already nicely formatted in \#7, to Vel:
4907 % \begin{macrocode}
4908 \expandafter\def\csname
4909 horo\csname horo@st#1Obj\endcsname Vel\endcsname{#7}%
4910 \expandafter\horo@fterdef\csname
4911 horo\csname horo@st#1Obj\endcsname Vel\endcsname
4912 % \end{macrocode}
4913 %
4914 % Now we have at least a little bit of valid data, so things are probably
4915 % cool.
4916 % \begin{macrocode}
4917 \aftergroup\horocalculatedtrue
4918 }
4919 % \end{macrocode}
4920 % \end{macro}
4921 %
4922 % End of the |\ifhoro@strolog| conditional:
4923 % \begin{macrocode}
4924 \fi
4925 % \end{macrocode}
4926 %
4927 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4928 %
4929 % \subsection{Swiss Ephemeris Calculation Back End}
4930 %
4931 % The interface to Swiss Ephemeris goes via the |swetest|
4932 % command-line program. Unlike Astrolog, which gets invoked once to do all
4933 % objects, we run |swetest| once for each object and once more for
4934 % all cusps.
4935 %
4936 % Although |\ifhoro@ppendtmp| is only used in the case where |swetest| is
4937 % enabled, we have to define it outside the conditional because otherwise
4938 % \TeX\ will see the |\fi| that closes |\ifhoro@ppendtmp| as closing
4939 % something else, with resulting entertaining results.
4940 % \begin{macro}{\ifhoro@ppendtmp}
4941 % \begin{macrocode}
4942 \newif\ifhoro@ppendtmp\horo@ppendtmpfalse
4943 % \end{macrocode}
4944 % \end{macro}
4945 %
4946 % Then the rest of this section is conditional on the |swetest| option being
4947 % enabled.
4948 % \begin{macrocode}
4949 \ifhoro@swetest
4950 % \end{macrocode}
4951 %
4952 % \subsubsection{Command-line options}
4953 % One of these gets passed to \textsf{horoscop} according to the object
4954 % currently being calculated. Users who want to add other objects will need
4955 % to create the corresponding |\horo|\meta{object}|SEOpt| macros.
4956 % \begin{macrocode}
4957 \def\horoSunSEOpt{-p0}
4958 \def\horoMoonSEOpt{-p1}
4959 \def\horoMercurySEOpt{-p2}
4960 \def\horoVenusSEOpt{-p3}
4961 \def\horoMarsSEOpt{-p4}
4962 \def\horoJupiterSEOpt{-p5}
4963 \def\horoSaturnSEOpt{-p6}
4964 \def\horoUranusSEOpt{-p7}
4965 \def\horoNeptuneSEOpt{-p8}
4966 \def\horoPlutoSEOpt{-p9}
4967 \def\horoChironSEOpt{-pD}
4968 \def\horoPholusSEOpt{-pE}
4969 \def\horoCeresSEOpt{-pF}
4970 \def\horoPallasSEOpt{-pG}
4971 \def\horoJunoSEOpt{-pH}
4972 \def\horoVestaSEOpt{-pI}
4973 \def\horoMeanNodeSEOpt{-pm}
4974 \def\horoTrueNodeSEOpt{-pt}
4975 \def\horoLilithSEOpt{-pA}
4976 % \end{macrocode}
4977 %
4978 % \changes{v0.91}{2008/07/15}{Fake SEOpt macros for always-calculated angles}
4979 % These next few are fake options; the Ascendant, MC, ARMC, and Vertex are
4980 % always calculated, and get their values through special handling instead
4981 % of the usual calculation mechanism, but if the user includes them in
4982 % |\horoobjects| we calculate the position of the Sun (overwritten later) so
4983 % as not to have trouble with an unknown object having been listed.
4984 % \begin{macrocode}
4985 \def\horoAscendantSEOpt{-p0}
4986 \def\horoMCSEOpt{-p0}
4987 \def\horoARMCSEOpt{-p0}
4988 \def\horoVertexSEOpt{-p0}
4989 % \end{macrocode}
4990 %
4991 % \begin{macro}{\horosweopt}
4992 % Any extra options can be passed here.
4993 % \begin{macrocode}
4994 \def\horosweopt{}%
4995 % \end{macrocode}
4996 % \end{macro}
4997 %
4998 % \subsubsection{House systems}
4999 % Gauquelin sectors aren't included here because they break the basic model
5000 % of 12 houses; other things would have to change dramatically to use them
5001 % properly, and it's not clear whether people who want to typeset wheel
5002 % charts actually want to typeset them with 36 houses at all anyway.
5003 % Objects called Ascendant, MC, ARMC, and Vertex are always calculated, and
5004 % may be of interest (to manually add to |\horoobjects| after the
5005 % calculation) if using a house
5006 % system where they don't coincide with house cusps.
5007 % \changes{v0.91}{2008/07/07}{Added support for Krusinski houses with Swiss Ephemeris}
5008 % \begin{macrocode}
5009 \def\horoAlcabitusHouses{\def\horo@houseletter{b}}
5010 \def\horoAxialHouses{\def\horo@houseletter{x}}
5011 \def\horoAzimuthalHouses{\def\horo@houseletter{h}}
5012 \def\horoCampanusHouses{\def\horo@houseletter{c}}
5013 \def\horoEqualHouses{\def\horo@houseletter{a}}
5014 \def\horoKochHouses{\def\horo@houseletter{k}}
5015 \def\horoKrusinskiHouses{\def\horo@houseletter{U}}
5016 \def\horoMorinusHouses{\def\horo@houseletter{m}}
5017 \def\horoPlacidusHouses{\def\horo@houseletter{p}}
5018 \def\horoPolichPageHouses{\def\horo@houseletter{t}}
5019 \def\horoPorphyryHouses{\def\horo@houseletter{o}}
5020 \def\horoRegiomontanusHouses{\def\horo@houseletter{r}}
5021 \def\horoVehlowHouses{\def\horo@houseletter{v}}
5022 % \end{macrocode}
5023 %
5024 % \subsubsection{Interface stuff}
5025 % Create a new read for the temporary file and save its name.
5026 % \begin{macrocode}
5027 \newread\horo@tmpfile
5028 \edef\horo@tmpfname{\jobname.hor}
5029 % \end{macrocode}
5030 %
5031 % \begin{macro}{\horo@readdata}
5032 % Read a line from the data file; flag a calculation failure if there's
5033 % nothing to read. The result goes into |\horo@data|. The line of data is
5034 % expected to be a decimal number with possible leading or trailing spaces,
5035 % which we trim off before saving it.
5036 % \begin{macrocode}
5037 \def\horo@readdata{%
5038 \ifeof\horo@tmpfile
5039 \def\horo@data{0.0}%
5040 \horocalculatedfalse
5041 \else
5042 \begingroup
5043 \let\do\@makeother\dospecials
5044 \read\horo@tmpfile to \horo@data
5045 \trimspaces\horo@data
5046 \horo@fterdef\horo@data
5047 \endgroup
5048 \fi
5049 }
5050 % \end{macrocode}
5051 % \end{macro}
5052 %
5053 % \begin{macro}{\horo@readpos}
5054 % Read a line from the data file and put it into Pos and DPos of the
5055 % specified object.
5056 % \begin{macrocode}
5057 \def\horo@readpos#1{%
5058 \horo@readdata
5059 \expandafter\let\csname horo#1Pos\endcsname\horo@data
5060 \expandafter\let\csname horo#1DPos\endcsname\horo@data
5061 }
5062 % \end{macrocode}
5063 % \end{macro}
5064 %
5065 % \begin{macro}{\horo@readposvel}
5066 % Read (D)Pos as above, and then also read the Vel of the same object.
5067 % \begin{macrocode}
5068 \def\horo@readposvel#1{%
5069 \horo@readpos{#1}%
5070 \horo@readdata
5071 \expandafter\let\csname horo#1Vel\endcsname\horo@data
5072 }
5073 % \end{macrocode}
5074 % \end{macro}
5075 %
5076 % \begin{macro}{\horoobjects}
5077 % Default object list for Swiss Ephemeris.
5078 % \begin{macrocode}
5079 \def\horoobjects{Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn,%
5080 Uranus,Neptune,Pluto,MeanNode,Lilith,%
5081 Chiron,Ceres,Pallas,Juno,Vesta}
5082 % \end{macrocode}
5083 % \end{macro}
5084 %
5085 % Placidus houses are default:
5086 % \begin{macrocode}
5087 \horoPlacidusHouses
5088 % \end{macrocode}
5089 %
5090 % \subsubsection{Calculation routines}
5091 % \begin{macro}{\horo@calcobj@}
5092 % Calculate the position \emph{or} velocity of an object. The second
5093 % argument is either ``s'' for position, or ``l'' for velocity; these are
5094 % option letters for |swetest|'s format string. The results will go
5095 % into the temporary file to be read later.
5096 % \begin{macrocode}
5097 \def\horo@calcobj@#1#2{%
5098 % \end{macrocode}
5099 %
5100 % Start by opening a prophylactic group:
5101 % \begin{macrocode}
5102 \begingroup
5103 % \end{macrocode}
5104 %
5105 % Convert the time of day to hours, minutes, and seconds:
5106 % \begin{macrocode}
5107 \dimen@\horocalctime\p@\horo@d@dms@
5108 \horo@twodig\horo@d@min\horo@twodig\horo@d@sec
5109 % \end{macrocode}
5110 %
5111 % Then do a shell escape, filling in all the appropriate options. The
5112 % formats being used (passed in through \#2) are such as to create lines of
5113 % output containing only decimal numbers, with a few harmless stray spaces
5114 % before or after.
5115 %
5116 % Note the use of |\ifhoro@ppendtmp|. It starts out false, so only one |>|
5117 % is used on the command line and the file gets overwritten.
5118 % \begin{macrocode}
5119 \immediate\write18{%
5120 swetest -f#2 -head\space
5121 -b\horocalcday.\horocalcmonth.\horocalcyear\space
5122 -ut\horo@d@deg:\horo@d@min:\horo@d@sec\space
5123 \csname horo#1SEOpt\endcsname\space
5124 \horosweopt\space
5125 \ifhoro@egrep| egrep '^[ 0-9.-]+'\space\fi
5126 >\ifhoro@ppendtmp >\fi\space
5127 \horo@tmpfname
5128 }%
5129 % \end{macrocode}
5130 %
5131 % But after closing the prophylactic group\ldots
5132 % \begin{macrocode}
5133 \endgroup
5134 % \end{macrocode}
5135 %
5136 % \ldots we set the flag true so that subsequent calls to |swetest|
5137 % will append instead of overwriting.
5138 % \begin{macrocode}
5139 \horo@ppendtmptrue
5140 }
5141 % \end{macrocode}
5142 % \end{macro}
5143 %
5144 % \begin{macro}{\horo@calcobj}
5145 % Simply invokes |\horo@calcobj| twice to get both position and velocity.
5146 % \begin{macrocode}
5147 \def\horo@calcobj#1{%
5148 \horo@calcobj@{#1}{l}%
5149 \horo@calcobj@{#1}{s}%
5150 }
5151 % \end{macrocode}
5152 % \end{macro}
5153 %
5154 % \begin{macro}{\horocalculate}
5155 % Main calculation macro. This starts by creating an option for cusp
5156 % calculation, as if ``Cusps'' was the name of a legitimate object. It sets
5157 % |\horo@ppendtmpfalse| to force the temporary file to be overwritten, and
5158 % |\horocalculatedtrue| (to be possibly turned off if there is trouble
5159 % reading the results). Then it uses a |\horoforeach| to call
5160 % |\horo@calcobj| to get position and speed for all the regular objects.
5161 % The internal function |\horo@calcobj@| is called as if it were going to
5162 % compute the position of the Cusps object, but that actually writes 16
5163 % numbers to the temporary file.
5164 % \begin{macrocode}
5165 \def\horocalculate{%
5166 \edef\horoCuspsSEOpt{-house\horocalclon,\horocalclat,%
5167 \horo@houseletter\space-p}%
5168 \horo@ppendtmpfalse
5169 \horocalculatedtrue
5170 \horoforeach{\horoobjects}{\horo@calcobj}%
5171 \horo@calcobj@{Cusps}{l}%
5172 % \end{macrocode}
5173 %
5174 % Now with all the data in the temporary file, we read it in. Open the
5175 % file, read position and velocity for all the regular objects, and then
5176 % read the cusps (12 of them) and other things added by |swetest| (4
5177 % of those) with another loop.
5178 % \begin{macrocode}
5179 \openin\horo@tmpfile=\horo@tmpfname\relax
5180 \horoforeach{\horoobjects}{\horo@readposvel}%
5181 \horoforeach{\horocusps,Ascendant,MC,ARMC,Vertex}{\horo@readpos}%
5182 \closein\horo@tmpfile\relax
5183 }
5184 % \end{macrocode}
5185 % \end{macro}
5186 %
5187 % End the |\ifhoro@swetest| conditional:
5188 % \begin{macrocode}
5189 \fi
5190 % \end{macrocode}
5191 %
5192 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5193 %
5194 % \subsection{Low-Level Chart Graphics}
5195 %
5196 % These macros are a grab bag of utilities for drawing bits and pieces of
5197 % wheel charts, used by the higher-level routines to actually draw complete
5198 % charts.
5199 %
5200 % \subsubsection{Configuration stuff}
5201 % \begin{macro}{\ifhorodrawcusps}
5202 % Setting for whether cusps should be drawn in ready-made wheel charts. The
5203 % reason the user might not want that would be if they're trying to make do
5204 % without a birth time. It has to be declared in this unconditional context
5205 % for parsing reasons.
5206 % \begin{macrocode}
5207 \newif\ifhorodrawcusps\horodrawcuspstrue
5208 % \end{macrocode}
5209 % \end{macro}
5210 %
5211 % \begin{macro}{\ifhoroboldangles}
5212 % Similar setting for whether angular-house cusps should be drawn extra
5213 % bold. A user who really doesn't want cusps must turn off all of
5214 % |\ifhorodrawcusps|, |\ifhoroboldangles|, and |\ifhoroanglearrows|,
5215 % as well as (probably) internal house labels; that is to allow drawing of
5216 % angular cusps and not other cusps, should the user want such a thing.
5217 % \begin{macrocode}
5218 \newif\ifhoroboldangles\horoboldanglestrue
5219 % \end{macrocode}
5220 % \end{macro}
5221 %
5222 % \begin{macro}{\ifhoroanglearrows}
5223 % Setting for whether to draw angular house cusps as arrows instead of
5224 % regular lines.
5225 % \begin{macrocode}
5226 \newif\ifhoroanglearrows\horoanglearrowstrue
5227 % \end{macrocode}
5228 % \end{macro}
5229 %
5230 % Now we can enter a conditional on wheel charts not being disabled by
5231 % package option.
5232 % \begin{macrocode}
5233 \ifhoro@wheels
5234 % \end{macrocode}
5235 %
5236 % \begin{macro}{\horounitlength}
5237 % This determines the size of the |horoscope| environment, which is 100
5238 % unit-lengths square. The default value is a little less than $1/100$ of
5239 % |\textwidth| because we're going to want to put things with their centres
5240 % on a circle of
5241 % diameter 100, and the things may actually spill a little outside the
5242 % circle. Exact value determined by trial and error, and depending on the
5243 % user's application may need to be changed significantly.
5244 % \begin{macrocode}
5245 \newlength{\horounitlength}
5246 \setlength{\horounitlength}{0.00952\textwidth}
5247 % \end{macrocode}
5248 % \end{macro}
5249 %
5250 % \begin{macro}{\horoanglecuspwidth}
5251 % Line width to use in drawing angular cusps when |\horoboldangles| is
5252 % turned on.
5253 % \begin{macrocode}
5254 \newlength{\horoanglecuspwidth}
5255 \setlength{\horoanglecuspwidth}{1.44pt}
5256 % \end{macrocode}
5257 % \end{macro}
5258 %
5259 % \subsubsection{Horoscope environment and chart labels}
5260 % \begin{environment}{horoscope}
5261 % This is the basic environment in which we'll draw charts. It's just a
5262 % |picture| of size $100\times100$ units with the origin in the middle.
5263 % \begin{macrocode}
5264 \newenvironment{horoscope}{%
5265 \setlength{\unitlength}{\horounitlength}%
5266 \begin{picture}(100,100)(-50,-50)%
5267 }{%
5268 \end{picture}%
5269 }
5270 % \end{macrocode}
5271 % \end{environment}
5272 %
5273 % We also have macros to be used inside a |horoscope| to typeset notes for
5274 % the whole chart at the centre or any of the four corners of the chart, in
5275 % what might otherwise be wasted space.
5276 %
5277 % \begin{macro}{\horoCnote}
5278 % \begin{macrocode}
5279 \newcommand{\horoCnote}[1]{%
5280 \put(0,0){\makebox(0,0){\parbox{75\unitlength}{\centering #1}}}%
5281 }
5282 % \end{macrocode}
5283 % \end{macro}
5284 %
5285 % \begin{macro}{\horoULnote}
5286 % \begin{macrocode}
5287 \newcommand{\horoULnote}[1]{%
5288 \put(-50,50){\makebox(40,0)[t]{\parbox[t]{40\unitlength}{\raggedright #1}}}%
5289 }
5290 % \end{macrocode}
5291 % \end{macro}
5292 %
5293 % \begin{macro}{\horoURnote}
5294 % \begin{macrocode}
5295 \newcommand{\horoURnote}[1]{%
5296 \put(10,50){\makebox(40,0)[t]{\parbox[t]{40\unitlength}{\raggedleft #1}}}%
5297 }
5298 % \end{macrocode}
5299 % \end{macro}
5300 %
5301 % \begin{macro}{\horoLLnote}
5302 % \begin{macrocode}
5303 \newcommand{\horoLLnote}[1]{%
5304 \put(-50,-50){\makebox(40,0)[b]{\parbox[t]{40\unitlength}{\raggedright #1}}}%
5305 }
5306 % \end{macrocode}
5307 % \end{macro}
5308 %
5309 % \begin{macro}{\horoLRnote}
5310 % \begin{macrocode}
5311 \newcommand{\horoLRnote}[1]{%
5312 \put(10,-50){\makebox(40,0)[b]{\parbox[t]{40\unitlength}{\raggedleft #1}}}%
5313 }
5314 % \end{macrocode}
5315 % \end{macro}
5316 %
5317 % \subsubsection{Scratch dimension registers}
5318 % We define our own aliases for eight dimension registers. \LaTeX\ or other
5319 % packages probably use these same registers, but we always use them within
5320 % a group in such a way as to not conflict.
5321 % \begin{macrocode}
5322 \dimendef\horo@dim@x=1\relax
5323 \dimendef\horo@dim@y=2\relax
5324 \dimendef\horo@dim@xa=3\relax
5325 \dimendef\horo@dim@ya=4\relax
5326 \dimendef\horo@dim@xb=5\relax
5327 \dimendef\horo@dim@yb=6\relax
5328 \dimendef\horo@dim@xc=7\relax
5329 \dimendef\horo@dim@yc=8\relax
5330 % \end{macrocode}
5331 %
5332 % \subsubsection{Polar-coordinate puts}
5333 % These are the simplest graphics operations in polar coordinates: putting
5334 % an arbitrary graphics object at a polar-coordinate location in a |picture|
5335 % environment, drawing a radial (constant-$\theta$) line segment, or drawing
5336 % a line segment between two arbitrary points. These are designed for
5337 % internal use and may expand arguments in a less than friendly way, so
5338 % although they work well for our higher-level macros they perhaps should
5339 % not be used incautiously.
5340 %
5341 % \begin{macro}{\horo@putpolar}
5342 % Arguments are $r$, $\theta$, and the object to be |\put| at those
5343 % coordinates. The centre of the object goes at the specified coordinates.
5344 % Implementation is straightforward: we just expand and save
5345 % the polar coordinates to temporary macros, run |\horo@polarconvert| to
5346 % convert to Cartesian, and then do a |\put|.
5347 % \begin{macrocode}
5348 \def\horo@putpolar#1#2#3{%
5349 \begingroup
5350 \edef\p@one{#1}\edef\p@two{#2}%
5351 \horo@polarconvert\p@one\p@two\horo@dim@x\horo@dim@y
5352 \put(\TG@rem@pt\horo@dim@x,\TG@rem@pt\horo@dim@y){\makebox(0,0){#3}}%
5353 \endgroup
5354 }
5355 % \end{macrocode}
5356 % \end{macro}
5357 %
5358 % \begin{macro}{\horoputradial}
5359 % Draw a radial; that is, a line segment at a constant $\theta$ coordinate.
5360 % Arguments are the inner radius, the length, and $\theta$. Implementation
5361 % is straightforward. One small gotcha is that instead of adding the inner
5362 % radius and length to get the outer radius, we treat
5363 % $(\mathit{length},\theta)$ as a vector and do the addition on the
5364 % Cartesian side, because that saves some shuffling between macro
5365 % definitions and dimension registers.
5366 % \changes{v0.92}{2013/05/15}{Replace \cs{drawline} with \cs{Line}}
5367 % \begin{macrocode}
5368 \def\horoputradial#1#2#3{%
5369 \begingroup
5370 \edef\p@one{#1}\edef\p@two{#2}\edef\p@three{#3}%
5371 \horo@polarconvert\p@one\p@three\horo@dim@xa\horo@dim@ya
5372 \horo@polarconvert\p@two\p@three\horo@dim@xb\horo@dim@yb
5373 \advance\horo@dim@xb by\horo@dim@xa
5374 \advance\horo@dim@yb by\horo@dim@ya
5375 \Line(\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya)%
5376 (\TG@rem@pt\horo@dim@xb,\TG@rem@pt\horo@dim@yb)%
5377 \endgroup
5378 }
5379 % \end{macrocode}
5380 % \end{macro}
5381 %
5382 % \begin{macro}{\horoputline}
5383 % This is the more general line-segment primitive: it takes two $(r,\theta)$
5384 % pairs and draws a line between them.
5385 % \changes{v0.92}{2013/05/15}{Replace \cs{drawline} with \cs{Line}}
5386 % \begin{macrocode}
5387 \def\horoputline#1#2#3#4{%
5388 \begingroup
5389 \edef\p@one{#1}\edef\p@two{#2}\edef\p@three{#3}\edef\p@four{#4}%
5390 \horo@polarconvert\p@one\p@two\horo@dim@xa\horo@dim@ya
5391 \horo@polarconvert\p@three\p@four\horo@dim@xb\horo@dim@yb
5392 \Line(\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya)%
5393 (\TG@rem@pt\horo@dim@xb,\TG@rem@pt\horo@dim@yb)%
5394 \endgroup
5395 }
5396 % \end{macrocode}
5397 % \end{macro}
5398 %
5399 % \subsubsection{Arrowheads}
5400 % Although \LaTeX\ can draw arrows (which it calls ``vectors''), the
5401 % implementation has annoying limitations that make it unsuitable for use in
5402 % \textsf{horoscop}'s charts. Here we define our own arrowhead-drawing
5403 % routine, with a different set of annoying limitations.
5404 %
5405 % \begin{macro}{\horoputarrowhead}
5406 % Draw an arrowhead with its tip at $(r=\#1,\theta=\#2)$, pointing outward
5407 % from the origin.
5408 % The arrowhead is an appropriately scaled and rotated version of the
5409 % nonconvex polygon with Cartesian vertex coordinates $(0,1)$, $(1,0)$,
5410 % $(0,-1)$, $(3,0)$. The \#3 argument is equal to the unit length of that
5411 % coordinate system, measured in horoscope length units.
5412 %
5413 % Implementation starts by opening a group and saving the arguments in macros.
5414 % \begin{macrocode}
5415 \def\horoputarrowhead#1#2#3{%
5416 \begingroup
5417 \edef\horo@pa@r{#1}\edef\horo@pa@th{#2}%
5418 \edef\horo@pa@sc@le{#3}%
5419 % \end{macrocode}
5420 %
5421 % Convert tip coordinates to Cartesian.
5422 % \begin{macrocode}
5423 \horo@polarconvert\horo@pa@r\horo@pa@th\horo@dim@x\horo@dim@y
5424 % \end{macrocode}
5425 %
5426 % Compute a vector in the direction of the tip, used for offsetting its
5427 % coordinates to find the coordinates of the other vertices. This vector
5428 % corresponds to a unit vector in the $+X$ direction of the coordinate
5429 % system mentioned above.
5430 % \begin{macrocode}
5431 \horo@polarconvert\horo@pa@sc@le\horo@pa@th\horo@dim@xa\horo@dim@ya
5432 % \end{macrocode}
5433 %
5434 % Compute the Cartesian coordinates of the two vertices on either side; each
5435 % is 3 units back from the tip in the $-X$ direction and $\pm1$ unit off to
5436 % the side.
5437 % \begin{macrocode}
5438 \horo@dim@xb=\horo@dim@x\relax\horo@dim@yb=\horo@dim@y\relax
5439 \advance\horo@dim@xb by-3\horo@dim@xa\relax
5440 \advance\horo@dim@yb by-3\horo@dim@ya\relax
5441 \advance\horo@dim@xb by-\horo@dim@ya\relax
5442 \advance\horo@dim@yb by\horo@dim@xa\relax
5443 \horo@dim@xc=\horo@dim@x\relax\horo@dim@yc=\horo@dim@y\relax
5444 \advance\horo@dim@xc by-3\horo@dim@xa\relax
5445 \advance\horo@dim@yc by-3\horo@dim@ya\relax
5446 \advance\horo@dim@xc by\horo@dim@ya\relax
5447 \advance\horo@dim@yc by-\horo@dim@xa\relax
5448 % \end{macrocode}
5449 %
5450 % Compute the Cartesian coordinates of the final vertex, at the back of the
5451 % arrowhead. The sequencing is careful because of not wanting to use an
5452 % extra pair of registers; the |@xa| series used to hold the offset vector
5453 % and will now hold the vertex coordinates.
5454 % \begin{macrocode}
5455 \multiply\horo@dim@xa by-2\relax\multiply\horo@dim@ya by-2\relax
5456 \advance\horo@dim@xa by\horo@dim@x\relax
5457 \advance\horo@dim@ya by\horo@dim@y\relax
5458 % \end{macrocode}
5459 %
5460 % Plot the arrowhead, using \textsf{pict2e}'s |\polygon*| macro.
5461 % \changes{v0.92}{2013/05/15}{Replace \cs{blacken}\cs{path} with \cs{polygon*}}
5462 % \begin{macrocode}
5463 \polygon*%
5464 (\TG@rem@pt\horo@dim@x,\TG@rem@pt\horo@dim@y)%
5465 (\TG@rem@pt\horo@dim@xb,\TG@rem@pt\horo@dim@yb)%
5466 (\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya)%
5467 (\TG@rem@pt\horo@dim@xc,\TG@rem@pt\horo@dim@yc)%
5468 (\TG@rem@pt\horo@dim@x,\TG@rem@pt\horo@dim@y)%
5469 \endgroup
5470 }
5471 % \end{macrocode}
5472 % \end{macro}
5473
5474 % \subsubsection{Polar-coordinate curves}
5475 % Some chart types need to draw curves that are neither radial line segments
5476 % nor origin-centric circular arcs. For that matter, they need
5477 % origin-centric circular arcs, which are non-trivial. The curves defined
5478 % here are cubic B\'{e}zier splines with two endpoints specified in polar
5479 % coordinates and two control points both set to the value of this vector
5480 % formula:
5481 % \[
5482 % \mathbf{c} = 2\mathbf{m} - \frac{1}{2}(\mathbf{a}+\mathbf{b})
5483 % \]
5484 % where $\mathbf{c}$ is the control point, $\mathbf{a}$ and $\mathbf{b}$ are
5485 % the endpoints, and $\mathbf{m}$ is their \emph{polar} midpoint: the point
5486 % whose $r$ coordinate is the average of the $r$ coordinates of $\mathbf{a}$
5487 % and $\mathbf{b}$, and whose $\theta$ coordinate is midway between theirs,
5488 % going the shorter direction around the circle.
5489 %
5490 % This formula was derived by educated trial and error. If the endpoints
5491 % happen to have the same $r$, it is a reasonable approximation of the
5492 % origin-centric arc as long as they're within about 30\horodegrees\ of each
5493 % other, and it looks halfway acceptable even at larger distances.
5494 % Interesting special effects are obtained if the $r$ values do not match.
5495 %
5496 % \begin{macro}{\horoputcurve}
5497 % Draw a smooth curve connecting $(r=\#1,\theta=\#2)$ to
5498 % $(r=\#3,\theta=\#4)$. Implementation starts by opening a group and saving
5499 % all the arguments in macros.
5500 % \begin{macrocode}
5501 \def\horoputcurve#1#2#3#4{%
5502 \begingroup
5503 \edef\horo@pc@r@ne{#1}\edef\horo@pc@th@ne{#2}%
5504 \edef\horo@pc@rtw@{#3}\edef\horo@pc@thtw@{#4}%
5505 % \end{macrocode}
5506 %
5507 % Both $\theta$ coordinates are subjected to |\horo@chartrotate|.
5508 % \begin{macrocode}
5509 \dimen@=\horo@pc@th@ne\p@\relax\horo@chartrotate
5510 \edef\horo@pc@th@ne{\TG@rem@pt\dimen@}%
5511 \dimen@=\horo@pc@thtw@\p@\relax\horo@chartrotate
5512 \edef\horo@pc@thtw@{\TG@rem@pt\dimen@}%
5513 % \end{macrocode}
5514 %
5515 % Convert first endpoint to Cartesian.
5516 % \begin{macrocode}
5517 \horo@polarconvert\horo@pc@r@ne\horo@pc@th@ne\horo@dim@xa\horo@dim@ya
5518 % \end{macrocode}
5519 %
5520 % Convert second endpoint to Cartesian.
5521 % \begin{macrocode}
5522 \horo@polarconvert\horo@pc@rtw@\horo@pc@thtw@\horo@dim@xb\horo@dim@yb
5523 % \end{macrocode}
5524 %
5525 % Compute the polar-coordinate midpoint. Radius is simple average, but
5526 % angle must go through |\horo@midpoint| to handle cases like wrapping
5527 % around 360\horodegrees.
5528 % \begin{macrocode}
5529 \dimen@=\horo@pc@r@ne\p@\relax
5530 \advance\dimen@ by\horo@pc@rtw@\p@\relax
5531 \divide\dimen@ by2\relax
5532 \edef\horo@pc@rmid{\TG@rem@pt\dimen@}%
5533 \horo@midpoint\horo@pc@th@ne\horo@pc@thtw@
5534 \edef\horo@pc@thmid{\TG@rem@pt\dimen@}%
5535 % \end{macrocode}
5536 %
5537 % Convert midpoint to Cartesian.
5538 % \begin{macrocode}
5539 \horo@polarconvert\horo@pc@rmid\horo@pc@thmid\horo@dim@x\horo@dim@y
5540 % \end{macrocode}
5541 %
5542 % Compute the control point, which basically means moving the control point
5543 % away from the polar midpoint by an amount equal to and opposite from the
5544 % difference between it and the Cartesian midpoint. Recall that
5545 % \textsf{epic}'s spline curves are based on the Chaikin technique of
5546 % cutting corners off a polyline until it looks like a smooth curve. With
5547 % the switch to \textsf{pict2e} we are no longer using classic \LaTeX\
5548 % splines, but the underlying concept of a cubic spline should remain
5549 % the same. The initial polyline looks like two sides of a triangle, with
5550 % the remaining side being the segment directly connecting the two
5551 % endpoints. If we place the control point \emph{twice} as far away from
5552 % that direct segment as the polar midpoint would be, then after we're
5553 % finished cutting corners the middle of the remaining curve should end up
5554 % pretty close to half its original (control point) distance from the
5555 % Cartesian midpoint, and \emph{the same distance} as the polar midpoint
5556 % would be---thus passing through the polar midpoint. We want it to pass
5557 % through the polar midpoint at least in the important special case of
5558 % drawing an origin-centred arc. That's the education behind the educated
5559 % guess of the control point formula. In actual fact it doesn't work
5560 % perfectly because the cut ratio isn't right, but the result looks good
5561 % anyway.
5562 % \begin{macrocode}
5563 \multiply\horo@dim@x by -4\relax
5564 \advance\horo@dim@x by \horo@dim@xa\relax
5565 \advance\horo@dim@x by \horo@dim@xb\relax
5566 \divide\horo@dim@x by -2\relax
5567 \multiply\horo@dim@y by -4\relax
5568 \advance\horo@dim@y by \horo@dim@ya\relax
5569 \advance\horo@dim@y by \horo@dim@yb\relax
5570 \divide\horo@dim@y by -2\relax
5571 % \end{macrocode}
5572 %
5573 % With all the relevant coordinates computed, plot the actual curve and end.
5574 % \changes{v0.92}{2013/05/16}{Replace \cs{spline} with \cs{cbezier}}
5575 % \begin{macrocode}
5576 \cbezier(\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya)%
5577 (\TG@rem@pt\horo@dim@x,\TG@rem@pt\horo@dim@y)%
5578 (\TG@rem@pt\horo@dim@x,\TG@rem@pt\horo@dim@y)%
5579 (\TG@rem@pt\horo@dim@xb,\TG@rem@pt\horo@dim@yb)%
5580 \endgroup
5581 }
5582 % \end{macrocode}
5583 % \end{macro}
5584 %
5585 % \begin{macro}{\horoconncurve}
5586 % This is the most common case of using |\horoputcurve|: drawing a little
5587 % connector to show the relationship between an object label (plotted at the
5588 % object's DPos) and a radial that shows the object's real location (plotted
5589 % at Pos). It draws a curve from radius \#1 and the Pos of object \#3, to
5590 % radius \#2 and the DPos of object \#3. Object name last to make it easy
5591 % to call inside a |\horoforeach|.
5592 % \begin{macrocode}
5593 \def\horoconncurve#1#2#3{%
5594 \horoputcurve{#1}{\csname horo#3Pos\endcsname}%
5595 {#2}{\csname horo#3DPos\endcsname}%
5596 }
5597 % \end{macrocode}
5598 % \end{macro}
5599 %
5600 % \subsubsection{Locating objects}
5601 % These two simple macros are used to find where a given object should be
5602 % plotted, which is a frequent operation in the ready-made wheels.
5603 %
5604 % \begin{macro}{\horo@getobjdpos}
5605 % Gets the object's DPos and rotates it into chart coordinates.
5606 % \begin{macrocode}
5607 \def\horo@getobjdpos#1{%
5608 \dimen@\csname horo#1DPos\endcsname\p@
5609 \horo@chartrotate
5610 }
5611 % \end{macrocode}
5612 % \end{macro}
5613 %
5614 % \begin{macro}{\horo@getobjsdms}
5615 % Gets the object's Pos (not DPos) and converts it into SDMS, which is what
5616 % you want if you're going to print a label saying where the object is in
5617 % the sky. Then also gets the DPos so you know where to print the label,
5618 % which might be different from the actual sky location if the object has
5619 % been adjusted.
5620 % \begin{macrocode}
5621 \def\horo@getobjsdms#1{%
5622 \expandafter\dimen@\csname horo#1Pos\endcsname\p@
5623 \horo@d@sdms
5624 \horo@getobjdpos{#1}%
5625 }
5626 % \end{macrocode}
5627 % \end{macro}
5628 %
5629 % \subsubsection{Cusps, ticks, and sign keys}
5630 % These display some landmark kinds of things that people like to have
5631 % in charts. Cusps are just lines radiating
5632 % out from the centre at locations determined by the chart data. Ticks are
5633 % similar radial lines that occur at regular intervals to create a sort of
5634 % angular ruler around the circle, allowing visual measurement of angles.
5635 % A sign key shows the locations of the Zodiac signs; it's simply the
5636 % twelve sign symbols arranged regularly around a circle. In this
5637 % subsection we also describe cusp labels, which show the degree, sign, and
5638 % minute of a house cusp (or, concievably, something else) written around
5639 % the circle at a constant radius.
5640 %
5641 % \begin{macro}{\horo@pr}
5642 % Helper for |\horoputradials|: draw a radial at the DPos of object \#3.
5643 % \begin{macrocode}
5644 \def\horo@pr#1#2#3{%
5645 \horo@getobjdpos{#3}%
5646 \horoputradial{#1}{#2}{\TG@rem@pt\dimen@}%
5647 }
5648 % \end{macrocode}
5649 % \end{macro}
5650 %
5651 % \begin{macro}{\horoputradials}
5652 % Iterate through a list of objects drawing radials for each. Normally
5653 % you'd use this to draw the radial lines separating houses.
5654 % \begin{macrocode}
5655 \def\horoputradials#1#2#3{%
5656 \horoforeach{#1}{\horo@pr{#2}{#3}}%
5657 }
5658 % \end{macrocode}
5659 % \end{macro}
5660 %
5661 % \begin{macro}{\horo@pt}
5662 % Helper for |\horoputticks|. Puts one tick, advances |\dimen@|, and then
5663 % tail-recurses until we've gone around the whole circle.
5664 % \begin{macrocode}
5665 \def\horo@pt{%
5666 \ifdim\dimen@<360\p@
5667 {\horo@chartrotate
5668 \horoputradial{\horo@pta}{\horo@ptb}{\TG@rem@pt\dimen@}}%
5669 \advance\dimen@ by \horo@ptc\p@
5670 \expandafter\horo@pt
5671 \fi
5672 }
5673 % \end{macrocode}
5674 % \end{macro}
5675 %
5676 % \begin{macro}{\horoputticks}
5677 % Repeats |\putradial{#1}{#2}| every \#3 degrees around the circle to create
5678 % a regular pattern. Implementation saves all the arguments into macros,
5679 % sets |\dimen@| to zero, and calls |\horo@pt| to do the actual plotting.
5680 % \begin{macrocode}
5681 \def\horoputticks#1#2#3{%
5682 \begingroup
5683 \edef\horo@pta{#1}\edef\horo@ptb{#2}\edef\horo@ptc{#3}%
5684 \dimen@=\z@
5685 \horo@pt
5686 \endgroup
5687 }
5688 % \end{macrocode}
5689 % \end{macro}
5690 %
5691 % \begin{macro}{\horo@pa}
5692 % Helper for |\horoputarrows|: draw an arrow, pointing outward, at the
5693 % DPos of object \#3.
5694 % \begin{macrocode}
5695 \def\horo@pa#1#2#3{%
5696 \horo@getobjdpos{#3}%
5697 \horoputarrowhead{#1}{\TG@rem@pt\dimen@}{#2}%
5698 }
5699 % \end{macrocode}
5700 % \end{macro}
5701 %
5702 % \begin{macro}{\horoputarrows}
5703 % Iterate through a list of objects drawing arrows for each. Normally
5704 % you'd use this to draw the arrowheads for angular house cusps.
5705 % \begin{macrocode}
5706 \def\horoputarrows#1#2#3{%
5707 \horoforeach{#1}{\horo@pa{#2}{#3}}%
5708 }
5709 % \end{macrocode}
5710 % \end{macro}
5711 %
5712 % \begin{macro}{\horo@psk}
5713 % Helper for |\horoputsignkey|. This is another tail-recursive loop with
5714 % |\count0| as the loop counter, going from 0 to 11.\footnote{Well, it's
5715 % one louder, isn't it?} For each sign we
5716 % calculate the $\theta$ coordinate (of the middle of the sign, the
5717 % 15\horodegrees\ mark) and print the appropriate Zodiac symbol
5718 % at that angle and the chosen radius.
5719 % \begin{macrocode}
5720 \def\horo@psk{
5721 \ifnum\count0<12\relax
5722 \dimen@=30pt\relax
5723 \dimen@\count0\dimen@\relax
5724 \advance\dimen@ by 15pt\relax
5725 \horo@chartrotate
5726 \advance\count0 by 1%
5727 \horo@putpolar{\horo@radius}{\TG@rem@pt\dimen@}%
5728 {\Zodiac{\the\count0}}%
5729 \expandafter\horo@psk
5730 \fi
5731 }
5732 % \end{macrocode}
5733 % \end{macro}
5734 %
5735 % \begin{macro}{\horoputsignkey}
5736 % Driver for plotting a sign key. It just saves the argument, sets the loop
5737 % counter to zero, and invokes |\horo@psk|.
5738 % \begin{macrocode}
5739 \def\horoputsignkey#1{%
5740 \begingroup
5741 \def\horo@radius{#1}%
5742 \count0=0\relax
5743 \horo@psk
5744 \endgroup
5745 }
5746 % \end{macrocode}
5747 % \end{macro}
5748 %
5749 % \begin{macro}{\horoputcusplabel}
5750 % Make a label for a house cusp or (astrological) angle. This is a preview
5751 % of the techniques used in the object label code later on. The arguments
5752 % are the radius, the angular spacing in degrees between the three elements
5753 % of the label, and the object to label.
5754 %
5755 % First we open a
5756 % prophylactic group and get the object's location data, both its Pos in
5757 % SDMS (which is what the label will \emph{say}) and its DPos (which is
5758 % \emph{where} the label will appear).
5759 % \begin{macrocode}
5760 \def\horoputcusplabel#1#2#3{%
5761 \begingroup
5762 \horo@getobjsdms{#3}%
5763 % \end{macrocode}
5764 %
5765 % The sign part of the label is straightforwardly set at DPos and the
5766 % specified radius.
5767 % \begin{macrocode}
5768 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\Zodiac{\horo@d@sign}}%
5769 % \end{macrocode}
5770 %
5771 % Determining reading direction: the label is intended to be read in a
5772 % circular direction that points away from the 135\horodegrees\ mark,
5773 % which is at the upper left of the chart. That way it will come as close
5774 % as possible to reading either left to right or top to bottom. That means
5775 % if the label's centre location $\theta$ coordinate is less than
5776 % 135\horodegrees\ or more than 315\horodegrees, then the reading direction
5777 % will be turnwise and otherwise it will be widdershins.
5778 % The |\horo@pcl@s| macro is set to T or W accordingly.
5779 % \begin{macrocode}
5780 \def\horo@pcl@s{W}%
5781 \ifdim\dimen@<135\p@\def\horo@pcl@s{T}\fi
5782 \ifdim\dimen@>315\p@\def\horo@pcl@s{T}\fi
5783 % \end{macrocode}
5784 %
5785 % Typeset the part of the label that goes \#2 degrees turnwise of the
5786 % sign symbol. If the reading direction is turnwise, then this will be the
5787 % end of the label---the minutes part. Otherwise it will be the degrees
5788 % part. This happens inside a group so that |\dimen@| will be restored to
5789 % the $\theta$ of the sign symbol afterward.
5790 % \begin{macrocode}
5791 \begingroup
5792 \advance\dimen@ by -#2\p@\horo@fixdimen@
5793 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{%
5794 \expandafter\if\horo@pcl@s T%
5795 \horo@d@min\horominutes%
5796 \else
5797 \horo@d@deg\horodegrees%
5798 \fi
5799 }%
5800 \endgroup
5801 % \end{macrocode}
5802 %
5803 % Typeset the part of the label that goes \#2 degrees widdershins of the
5804 % sign symbol. Essentially the same logic as the other part above, except
5805 % that this time we don't need to save |\dimen@| because it won't be used
5806 % again.
5807 % \begin{macrocode}
5808 \advance\dimen@ by #2\p@\horo@fixdimen@
5809 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{%
5810 \expandafter\if\horo@pcl@s T%
5811 \horo@d@deg\horodegrees%
5812 \else
5813 \horo@d@min\horominutes%
5814 \fi
5815 }%
5816 \endgroup
5817 }
5818 % \end{macrocode}
5819 % \end{macro}
5820 %
5821 % \subsubsection{Object labels}
5822 % In general, an object label is printed in a radial direction with up to
5823 % six chunks (object symbol, sign symbol, degrees, minutes, seconds,
5824 % retrograde symbol) at equally spaced radii; the $\theta$ of all of them is
5825 % determined by the DPos, and the sequence in which they're printed (which
5826 % chunk is closest to the centre and which is furthest) is determined by
5827 % $\theta$ to create a consistent reading direction. We offer a few
5828 % variations to provide varying levels of control over the details.
5829 %
5830 % \begin{macro}{\horoputobjsymbol}
5831 % Put the symbol for object \#2 at its DPos and radius \#1.
5832 % \begin{macrocode}
5833 \def\horoputobjsymbol#1#2{%
5834 \begingroup
5835 \horo@getobjdpos{#2}%
5836 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\csname #2Symbol\endcsname}%
5837 \endgroup
5838 }
5839 % \end{macrocode}
5840 % \end{macro}
5841 %
5842 % \begin{macro}{\horo@pol@i}
5843 % Support for the smarter object-labelling macros. Opens a group, sets
5844 % |\dimen1| to \#1$+$\#2, and gets the DPos and SDMS of Pos for object \#3.
5845 % Based on DPos, the macro |\horo@pol@s| is set to indicate reading
5846 % direction: H for hubward or R for rimward to make the reading
5847 % direction be as far from the 135\horodegrees\ mark\footnote{Great
5848 % A'Tuin's left rear flipper.} as possible.
5849 % \begin{macrocode}
5850 \def\horo@pol@i#1#2#3{%
5851 \begingroup
5852 \dimen1=#1\p@\advance\dimen1by#2\p@
5853 \horo@getobjsdms{#3}%
5854 \def\horo@pol@s{H}%
5855 \ifdim\dimen@<45\p@\def\horo@pol@s{R}\fi
5856 \ifdim\dimen@>225\p@\def\horo@pol@s{R}\fi
5857 }
5858 % \end{macrocode}
5859 % \end{macro}
5860 %
5861 % \begin{macro}{\horoputobjdeglabel}
5862 % Typeset a label consisting of the object's degree and sign. Invokes
5863 % |\horo@pol@i|, and then typesets the sign symbol and degree in an order
5864 % determined by reading direction so that degree will read first. Arguments
5865 % are radius of the innermost chunk, radius step size between the two
5866 % chunks, and object name.
5867 % \begin{macrocode}
5868 \def\horoputobjdeglabel#1#2#3{%
5869 \horo@pol@i{#1}{#2}{#3}%
5870 \expandafter\if\horo@pol@s H%
5871 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\Zodiac{\horo@d@sign}}%
5872 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5873 {\horo@d@deg\horodegrees}%
5874 \else
5875 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\horo@d@deg\horodegrees}%
5876 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5877 {\Zodiac{\horo@d@sign}}%
5878 \fi
5879 \endgroup
5880 }
5881 % \end{macrocode}
5882 % \end{macro}
5883 %
5884 % \begin{macro}{\horoputobjminlabel}
5885 % Much the same as |\horoputobjdegreelabel| but makes a three-chunk label
5886 % that reads degrees, sign, minutes.
5887 % \begin{macrocode}
5888 \def\horoputobjminlabel#1#2#3{%
5889 \horo@pol@i{#1}{#2}{#3}%
5890 \expandafter\if\horo@pol@s H%
5891 \horo@putpolar{#1}{\TG@rem@pt\dimen@}%
5892 {\horo@d@min\horominutes}%
5893 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5894 {\Zodiac{\horo@d@sign}}%
5895 \advance\dimen1by#2\p@
5896 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5897 {\horo@d@deg\horodegrees}%
5898 \else
5899 \horo@putpolar{#1}{\TG@rem@pt\dimen@}%
5900 {\horo@d@deg\horodegrees}%
5901 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5902 {\Zodiac{\horo@d@sign}}%
5903 \advance\dimen1by#2\p@
5904 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5905 {\horo@d@min\horominutes}%
5906 \fi
5907 \endgroup
5908 }
5909 % \end{macrocode}
5910 % \end{macro}
5911 %
5912 % \begin{macro}{\horoputobjseclabel}
5913 % Typesets a four-chunk label reading degrees, sign, minutes, seconds.
5914 % \begin{macrocode}
5915 \def\horoputobjseclabel#1#2#3{%
5916 \horo@pol@i{#1}{#2}{#3}%
5917 \expandafter\if\horo@pol@s H%
5918 \horo@putpolar{#1}{\TG@rem@pt\dimen@}%
5919 {\horo@d@sec\horoseconds}%
5920 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5921 {\horo@d@min\horominutes}%
5922 \advance\dimen1by#2\p@
5923 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5924 {\Zodiac{\horo@d@sign}}%
5925 \advance\dimen1by#2\p@
5926 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5927 {\horo@d@deg\horodegrees}%
5928 \else
5929 \horo@putpolar{#1}{\TG@rem@pt\dimen@}%
5930 {\horo@d@deg\horodegrees}%
5931 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5932 {\Zodiac{\horo@d@sign}}%
5933 \advance\dimen1by#2\p@
5934 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5935 {\horo@d@min\horominutes}%
5936 \advance\dimen1by#2\p@
5937 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
5938 {\horo@d@sec\horoseconds}%
5939 \fi
5940 \endgroup
5941 }
5942 % \end{macrocode}
5943 % \end{macro}
5944 %
5945 % \begin{macro}{\horoputrxlabel}
5946 % Checks the Vel of object \#2. If it is negative, typesets
5947 % |\horoRetrogradeSymbol| at radius \#1 to indicate ``retrograde.''
5948 % \begin{macrocode}
5949 \def\horoputrxlabel#1#2{%
5950 \begingroup
5951 \dimen@\csname horo#2Vel\endcsname\p@
5952 \ifdim\dimen@<\z@\relax
5953 \horo@getobjdpos{#2}%
5954 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\horoRetrogradeSymbol}%
5955 \fi
5956 \endgroup
5957 }
5958 % \end{macrocode}
5959 % \end{macro}
5960 %
5961 % \begin{macro}{\horoputsmartlabel}
5962 % This is the do-everything label macro. It takes one argument which is the
5963 % object name, but it's sensitive to the definitions of several other
5964 % macros, most notably |\horo@lblone| and |\horo@lbltwo|. Each of those is a
5965 % string consisting of some combination of the letters (d, m, s, z, y, r)
5966 % for Degrees, Minutes, Seconds, Zodiac sign symbol, object sYmbol, and
5967 % possible Retrograde, respectively. They represent the sequence of chunks
5968 % to typeset reading in an \emph{inward} direction, for cases where the
5969 % preferred reading direction is inward for |\horo@lblone| or outward for
5970 % |\horo@lbltwo|. The reason to do it that way is that one typically wants
5971 % the order of some chunks to change with reading direction but not others.
5972 % A typical setting would be |\horo@lblone| equal to ``ydzmr'' and
5973 % |\horo@lbltwo| equal to ``ymzdr''. Then the degrees, sign, and minute
5974 % will always read in that order as closely as possible to top to bottom and
5975 % left to right, but the object symbol will always be on
5976 % the outside and the optional retrograde symbol always on the inside.
5977 % Proper handling and configuration of reading direction is the major
5978 % complication in this macro and responsible for much of the complexity of
5979 % its support macros.
5980 %
5981 % The implementation at this high level is fairly simple: it wraps
5982 % everything in a group to prevent pollution, gets the DPos and SDMS Pos of
5983 % the object, and figures out the reading direction into |\horo@pol@s|.
5984 % The |\dimen1| register is set to |\horo@outerrad|, which is the radius at
5985 % which we'll place the outermost chunk. Then depending on the reading
5986 % direction it calls |\horo@psl| with either |\horo@lblone| or
5987 % |\horo@lbltwo| and a $\mathcal{Q}$ (which is still exotic, remember) to
5988 % aid in parsing.
5989 % \begin{macrocode}
5990 \def\horoputsmartlabel#1{%
5991 \begingroup
5992 \horo@getobjsdms{#1}%
5993 \def\horo@psl@o{#1}%
5994 \def\horo@pol@s{H}%
5995 \ifdim\dimen@<45\p@\def\horo@pol@s{R}\fi
5996 \ifdim\dimen@>225\p@\def\horo@pol@s{R}\fi
5997 \dimen1=\horo@outerrad\p@\relax
5998 \expandafter\if\horo@pol@s H%
5999 \expandafter\horo@psl\horo@lblone Q%
6000 \else
6001 \expandafter\horo@psl\horo@lbltwo Q%
6002 \fi
6003 \endgroup
6004 }
6005 % \end{macrocode}
6006 % \end{macro}
6007 %
6008 % \begin{macro}{\horo@psl}
6009 % Main chunk-putting code for |\horoputsmartlabel|. This is a
6010 % tail-recursive loop that iterates through the format string typesetting
6011 % one chunk per letter until it hits the terminating $\mathcal{Q}$. For
6012 % each chunk it calls |\horo@psl@| to actually typeset the chunk, and
6013 % subtracts |\horo@delta| from |\dimen1|, which is where we're storing the
6014 % current radius, initially |\horo@outerrad|.
6015 % \begin{macrocode}
6016 \def\horo@psl#1{%
6017 \def\horo@psl@a{#1}%
6018 \ifx\horo@psl@a\horo@cue\relax
6019 \else
6020 \horo@putpolar{\TG@rem@pt\dimen1}{\TG@rem@pt\dimen@}%
6021 {\horo@psl@#1}%
6022 \advance\dimen1by-\horo@delta\p@\relax
6023 \expandafter\horo@psl
6024 \fi
6025 }
6026 % \end{macrocode}
6027 % \end{macro}
6028 %
6029 % \begin{macro}{\horo@psl@}
6030 % Typeset a single chunk. This is simply a bunch of |\if|s that identify
6031 % the chunk type and typeset the appropriate data.
6032 % \begin{macrocode}
6033 \def\horo@psl@#1{%
6034 \if#1d\relax\horo@d@deg\horodegrees\fi
6035 \if#1m\relax\horo@d@min\horominutes\fi
6036 \if#1s\relax\horo@d@sec\horoseconds\fi
6037 \if#1z\relax\Zodiac{\horo@d@sign}\fi
6038 \if#1y\relax\csname \horo@psl@o Symbol\endcsname\fi
6039 \if#1r\relax
6040 \begingroup
6041 \dimen@\csname horo\horo@psl@o Vel\endcsname\p@
6042 \ifdim\dimen@<\z@\relax\horoRetrogradeSymbol\fi
6043 \endgroup
6044 \fi
6045 }
6046 % \end{macrocode}
6047 % \end{macro}
6048 %
6049 % \begin{macro}{\horoscanlabels}
6050 % User interface to set up |\horo@lblone| and |\horo@lbltwo|. The argument
6051 % may be a format string in the format described above, or \emph{two} of
6052 % them separated by a slash. If one, then both formats are set to it. If
6053 % two, then the first goes into |\horo@lblone| and the second into
6054 % |\horo@lbltwo|. The implementation works by calling the helper
6055 % |\horo@scanlabels@| with two copies of \#1 and some terminating stuff so
6056 % that it can read the first two slash-terminated arguments and get either
6057 % the user's two strings, or the user's one string repeated twice.
6058 % \begin{macrocode}
6059 \def\horoscanlabels#1{%
6060 \horo@scanlabels@ #1/#1/xQ%
6061 }
6062 % \end{macrocode}
6063 % \end{macro}
6064 %
6065 % \begin{macro}{\horo@scanlabels@}
6066 % Helper for |\horoscanlabels|. Looks for two slash-terminated arguments
6067 % and then throws out everything up to the $\mathcal{Q}$. The arguments go
6068 % into |\horo@lblone| and |\horo@lbltwo|, but we also take the opportunity
6069 % to scan \#1 for length, using the helper macro |\horo@scanlabels@@| which
6070 % searches for a $\mathcal{Q}$ bumping the |\count0| register for every
6071 % letter it sees. The result of that scan goes into |\horolbllen|, and may
6072 % be used to automatically adjust radius step and text size.
6073 % \begin{macrocode}
6074 \def\horo@scanlabels@#1/#2/#3Q{%
6075 \def\horo@lblone{#1}%
6076 \def\horo@lbltwo{#2}%
6077 \begingroup
6078 \count0=0\relax
6079 \horo@scanlabels@@#1Q%
6080 \edef\horolbllen{\the\count0}%
6081 \horo@fterdef\horolbllen
6082 \endgroup
6083 }
6084 % \end{macrocode}
6085 % \end{macro}
6086 %
6087 % \begin{macro}{\horo@scanlabels@@}
6088 % Helper macro for |\horo@scanlabels@|: tail-recursive loop to count letters
6089 % in a $\mathcal{Q}$-terminated string.
6090 % \begin{macrocode}
6091 \def\horo@scanlabels@@#1{%
6092 \def\horo@sls@@a{#1}%
6093 \ifx\horo@sls@@a\horo@cue\relax
6094 \else
6095 \advance\count0by1\relax
6096 \expandafter\horo@scanlabels@@
6097 \fi
6098 }
6099 % \end{macrocode}
6100 % \end{macro}
6101 %
6102 % \begin{macro}{\horosetsmartradii}
6103 % Sets up the radii for |\horoputsmartlabel| in a semi-intelligent way,
6104 % sensitive to the label format string length from the previous macro. The
6105 % outer radius is set to \#1. The step size (distance between chunks) is
6106 % set to $\#2-n\cdot\#3$ where $n$ is the number of chunks specified in the
6107 % (inward-reading) label format string. The idea is that with more chunks,
6108 % you want them to be closer together. However, simply allocating a fixed
6109 % amount of space and dividing by the number of chunks is suboptimal because
6110 % with few chunks they end up too far apart; it's better, if the user
6111 % selects fewer chunks than the chart was originally designed for, to spread
6112 % them out a little but also leave substantial extra space on the inside
6113 % side. A more rigorous solution might involve using \TeX's fancy
6114 % variable-stretchability glue to create something that could be thought of
6115 % as a ``radial list'' comparable to horizontal and vertical lists.
6116 % \begin{macrocode}
6117 \def\horosetsmartradii#1#2#3{
6118 \def\horo@outerrad{#1}%
6119 \begingroup
6120 \dimen@=#3\p@\relax
6121 \multiply\dimen@ by -\horolbllen\relax
6122 \advance\dimen@ by #2\p@\relax
6123 \edef\horo@delta{\TG@rem@pt\dimen@}%
6124 \horo@fterdef\horo@delta
6125 \endgroup
6126 }
6127 % \end{macrocode}
6128 % \end{macro}
6129 %
6130 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6131 %
6132 % \subsection{Aspect Web}
6133 %
6134 % These routines typeset a web of lines that indicate aspects, with symbols
6135 % on their midpoints to clarify which aspects are which. The aspects are
6136 % automatically recognized, with some limited support for orbs and such, but
6137 % it's up to the user to do it manually if they want better control over
6138 % exactly which aspects will be shown.
6139 %
6140 % At this point in the code we no longer need to use exotic $\mathcal{Q}$
6141 % for parsing, and we're going to need regular Q for use in spelling things
6142 % like ``Quincunx,'' so we have to make Q mundane again. We drop
6143 % temporarily out of the |\ifhoro@wheels| conditional to do it so that
6144 % things will not be left in a screwed-up state in the event |nowheels| has
6145 % been selected.
6146 % \begin{macrocode}
6147 \fi
6148 %% MAKING Q MUNDANE HERE!
6149 \catcode`\Q=11
6150 \ifhoro@wheels
6151 % \end{macrocode}
6152 %
6153 % \subsubsection{Configuration settings}
6154 % \begin{macro}{\horoaspectobjectsa}
6155 % List of objects that can appear on one side of an aspect relation. By
6156 % default, all objects.
6157 % \begin{macrocode}
6158 \def\horoaspectobjectsa{\horoobjects}
6159 % \end{macrocode}
6160 % \end{macro}
6161 %
6162 % \begin{macro}{\horoaspectobjectsb}
6163 % List of objects that can appear on the other side of an aspect relation.
6164 % This is separated from |\horoaspectobjectsa| so that you can set one to
6165 % all objects and the other to only ``major'' objects, to prevent counting
6166 % aspects that involve only ``minor'' objects.
6167 % \begin{macrocode}
6168 \def\horoaspectobjectsb{\horoobjects}
6169 % \end{macrocode}
6170 % \end{macro}
6171 %
6172 % \begin{macro}{\horoaspects}
6173 % This lists the aspect types that will be recognized. Note conjunctions
6174 % are not normally listed because they don't need to be marked in the aspect
6175 % web, though if one wanted to add conjunction symbols on top of the ticks
6176 % to really flag conjunctions, then that would be possible.
6177 % \begin{macrocode}
6178 \def\horoaspects{Opposition,Trine,Square,Sextile}
6179 % \end{macrocode}
6180 % \end{macro}
6181 %
6182 % \begin{macro}{\ifhoroaspectweb}
6183 % Configuration flag for the ready-made wheels: whether they should or
6184 % shouldn't put an aspect web in the middle of the wheel.
6185 % \begin{macrocode}
6186 \newif\ifhoroaspectweb\horoaspectwebtrue
6187 % \end{macrocode}
6188 % \end{macro}
6189 %
6190 % \subsubsection{Per-aspect-type configuration}
6191 % First we state the angular separation that defines each aspect. Only
6192 % longitude aspects are supported; parallel/antiparallel aren't shown.
6193 % \begin{macrocode}
6194 \def\horoConjunctionAngle{0}
6195 \def\horoOppositionAngle{180}
6196 \def\horoTrineAngle{120}
6197 \def\horoSquareAngle{90}
6198 \def\horoQuintileAngle{72}
6199 \def\horoBiquintileAngle{144}
6200 \def\horoSextileAngle{60}
6201 \def\horoQuincunxAngle{150}
6202 \def\horoSemisextileAngle{30}
6203 \def\horoSemisquareAngle{45}
6204 \def\horoSesquiquadrateAngle{135}
6205 % \end{macrocode}
6206 %
6207 % Then the orb for each aspect. This package supports only a very simple
6208 % model for orb, in which it's determined solely by the aspect type.
6209 % Advanced users can do clever things with redrawing a couple of aspect webs
6210 % for different objects, to get orbs depending on the objects involved or on
6211 % other variables.
6212 % \begin{macrocode}
6213 \def\horoConjunctionOrb{6}
6214 \def\horoOppositionOrb{6}
6215 \def\horoTrineOrb{5}
6216 \def\horoSquareOrb{5}
6217 \def\horoQuintileOrb{2}
6218 \def\horoBiquintileOrb{2}
6219 \def\horoSextileOrb{4}
6220 \def\horoQuincunxOrb{3}
6221 \def\horoSemisextileOrb{3}
6222 \def\horoSemisquareOrb{2}
6223 \def\horoSesquiquadrateOrb{2}
6224 % \end{macrocode}
6225 %
6226 % \subsubsection{Drawing the aspect web}
6227 % \begin{macro}{\horoputaspect}
6228 % Draw a single aspect. The arguments are \#1 radius of the endpoints, \#2
6229 % and \#3 the $\theta$ coordinates of the endpoints, and \#4 the symbol to
6230 % display at the midpoint of the aspect. Implementation starts by opening a
6231 % group and saving the arguments to macros.
6232 % \begin{macrocode}
6233 % radius theta1 theta2 symbol
6234 \def\horoputaspect#1#2#3#4{%
6235 \begingroup
6236 \edef\p@one{#1}\edef\p@two{#2}\edef\p@three{#3}%
6237 % \end{macrocode}
6238 %
6239 % Apply chart rotation to both $\theta$ coordinates:
6240 % \begin{macrocode}
6241 \dimen@=\p@two\p@\relax\horo@chartrotate\edef\p@two{\TG@rem@pt\dimen@}%
6242 \dimen@=\p@three\p@\relax\horo@chartrotate\edef\p@three{\TG@rem@pt\dimen@}%
6243 % \end{macrocode}
6244 %
6245 % Convert endpoints to polar and draw the line segment representing the
6246 % aspect:
6247 % \changes{v0.92}{2013/05/15}{Replace \cs{drawline} with \cs{Line}}
6248 % \begin{macrocode}
6249 \horo@polarconvert\p@one\p@two\horo@dim@xa\horo@dim@ya
6250 \horo@polarconvert\p@one\p@three\horo@dim@xb\horo@dim@yb
6251 \Line(\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya)%
6252 (\TG@rem@pt\horo@dim@xb,\TG@rem@pt\horo@dim@yb)%
6253 % \end{macrocode}
6254 %
6255 % Compute the midpoint by doing an average on the Cartesian coordinates:
6256 % \begin{macrocode}
6257 \advance\horo@dim@xa by\horo@dim@xb
6258 \advance\horo@dim@ya by\horo@dim@yb
6259 \divide\horo@dim@xa by2\divide\horo@dim@ya by2%
6260 % \end{macrocode}
6261 %
6262 % Put the symbol at the midpoint and end.
6263 % \begin{macrocode}
6264 \put(\TG@rem@pt\horo@dim@xa,\TG@rem@pt\horo@dim@ya){\makebox(0,0){#4}}%
6265 \endgroup
6266 }
6267 % \end{macrocode}
6268 % \end{macro}
6269 %
6270 % \begin{macro}{\horo@aa}
6271 % \changes{v0.91}{2008/08/30}{Fixed only-checking-one-direction bug}
6272 % Helper for more automated aspect drawing: this checks whether there is an
6273 % aspect (with angular separation of $\#1\pm\#2$) between objects \#5 and
6274 % \#6, and if so, draws an aspect between them with endpoint radius \#3 and
6275 % symbol \#4. The two object names come last because this is meant to be
6276 % used in a |\horo@dblforeach|.
6277 % \begin{macrocode}
6278 \def\horo@aa#1#2#3#4#5#6{%
6279 \dimen@\csname horo#5Pos\endcsname\p@
6280 \advance\dimen@ by -\csname horo#6Pos\endcsname\p@
6281 \horo@fixdimen@diff
6282 \ifdim\dimen@<\z@\relax\multiply\dimen@ by -1\relax\fi
6283 \advance\dimen@ by -#1\p@
6284 \horo@fixdimen@diff
6285 \ifdim\dimen@<\z@\relax\multiply\dimen@ by -1\relax\fi
6286 \ifdim\dimen@<#2\p@\relax
6287 \horoputaspect{#3}{\csname horo#5Pos\endcsname}%
6288 {\csname horo#6Pos\endcsname}{#4}%
6289 \fi
6290 }
6291 % \end{macrocode}
6292 % \end{macro}
6293 %
6294 % \begin{macro}{\horoautoaspect}
6295 % Wrapper for |\horo@aa|: runs the |\horo@dblforeach| inside a group. This
6296 % does all the checking and drawing for one aspect type.
6297 % \begin{macrocode}
6298 \def\horoautoaspect#1#2#3#4#5#6{%
6299 \begingroup
6300 \horo@dblforeach{#1}{#2}{\horo@aa{#3}{#4}{#5}{#6}}%
6301 \endgroup
6302 }
6303 % \end{macrocode}
6304 % \end{macro}
6305 %
6306 % \begin{macro}{\horo@aas}
6307 % Helper for |\horoautoaspects|: calls |\horoautoaspect| to do one aspect
6308 % type, using configured settings. Argument \#1 is radius and \#2 is the
6309 % aspect type name. Note that this does every pair of one object from
6310 % |\horoaspectobjectsa| and one from |\horoaspectobjectsb|, which will quite
6311 % possibly hit a given pair twice, once in each direction
6312 % (e.g.\ Sun/Moon and Moon/Sun) Normally that will not be a problem; it
6313 % only means typesetting an identical aspect twice, one on top of the other.
6314 % \begin{macrocode}
6315 \def\horo@aas#1#2{%
6316 \horoautoaspect{\horoaspectobjectsa}{\horoaspectobjectsb}%
6317 {\csname horo#2Angle\endcsname}{\csname horo#2Orb\endcsname}%
6318 {#1}{\csname horo#2Symbol\endcsname}%
6319 }
6320 % \end{macrocode}
6321 % \end{macro}
6322 %
6323 % \begin{macro}{\horoautoaspects}
6324 % Do the entire aspect web by iterating over all configured aspect type
6325 % names. Most configuration settings come in through defined macros; the
6326 % sole argument is the radius.
6327 % \begin{macrocode}
6328 \def\horoautoaspects#1{%
6329 \horoforeach{\horoaspects}{\horo@aas{#1}}%
6330 }
6331 % \end{macrocode}
6332 % \end{macro}
6333 %
6334 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6335 %
6336 % \subsection{Internal House Labels}
6337 %
6338 % These support adding labels to the middles of houses. The labels are
6339 % treated (for the purposes of the adjustment code) as objects that take up
6340 % space in the house, so they make it much more likely for a house to end up
6341 % overfilled and having to expand. However, they also make it easier
6342 % to identify houses at a glance.
6343 %
6344 % Much of the support for these is actually incorporated into the
6345 % ``adjustment'' code below. At this point we only define configuration
6346 % data and the routines to actually print the labels.
6347 %
6348 % \begin{macro}{\ifhorointhouselabels}
6349 % Define an |\if| for controlling whether to use this feature.
6350 % \begin{macrocode}
6351 \newif\ifhorointhouselabels\horointhouselabelsfalse
6352 % \end{macrocode}
6353 % \end{macro}
6354 %
6355 % Allocate a \LaTeX\ counter for which house we're in.
6356 % \begin{macrocode}
6357 \newcounter{horohouse}
6358 % \end{macrocode}
6359 %
6360 % \begin{macro}{\horohouselabel}
6361 % The default form of a label is the counter value in upper-case Roman, but
6362 % this can be redefined if the user wants something else.
6363 % \begin{macrocode}
6364 \newcommand{\horohouselabel}{%
6365 \Roman{horohouse}%
6366 }
6367 % \end{macrocode}
6368 % \end{macro}
6369 %
6370 % \begin{macro}{\horo@houses}
6371 % List of the pseudo-objects used for internal house labels. This is the
6372 % only tricky bit in this section of code: the internal house labels are
6373 % treated as objects with names like ``CuspIM.'' Then we have macros with
6374 % names including strings like ``CuspIMPos,'' and that can be treated as
6375 % either the Pos of CuspIM, or the MPos of CuspI. Exploiting that ambiguity
6376 % allows for simpler use of the existing variable-copying code to do some
6377 % useful things with label positions.
6378 % \begin{macrocode}
6379 \def\horo@houses{CuspIM,CuspIIM,CuspIIIM,CuspIVM,CuspVM,CuspVIM,%
6380 CuspVIIM,CuspVIIIM,CuspIXM,CuspXM,CuspXIM,CuspXIIM}
6381 % \end{macrocode}
6382 % \end{macro}
6383 %
6384 % \begin{macro}{\horo@findcuspmid}
6385 % Finds the midpoint of a house, given (as arguments) the names of the
6386 % house's cusp and of the next house's cusp. Looks at the DPos of those two
6387 % cusps, puts the result into the MPos for the house (see above about the
6388 % Pos/MPos trick).
6389 % \begin{macrocode}
6390 \def\horo@findcuspmid#1#2{%
6391 \horo@midpoint{\csname horoCusp#1DPos\endcsname}%
6392 {\csname horoCusp#2DPos\endcsname}%
6393 \expandafter\edef\csname horoCusp#1MPos\endcsname{\TG@rem@pt\dimen@}%
6394 }
6395 % \end{macrocode}
6396 % \end{macro}
6397 %
6398 % \begin{macro}{\horo@findcuspmids}
6399 % Repeat |\horo@findcuspmid| for all twelve houses. This is done explicitly
6400 % because of the wrap-around between XII and I, which makes it non-trivial
6401 % to write a nice looping structure to do it.
6402 % \begin{macrocode}
6403 \def\horo@findcuspmids{%
6404 \horo@findcuspmid{I}{II}\horo@findcuspmid{II}{III}%
6405 \horo@findcuspmid{III}{IV}\horo@findcuspmid{IV}{V}%
6406 \horo@findcuspmid{V}{VI}\horo@findcuspmid{VI}{VII}%
6407 \horo@findcuspmid{VII}{VIII}\horo@findcuspmid{VIII}{IX}%
6408 \horo@findcuspmid{IX}{X}\horo@findcuspmid{X}{XI}%
6409 \horo@findcuspmid{XI}{XII}\horo@findcuspmid{XII}{I}%
6410 }
6411 % \end{macrocode}
6412 % \end{macro}
6413 %
6414 % \begin{macro}{\horo@pihl}
6415 % Prints an internal house label given the radius at which to print as \#1
6416 % and the name of the midpoint (like CuspIM) as \#2. Also steps the
6417 % |horohouse| counter, which is probably being used to decide how the labels
6418 % look.
6419 % \begin{macrocode}
6420 \def\horo@pihl#1#2{%
6421 \begingroup
6422 \horo@getobjdpos{#2}%
6423 \horo@putpolar{#1}{\TG@rem@pt\dimen@}{\horohouselabel}%
6424 \stepcounter{horohouse}%
6425 \endgroup
6426 }
6427 % \end{macrocode}
6428 % \end{macro}
6429 %
6430 % \begin{macro}{\horoputinthouselabels}
6431 % Typesets a complete ring of twelve house labels. The sole argument is the
6432 % radius at which to put them.
6433 % \begin{macrocode}
6434 \def\horoputinthouselabels#1{%
6435 \setcounter{horohouse}{1}%
6436 \horoforeach{\horo@houses}{\horo@pihl{#1}}%
6437 }
6438 % \end{macrocode}
6439 % \end{macro}
6440 %
6441 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6442 %
6443 % \subsection{Object and Cusp Adjustment}
6444 %
6445 % These macros implement a full-featured system for adjusting the location
6446 % of objects on the chart to prevent them from interfering with each other.
6447 % The basic concept involves two variables on each object and cusp: Pos and
6448 % DPos. Pos represents the true position of the object in the sky, normally
6449 % its longitude. That is also in some sense the ``preferred'' position for
6450 % the object or cusp on the chart. However, if necessary to avoid
6451 % interference, the object or cusp can be shifted to a new location. DPos
6452 % is the position where it will actually be displayed.
6453 %
6454 % Adjustment is done by an iterative spring-tensioning algorithm.
6455 % Everything starts out with DPos equal to Pos. Then in successive loops,
6456 % we examine whether any rules (such as ``no two objects within so many
6457 % degrees of each other'') are broken, and if so we shift things in such a
6458 % way as to reduce the rule violations. Things that are too close to each
6459 % other are mutually repelled away from each other. Things that are not in
6460 % their preferred locations are attracted towards their preferred locations.
6461 %
6462 % There are limits on how much these forces can affect the location of an
6463 % object, to prevent the system from running away or oscillating. We hope
6464 % (without formal proof, but it seems to be true in practice and in
6465 % principle it could probably be proved formally) that in successive
6466 % iterations the adjustments will get smaller and smaller until the system
6467 % settles down into a reasonably good solution. There are a few tricks
6468 % implemented to encourage that. If two successive iterations give results
6469 % that are almost the same (to the point that the difference would not be
6470 % visible to the viewer) then we figure it has converged and stop the loop.
6471 % There is also a limit on the absolute number of iterations that will be
6472 % allowed, in case it does run away.
6473 %
6474 % Ideally we would have a solution that doesn't involve moving any cusps,
6475 % because moved cusps end up having unappealing ``jogs'' when rendered.
6476 % That may or may not be possible. The system will first attempt a solution
6477 % without moving any cusps, but if it converges with no cusp movement and
6478 % the result isn't good enough, then it will unlock the cusps and continue
6479 % iterating.
6480 %
6481 % \subsubsection{Configuration settings}
6482 % \begin{macro}{\horosignificantadj}
6483 % Number of degrees of adjustment that will be considered ``significant''
6484 % and cause another iteration. This should be small enough that it won't be
6485 % visible in the output.
6486 % \begin{macrocode}
6487 \def\horosignificantadj{0.1}
6488 % \end{macrocode}
6489 % \end{macro}
6490 %
6491 % \begin{macro}{\horocuspadjusttrigger}
6492 % This represents the percentage of the normal ``minimum'' distance between
6493 % objects and objects, or objects and cusps, below which houses will be
6494 % considered too cramped. If the converged solution without moving cusps
6495 % results in any distances becoming shorter than this percentage, which will
6496 % normally imply all the distances in that house are similarly cramped, then
6497 % cusp adjustment will be triggered.
6498 % \begin{macrocode}
6499 \def\horocuspadjusttrigger{65}
6500 % \end{macrocode}
6501 % \end{macro}
6502 %
6503 % \begin{macro}{\horoadjcycles}
6504 % Maximum number of cycles (total) to permit. If convergence is not
6505 % detected after this many, then it'll just go ahead with the result of
6506 % the last one. The default of 30 is generous.
6507 % \begin{macrocode}
6508 \def\horoadjcycles{30}
6509 % \end{macrocode}
6510 % \end{macro}
6511 %
6512 % \begin{macro}{\horoposattobj}
6513 % Strength of attraction between an object and its desired Pos value. This
6514 % is given as a divisor, so the default of 20 means that the adjustment to
6515 % bring an object towards its Pos will be equal to $1/20$ of the amount by
6516 % which it's currently displaced from there.
6517 % \begin{macrocode}
6518 \def\horoposattobj{20}
6519 % \end{macrocode}
6520 % \end{macro}
6521 %
6522 % \begin{macro}{\horoposattcusp}
6523 % Strength of attraction between a cusp and its desired Pos value. The
6524 % default of 7 means cusps are attracted to their Pos locations about three
6525 % times as much as objects; but note that that's if we allow cusps to move
6526 % at all, which only happens if we're forced into it.
6527 % \begin{macrocode}
6528 \def\horoposattcusp{7}
6529 % \end{macrocode}
6530 % \end{macro}
6531 %
6532 % \begin{macro}{\hororepulsion}
6533 % Basic divisor for repulsion between all pairs of things that are repelled
6534 % from each other.
6535 % \begin{macrocode}
6536 \def\hororepulsion{3}
6537 % \end{macrocode}
6538 % \end{macro}
6539 %
6540 % \begin{macro}{\horomaxrepulsion}
6541 % Interference distance (in degrees) at which maximum repulsion is achieved.
6542 % If two objects interfere by more than this amount, they will be repelled
6543 % only as much as if they interfered this much.\footnote{Don't try this at
6544 % home, kids. Sharp cutoffs like this one tend to introduce nonlinearity into
6545 % the underlying system of partial differential equations, which in turn
6546 % tends to create catastrophic instability. The famous Tacoma Narrows
6547 % Bridge disaster is blamed on a similar effect: due to nonlinearity in the
6548 % actual behaviour of the system, the linear analysis performed by the
6549 % designers of the bridge was woefully inaccurate. The decision to use
6550 % sharp cutoffs in the particular case of \textsf{horoscop}'s object
6551 % adjustment system is supported by very careful testing, the fact that the
6552 % discontinuities are only in the second and higher derivatives,
6553 % and the basic harmlessness of the situation: in the worst imaginable
6554 % failure mode you'd just get a visually unappealing astrological chart.
6555 % It should
6556 % not be taken as an endorsement of sharp-cutoff designs in general.} The
6557 % case this is intended to cover is the one where an object somehow happens
6558 % to be completely on the other side of the chart from where it should be,
6559 % and out of order with everything else. If repulsion were unlimited, then
6560 % everything would be kicked around to the point of creating many more
6561 % constraint violations and the whole thing would take many iterations to
6562 % resolve itself. Limiting repulsion per pair of objects gives more chance
6563 % to resolve such situations reasonably.
6564 % \begin{macrocode}
6565 \def\horomaxrepulsion{5.0}
6566 % \end{macrocode}
6567 % \end{macro}
6568 %
6569 % \begin{macro}{\horooomindist}
6570 % Object/object minimum distance. If objects are more than this distance
6571 % apart (and in the correct sequence with each other) then they will not
6572 % repel. When they're closer, including being on the wrong side of each
6573 % other, then repulsion increases linearly with the amount of interference
6574 % up to the maximum set by the previous macro. Note that this one is for
6575 % \emph{object/object} relationships only.
6576 % \begin{macrocode}
6577 \def\horooomindist{6.0}
6578 % \end{macrocode}
6579 % \end{macro}
6580 %
6581 % \begin{macro}{\horoocmindist}
6582 % Object/cusp minimum distance.
6583 % \begin{macrocode}
6584 \def\horoocmindist{4.0}
6585 % \end{macrocode}
6586 % \end{macro}
6587 %
6588 % \subsubsection{Internal variables}
6589 % These are used to keep track of where we are in the iteration and whether
6590 % we want to continue. Note dropping temporarily out of
6591 % |\ifhoro@wheels| because doing |\newif| in a conditional context causes
6592 % parsing problems.
6593 % \begin{macrocode}
6594 \fi
6595 \newif\ifhoro@djusted\relax
6596 \newif\ifhoro@djustcusps\relax
6597 \ifhoro@wheels
6598 \countdef\horo@i=1\relax
6599 % \end{macrocode}
6600 %
6601 % \subsubsection{Support macros for adjustment iterations}
6602 % These do low-level tasks needed within a single cycle of adjusting objects or
6603 % cusps.
6604 %
6605 % \begin{macro}{\horo@findpdiff}
6606 % Find the distance in Pos between two objects or cusps named by the
6607 % arguments. Note we can also get the distance in DPos by tacking a D onto
6608 % the end of an object name. Result goes into |\dimen@|.
6609 % \begin{macrocode}
6610 \def\horo@findpdiff#1#2{%
6611 \dimen@=\csname horo#1Pos\endcsname\p@
6612 \multiply\dimen@ by -1\relax
6613 \advance\dimen@ by\csname horo#2Pos\endcsname\p@
6614 \horo@fixdimen@diff
6615 }
6616 % \end{macrocode}
6617 % \end{macro}
6618 %
6619 % \begin{macro}{\horo@pplycorrection}
6620 % Apply a correction (which should be in |\dimen@|) to the DPos of the
6621 % specified object or cusp.
6622 % \begin{macrocode}
6623 \def\horo@pplycorrection#1{%
6624 \advance\dimen@ by \csname horo#1DPos\endcsname\p@
6625 \horo@fixdimen@
6626 \expandafter\edef\csname horo#1DPos\endcsname{\TG@rem@pt\dimen@}%
6627 }
6628 % \end{macrocode}
6629 % \end{macro}
6630 %
6631 % \begin{macro}{\horo@djo@}
6632 % Adjust an object or cusp against another. Arguments are \#1 the minimum
6633 % distance, \#2 the thing to adjust, and \#3 the thing to adjust it against.
6634 % Implementation starts by finding, and saving, the distance in Pos between
6635 % the two objects or cusps, which gives us a sanity check on whether they
6636 % should affect each other at all, and tells us on which side of each other
6637 % they should appear.
6638 % \begin{macrocode}
6639 \def\horo@djo@#1#2#3{%
6640 \horo@findpdiff{#3}{#2}%
6641 \horo@dim@x=\dimen@
6642 % \end{macrocode}
6643 %
6644 % If the distance in Pos is more than 45\horodegrees\ in either direction,
6645 % then we skip the rest of this. That prevents some bad nonconverging cases
6646 % if objects happen to get into very bad locations on the wrong side of the
6647 % chart; they'll only interact with the objects that they want to be near.
6648 % \begin{macrocode}
6649 \ifdim\horo@dim@x<45\p@\relax
6650 \ifdim\horo@dim@x>-45\p@\relax
6651 % \end{macrocode}
6652 %
6653 % Now find the difference in \emph{display} positions as opposed to sky
6654 % positions, and flip its sign depending on the saved Pos difference. The
6655 % result in |\dimen@| is a number that tells us how far apart the objects
6656 % are in the direction they're supposed to be, so it is negative if they are
6657 % on the wrong side of each other.
6658 % \begin{macrocode}
6659 \horo@findpdiff{#3D}{#2D}%
6660 \ifdim\horo@dim@x<\z@\multiply\dimen@ by -1\relax\fi
6661 % \end{macrocode}
6662 %
6663 % Subtract out the minimum distance. The result is positive if the objects
6664 % are on the correct side and separated by more than the minimum
6665 % distance---in which case we set the adjustment to zero. Otherwise it's a
6666 % negative number saying how far they are interfering. We hard-limit it by
6667 % |\horomaxrepulsion| on the other side, and then divide by
6668 % |\hororepulsion| to get the adjustment for the current cycle.
6669 % \begin{macrocode}
6670 \advance\dimen@ by -#1\p@
6671 \ifdim\dimen@>\z@
6672 \dimen@=\z@
6673 \else
6674 \ifdim\dimen@<-\horomaxrepulsion\p@\relax
6675 \dimen@=-\horomaxrepulsion\p@%
6676 \fi
6677 \divide\dimen@ by\hororepulsion\relax
6678 \fi
6679 % \end{macrocode}
6680 %
6681 % If we flipped the sign earlier, flip it back. Then |\dimen@| will contain
6682 % the actual adjustment to apply to |\horo|\meta{\#2}|\DPos|.
6683 % \begin{macrocode}
6684 \ifdim\horo@dim@x>\z@\multiply\dimen@ by -1\relax\fi
6685 % \end{macrocode}
6686 %
6687 % Apply the correction and end.
6688 % \begin{macrocode}
6689 \horo@pplycorrection{#2}%
6690 \fi
6691 \fi
6692 }
6693 % \end{macrocode}
6694 % \end{macro}
6695 %
6696 % \begin{macro}{\horo@djoo}
6697 % Adjust an object against an object. This is just the small amount of
6698 % additional intelligence needed on top of |\horo@djo@| to handle objects
6699 % versus objects. We check the arguments to make sure we aren't adjusting
6700 % the same object against itself, because that is handled separately later.
6701 % Also, the value of |\horooomindist| is picked up and passed into
6702 % |\horo@djo@|.
6703 % \begin{macrocode}
6704 \def\horo@djoo#1#2{%
6705 \edef\horo@tmpa{#1}\edef\horo@tmpb{#2}%
6706 \ifx\horo@tmpa\horo@tmpb\else
6707 \horo@djo@{\horooomindist}{#1}{#2}%
6708 \fi
6709 }
6710 % \end{macrocode}
6711 % \end{macro}
6712 %
6713 % \begin{macro}{\horo@djoo@same}
6714 % The special case of object or cusp against itself: we find the difference
6715 % between its Pos and DPos, divide that by \#1 (which should be the spring
6716 % divisor, different for objects or cusps), and apply the result as a
6717 % correction.
6718 % \begin{macrocode}
6719 \def\horo@djoo@same#1#2{%
6720 \horo@findpdiff{#2D}{#2}%
6721 \divide\dimen@ by#1\relax
6722 \horo@pplycorrection{#2}%
6723 }
6724 % \end{macrocode}
6725 % \end{macro}
6726 %
6727 % \begin{macro}{\horo@djcheckmovement}
6728 % Check for whether an object or cusp has moved significantly in the current
6729 % cycle. That is, if DPos differs from SPos (which was set to DPos before
6730 % the current cycle) by more than |\horosignificantadj|, then set
6731 % |\horo@djustedtrue|.
6732 % \begin{macrocode}
6733 \def\horo@djcheckmovement#1{%
6734 \horo@findpdiff{#1D}{#1S}%
6735 \ifdim\dimen@<0\p@\relax\multiply\dimen@ by -1\relax\fi
6736 \ifdim\dimen@>\horosignificantadj\p@\relax\horo@djustedtrue\fi
6737 }
6738 % \end{macrocode}
6739 % \end{macro}
6740 %
6741 % \subsubsection{Single adjustment cycles}
6742 % These each do one complete cycle of adjusting objects or objects and
6743 % cusps. There are two versions because including cusps or not makes a big
6744 % enough difference to warrant a separate implementation.
6745 %
6746 % \begin{macro}{\horo@djobjcycle}
6747 % One cycle of adjusting objects against each other and against cusps.
6748 % Start by showing the user the current cycle number as a progress
6749 % indicator, and setting the |\ifhoro@djusted| flag to false because we
6750 % haven't moved anything yet this cycle.
6751 % \begin{macrocode}
6752 \def\horo@djobjcycle{%
6753 \message{\the\horo@i}%
6754 \horo@djustedfalse
6755 % \end{macrocode}
6756 %
6757 % Copy all the current DPos values to a new variable called SPos (``saved
6758 % position'') so we'll be able to check whether anything has moved.
6759 % \begin{macrocode}
6760 \horocopyvar{\horoobjects}{DPos}{SPos}%
6761 % \end{macrocode}
6762 %
6763 % Adjust objects against objects.
6764 % \begin{macrocode}
6765 \horo@dblforeach{\horoobjects}{\horoobjects}{\horo@djoo}%
6766 % \end{macrocode}
6767 %
6768 % Adjust objects against cusps. This is one-sided: objects move to
6769 % accomodate cusps, but cusps do not move to accomodate objects. Since (we
6770 % assume) nothing is both an object and a cusp, we can call the low-level
6771 % |\horo@djo@| directly instead of needing a wrapper like |\horo@adjoo|.
6772 % \begin{macrocode}
6773 \horo@dblforeach{\horoobjects}{\horocusps}{\horo@djo@{\horoocmindist}}%
6774 % \end{macrocode}
6775 %
6776 % Adjust each object against itself; that is, handle its attraction to Pos,
6777 % its ``correct'' location in the sky.
6778 % \begin{macrocode}
6779 \horoforeach{\horoobjects}{\horo@djoo@same{\horoposattobj}}%
6780 % \end{macrocode}
6781 %
6782 % Check for movement. This turns on the |\ifhoro@djusted| flag if the net
6783 % result of the current cycle has been to move anything a ``significant''
6784 % amount from the position we saved in SPos.
6785 % \begin{macrocode}
6786 \horoforeach{\horoobjects}{\horo@djcheckmovement}%
6787 % \end{macrocode}
6788 %
6789 % If the flag has remained false, then we have convergence, and can blow out
6790 % of the loop by setting the counter to its terminating value.
6791 % \begin{macrocode}
6792 \ifhoro@djusted\else\horo@i=\horoadjcycles\relax\fi
6793 % \end{macrocode}
6794 %
6795 % Loop test. If we aren't on the last loop (which could have happened
6796 % either naturally or because of the exception in the last line), then
6797 % advance the loop counter and schedule another tail-recursive iteration.
6798 % \begin{macrocode}
6799 \ifnum\horoadjcycles>\horo@i\relax
6800 \advance\horo@i by1\relax
6801 \expandafter\horo@djobjcycle
6802 \fi
6803 }
6804 % \end{macrocode}
6805 % \end{macro}
6806 %
6807 % \begin{macro}{\horo@djcuspcycle}
6808 % Adjust all objects and cusps against each other. As in
6809 % |\horo@djobjcycle|, we start by displaying the iteration number, setting
6810 % the |\ifhoro@djusted| flag false, and saving all DPos values to SPos.
6811 % \begin{macrocode}
6812 \def\horo@djcuspcycle{%
6813 \message{\the\horo@i}%
6814 \horo@djustedfalse
6815 \horocopyvar{\horoobjects,\horocusps}{DPos}{SPos}%
6816 % \end{macrocode}
6817 %
6818 % Do the adjustments. We use |\horo@djo@| for adjusting cusps against
6819 % objects and objects against cusps because nothing appears on both lists.
6820 % For cusps against cusps and objects against objects we use |\horo@djoo|
6821 % because it has the added handling for not adjusting anything against
6822 % itself.
6823 % \begin{macrocode}
6824 \horo@dblforeach{\horocusps}{\horoobjects}{\horo@djo@{\horoocmindist}}%
6825 \horo@dblforeach{\horocusps}{\horocusps}{\horo@djoo}%
6826 \horo@dblforeach{\horoobjects}{\horoobjects}{\horo@djoo}%
6827 \horo@dblforeach{\horoobjects}{\horocusps}{\horo@djo@{\horoocmindist}}%
6828 % \end{macrocode}
6829 %
6830 % Adjust objects and cusps towards their desired positions (Pos values).
6831 % Note that the logic is the same but the divisor passed in is
6832 % |\horoposattobj| or |\horoposattcusp| depending on whether we are
6833 % considering objects or cusps.
6834 % \begin{macrocode}
6835 \horoforeach{\horoobjects}{\horo@djoo@same{\horoposattobj}}%
6836 \horoforeach{\horocusps}{\horo@djoo@same{\horoposattcusp}}%
6837 % \end{macrocode}
6838 %
6839 % Check for movement and handle the tail-recursive loop, just like in
6840 % |\horo@dj|-|objcycle| except that we examine cusps as well as objects.
6841 % \begin{macrocode}
6842 \horoforeach{\horoobjects,\horocusps}{\horo@djcheckmovement}%
6843 \ifhoro@djusted\else\horo@i=\horoadjcycles\relax\fi
6844 \ifnum\horoadjcycles>\horo@i\relax
6845 \advance\horo@i by1\relax
6846 \expandafter\horo@djcuspcycle
6847 \fi
6848 }
6849 % \end{macrocode}
6850 % \end{macro}
6851 %
6852 % \subsubsection{Support macros for main loop}
6853 % \begin{macro}{\horo@djsavedpos}
6854 % Use |\horo@fterdef| to pass the DPos of
6855 % an object or cusp outside the prophylactic group.
6856 % \begin{macrocode}
6857 \def\horo@djsavedpos#1{%
6858 \expandafter\horo@fterdef\csname horo#1DPos\endcsname
6859 }
6860 % \end{macrocode}
6861 % \end{macro}
6862 %
6863 % \begin{macro}{\horo@djcheckcusps}
6864 % This checks a pair of objects or cusps for excessive stress, to determine,
6865 % after we have a converged solution with only objects moving, whether we
6866 % need to try moving cusps too. It makes sure not to compare something
6867 % against itself, finds the absolute value of the distance in degrees
6868 % between the two things, and checks whether that is less than
6869 % |\horocuspadjusttrigger| percentage of the minimum distance which was
6870 % passed in through \#1. If so, there's too much stress, and the
6871 % |\ifhoro@djustcusps| flag gets turned on.
6872 % \begin{macrocode}
6873 \def\horo@djcheckcusps#1#2#3{%
6874 \edef\horo@tmpa{#2}\edef\horo@tmpb{#3}%
6875 \ifx\horo@tmpa\horo@tmpb
6876 \else
6877 \horo@findpdiff{#2D}{#3D}%
6878 \ifdim\dimen@<\z@\multiply\dimen@ by-1\relax\fi
6879 \ifdim\dimen@<45\p@\relax
6880 \multiply\dimen@ by 100\relax
6881 \divide\dimen@ by \horocuspadjusttrigger\relax
6882 \ifdim\dimen@<#1\p@\relax\horo@djustcuspstrue\fi
6883 \fi
6884 \fi
6885 }
6886 % \end{macrocode}
6887 % \end{macro}
6888 %
6889 % \subsubsection{Main loop}
6890 % \begin{macro}{\horoadjust}
6891 % This is the user-callable adjustment macro that does the whole task of
6892 % adjusting objects and possibly cusps to make them look good. The whole
6893 % works is conditional on the |\ifhorocalculated| flag; if there's no good
6894 % data in the initial Pos and DPos values, then the adjustment may not
6895 % converge and will be wasted effort in any case. An earlier version
6896 % actually used multiple passes to do the external program calls (much like
6897 % the way \BibTeX\ works), so |\horocalculatedfalse| was guaranteed to occur
6898 % on the first pass; now, assuming |\write18| support in the interpreter,
6899 % it's less probable, but still needs to be caught because people
6900 % \emph{will} attempt to run without the required |\write18| support.
6901 % \begin{macrocode}
6902 \def\horoadjust{%
6903 \ifhorocalculated
6904 % \end{macrocode}
6905 %
6906 % Support for internal house labels: if they're turned on, then find the
6907 % house midpoints and add them as objects to |\horoobjects|, saving its old
6908 % value to be later restored.
6909 % \begin{macrocode}
6910 \ifhorointhouselabels
6911 \horo@findcuspmids
6912 \horocopyvar{\horocusps}{MPos}{MDPos}%
6913 \let\horo@savedobjlist\horoobjects
6914 \edef\horoobjects{\horoobjects,\horo@houses}%
6915 \fi
6916 % \end{macrocode}
6917 %
6918 % Get ready to run the loop. Prints an opening parenthesis as a message to
6919 % the user, to give some progress indication, and sets the loop counter to 1.
6920 % A session of |\horoadjust|
6921 % will give a message something like ``( 1 2 3 4 5 6 7 C 1 2 3 )'' showing
6922 % each cycle through the loop, and the decision to adjust cusps. That way
6923 % (since this requires a fair bit of processing) the user won't be left
6924 % hanging, wondering what \TeX\ is doing.
6925 % \begin{macrocode}
6926 \begingroup
6927 \message{(}%
6928 \horo@i=1\relax
6929 % \end{macrocode}
6930 %
6931 % Do the actual adjustment cycles for objects only.
6932 % \begin{macrocode}
6933 \horo@djobjcycle
6934 % \end{macrocode}
6935 %
6936 % Now to decide whether we need to adjust cusps as well. Start by setting
6937 % the flag false. Then check objects against objects, and objects against
6938 % cusps, for excessive stress. If we find any, then cusp adjustment will be
6939 % triggered. This assumes that cusps against cusps will
6940 % never be an issue, but that's probably reasonable: cusps only fall right
6941 % on top of each other when the house system is misbehaving (e.g. Placidus
6942 % at high latitudes), and even then it will only be a visual problem if
6943 % there are objects trapped in the resulting tiny houses, because the cusps
6944 % themselves take up negligible angular space.
6945 % \begin{macrocode}
6946 \horo@djustcuspsfalse
6947 \horo@dblforeach{\horoobjects}{\horoobjects}%
6948 {\horo@djcheckcusps{\horooomindist}}%
6949 \horo@dblforeach{\horoobjects}{\horocusps}%
6950 {\horo@djcheckcusps{\horoocmindist}}%
6951 % \end{macrocode}
6952 %
6953 % If we do want to adjust cusps: give the user a ``C'' to let them know,
6954 % then set the loop counter back to 1 and do the cusp adjustment cycle.
6955 % \begin{macrocode}
6956 \ifhoro@djustcusps
6957 \message{C}%
6958 \horo@i=1\relax
6959 \horo@djcuspcycle
6960 \fi
6961 % \end{macrocode}
6962 %
6963 % At this point everything is converged, or as close as we were able to get.
6964 % Print a terminating parenthesis for the user message and pass all the DPos
6965 % values we calculated out of the prophylactic group.
6966 % \begin{macrocode}
6967 \message{)}%
6968 \horoforeach{\horocusps,\horoobjects}{\horo@djsavedpos}%
6969 \endgroup
6970 % \end{macrocode}
6971 %
6972 % Finally, restore the |\horoobjects| list if we tampered with it earlier.
6973 % \begin{macrocode}
6974 \ifhorointhouselabels\let\horoobjects\horo@savedobjlist\fi
6975 \fi
6976 }
6977 % \end{macrocode}
6978 % \end{macro}
6979 %
6980 % At this point we end the |\ifhoro@wheels| conditional.
6981 % \begin{macrocode}
6982 \fi
6983 % \end{macrocode}
6984 %
6985 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6986 %
6987 % \subsection{Support Macros for Ready-Made Wheels}
6988 %
6989 % These provide some low-level operations specific to the ready-made
6990 % wheel templates.
6991 %
6992 % At this point we open a conditional so that users can
6993 % turn off this support if they won't be using it.
6994 % \begin{macrocode}
6995 \ifhoro@templates
6996 % \end{macrocode}
6997 %
6998 % \subsubsection{Recognizing houses}
6999 % Some of the templates treat objects differently depending on in which house,
7000 % or which kind of house, the objects are located. These macros are all
7001 % designed to be called in the conditional part of an |\if|; they start out
7002 % by expanding |TT| (which the |\if| recognizes as unconditional true), then
7003 % open a new |\if| that does the actual conditioning.
7004 %
7005 % \begin{macro}{\horo@isclockwise}
7006 % Conditional, true if \#1 is clockwise of \#2. Implementation finds the
7007 % difference in Pos, inside a group to prevent pollution, and checks its sign.
7008 % \begin{macrocode}
7009 \def\horo@isclockwise#1#2{%
7010 TT\fi
7011 \begingroup
7012 \horo@findpdiff{#1}{#2}%
7013 \edef\horo@data{\the\dimen@}%
7014 \horo@fterdef\horo@data
7015 \endgroup
7016 \ifdim\horo@data>\z@\relax
7017 }
7018 % \end{macrocode}
7019 % \end{macro}
7020 %
7021 % \begin{macro}{\horo@anghouse}
7022 % Conditional, true if \#1 is in an angular house; that is, I, IV, VII, or
7023 % X. Works by comparing the object's position against the two cusps
7024 % bounding the house, for each of the four angular houses.
7025 % \begin{macrocode}
7026 \def\horo@anghouse#1{%
7027 TT\fi
7028 \begingroup
7029 \def\horo@angh@{F}%
7030 \if\horo@isclockwise{CuspI}{#1}\if\horo@isclockwise{#1}{CuspII}%
7031 \def\horo@angh@{T}%
7032 \fi\fi
7033 \if\horo@isclockwise{CuspIV}{#1}\if\horo@isclockwise{#1}{CuspV}%
7034 \def\horo@angh@{T}%
7035 \fi\fi
7036 \if\horo@isclockwise{CuspVII}{#1}\if\horo@isclockwise{#1}{CuspVIII}%
7037 \def\horo@angh@{T}%
7038 \fi\fi
7039 \if\horo@isclockwise{CuspX}{#1}\if\horo@isclockwise{#1}{CuspXI}%
7040 \def\horo@angh@{T}%
7041 \fi\fi
7042 \horo@fterdef\horo@angh@
7043 \endgroup
7044 \if\horo@angh@ T\relax
7045 }
7046 % \end{macrocode}
7047 % \end{macro}
7048 %
7049 % \begin{macro}{\horo@succhouse}
7050 % Conditional, true if \#1 is in a succedent house; that is, II, V, VIII, or
7051 % XI. Implementation basically the same as |\horo@anghouse|.
7052 % \begin{macrocode}
7053 \def\horo@succhouse#1{%
7054 TT\fi
7055 \begingroup
7056 \def\horo@succh@{F}%
7057 \if\horo@isclockwise{CuspII}{#1}\if\horo@isclockwise{#1}{CuspIII}%
7058 \def\horo@succh@{T}%
7059 \fi\fi
7060 \if\horo@isclockwise{CuspV}{#1}\if\horo@isclockwise{#1}{CuspVI}%
7061 \def\horo@succh@{T}%
7062 \fi\fi
7063 \if\horo@isclockwise{CuspVIII}{#1}\if\horo@isclockwise{#1}{CuspIX}%
7064 \def\horo@succh@{T}%
7065 \fi\fi
7066 \if\horo@isclockwise{CuspXI}{#1}\if\horo@isclockwise{#1}{CuspXII}%
7067 \def\horo@succh@{T}%
7068 \fi\fi
7069 \horo@fterdef\horo@succh@
7070 \endgroup
7071 \if\horo@succh@ T\relax
7072 }
7073 % \end{macrocode}
7074 % \end{macro}
7075 %
7076 % \subsubsection{Support for Montreal template}
7077 % \begin{macro}{\horo@montrealcurve}
7078 % Draw one of the special curves that typify the Montreal chart template.
7079 % This goes from the midpoint of a succedent house, based on DPos of the
7080 % starting and ending cusps, to the Pos of an angular house's cusp. There
7081 % are a total of eight of them to be drawn. The inner and outer radii are
7082 % fixed at 15 and 45. The implementation just calls |\horo@midpoint| to
7083 % compute the inner end, and then |\horo@putcurve| to draw the curve. This
7084 % is not one of the nice special cases for |\horo@putcurve| (constant $r$ or
7085 % constant $\theta$) but the result looks good in context anyway.
7086 % \begin{macrocode}
7087 \def\horo@montrealcurve#1#2#3{%
7088 \horo@midpoint{\csname horoCusp#2DPos\endcsname}%
7089 {\csname horoCusp#3DPos\endcsname}%
7090 \horoputcurve{45}{\csname horoCusp#1Pos\endcsname}{15}{\TG@rem@pt\dimen@}%
7091 }
7092 % \end{macrocode}
7093 % \end{macro}
7094 %
7095 % \begin{macro}{\horo@putmontrealobj}
7096 % Typeset an object label for the Montreal template. Objects in succedent
7097 % houses get labels on a larger radius than those in angular or cadent
7098 % houses.
7099 % \begin{macrocode}
7100 \def\horo@putmontrealobj#1{%
7101 \if\horo@succhouse{#1}%
7102 \horoputobjsymbol{42}{#1}%
7103 \horoputobjdeglabel{34}{4}{#1}%
7104 \horoputrxlabel{30}{#1}%
7105 \else
7106 \horoputobjsymbol{29}{#1}%
7107 \horoputobjdeglabel{21}{4}{#1}%
7108 \horoputrxlabel{17}{#1}%
7109 \fi
7110 }
7111 % \end{macrocode}
7112 % \end{macro}
7113 %
7114 % \subsubsection{Support for Quebec City template}
7115 % \begin{macro}{\horo@putqcobj}
7116 % Typeset an object label for the Quebec City template. Objects in
7117 % angular houses get labels on a smaller radius than those
7118 % in succedent or cadent houses.
7119 % \begin{macrocode}
7120 \def\horo@putqcobj#1{%
7121 \if\horo@anghouse{#1}%
7122 \horoputobjsymbol{28}{#1}%
7123 \horoputobjdeglabel{20}{4}{#1}%
7124 \horoputrxlabel{16}{#1}%
7125 \else
7126 \horoputobjsymbol{42}{#1}%
7127 \horoputobjdeglabel{34}{4}{#1}%
7128 \horoputrxlabel{30}{#1}%
7129 \fi
7130 }
7131 % \end{macrocode}
7132 % \end{macro}
7133 %
7134 % \begin{macro}{\horo@qcline}
7135 % Draw a straight line as part of the Quebec City template. This goes from
7136 % radius \#1 and angle \#2 to radius \#3 and angle \#4. The angles are
7137 % specified as cusp number concatenated with variable, as in
7138 % ``IIMPos,'' because that's the most convenient form for the calling
7139 % macro.
7140 % \begin{macrocode}
7141 \def\horo@qcline#1#2#3#4{%
7142 \begingroup
7143 \dimen@=\csname horoCusp#2\endcsname\p@\horo@chartrotate
7144 \dimen1=\dimen@\relax
7145 \dimen@=\csname horoCusp#4\endcsname\p@\horo@chartrotate
7146 \horoputline{#1}{\TG@rem@pt\dimen1}%
7147 {#3}{\TG@rem@pt\dimen@}%
7148 \endgroup
7149 }
7150 % \end{macrocode}
7151 % \end{macro}
7152 %
7153 % \subsubsection{Support for dial templates}
7154 % The dial templates all follow much the same pattern, so most of the parts
7155 % that are the same regardless of the number of dials are factored into
7156 % these two macros.
7157 %
7158 % \begin{macro}{\horo@dialstart}
7159 % Start drawing a dial template. The first argument is the radius of the
7160 % innermost dial, and the second is the harmonic--specially supported
7161 % because people who use dial charts seem to also often want harmonics on
7162 % them, and the degree scale should expand according to the harmonic.
7163 %
7164 % Implementation starts by calculating the harmonic positions of the
7165 % objects:
7166 % \begin{macrocode}
7167 \def\horo@dialstart#1#2{%
7168 \horocalcharmonic{#2}
7169 % \end{macrocode}
7170 %
7171 % To print a nice degree scale we want ticks of differing sizes every one,
7172 % five, and ten degrees - but with the spacing adjusted according to the
7173 % harmonic. So we open a group and compute \#2 times one, five, and ten,
7174 % and save the results in the macros |\horo@dtone|, |\horo@dtfive|, and
7175 % |\horo@dtten| respectively.
7176 % \begin{macrocode}
7177 \begingroup
7178 \count0=#2\relax
7179 \edef\horo@dtone{\the\count0}%
7180 \multiply\count0 by 5\relax
7181 \edef\horo@dtfive{\the\count0}%
7182 \multiply\count0 by 2\relax
7183 \edef\horo@dtten{\the\count0}%
7184 \horo@fterdef\horo@dtone
7185 \horo@fterdef\horo@dtfive
7186 \horo@fterdef\horo@dtten
7187 \endgroup
7188 % \end{macrocode}
7189 %
7190 % Force the right coordinate to 270\horodegrees, which means that the
7191 % 0\horodegrees\ mark will be at the top of the chart; that seems to be what
7192 % dial-chart users want.
7193 % \begin{macrocode}
7194 \def\hororightcoord{270}%
7195 % \end{macrocode}
7196 %
7197 % If there's to be an aspect web (which may not be standard usage for dial
7198 % charts, but costs little to support) then typeset it. Otherwise, just
7199 % make a little cross in the centre of the dial so that the Cosmobiologists
7200 % know where to place their angle-finding instruments.
7201 % \changes{v0.92}{2013/05/15}{Replace \cs{drawline} with \cs{Line}}
7202 % \begin{macrocode}
7203 \ifhoroaspectweb
7204 \horoautoaspects{#1}%
7205 \else
7206 \Line(-1,0)(1,0)%
7207 \Line(0,-1)(0,1)%
7208 \fi
7209 }
7210 % \end{macrocode}
7211 % \end{macro}
7212 %
7213 % \begin{macro}{\horo@dialwheel}
7214 % Draw one wheel of a potentially multi-wheel dial chart. The argument
7215 % \#1 is the |\horooomindist| setting (because the outer wheels may be less
7216 % cramped) and \#2 the diameter (not radius) of the basic circle. Then
7217 % \#3 through \#6 are the radii of various things: start of object-Pos
7218 % ticks, start of connector curves between object Pos and object DPos, end
7219 % of connector curves, and object symbols. The last argument, \#7, is the
7220 % length of object-Pos ticks.
7221 %
7222 % Implementation starts by setting object-object minimum distance according
7223 % to the argument, and object-cusp minimum distance to -90\horodegrees,
7224 % which effectively means that object-cusp interference won't be meaningful
7225 % to the adjustment algorithm. Dial charts don't have cusps. Then we draw
7226 % a circle for the basic dial, and set the right coordinate to
7227 % 270\horodegrees.
7228 % \begin{macrocode}
7229 \def\horo@dialwheel#1#2#3#4#5#6#7{%
7230 \def\horooomindist{#1}\def\horoocmindist{-90.0}%
7231 \put(0,0){\circle{#2}}%
7232 \def\hororightcoord{270}%
7233 % \end{macrocode}
7234 %
7235 % The rest is only meaningful if there is calculated data. We plot a set of
7236 % radials to show objects' Pos values.
7237 % \begin{macrocode}
7238 \ifhorocalculated
7239 \horoputradials{\horoobjects}{#3}{#7}%
7240 % \end{macrocode}
7241 %
7242 % Do |\horoadjust| to come up with reasonable DPos values.
7243 % \begin{macrocode}
7244 \horoadjust
7245 % \end{macrocode}
7246 %
7247 % Then plot the connecting curves and the object symbols and end (closing
7248 % off the conditional).
7249 % \begin{macrocode}
7250 \horoforeach{\horoobjects}{\horoconncurve{#4}{#5}}%
7251 \horoforeach{\horoobjects}{\horoputobjsymbol{#6}}%
7252 \fi
7253 }
7254 % \end{macrocode}
7255 % \end{macro}
7256 %
7257 % \subsubsection{Choosing text size}
7258 %
7259 % \begin{macro}{\horotextsize}
7260 % Adjustment to automatically-determined label text size in charts like
7261 % Vancouver, where the text size depends on the length of the smart-label
7262 % format string. Positive numbers make the text bigger, negative make it
7263 % smaller.
7264 % \begin{macrocode}
7265 \def\horotextsize{0}
7266 % \end{macrocode}
7267 % \end{macro}
7268 %
7269 % \begin{macro}{\horochoosetextsize}
7270 % This makes some attempt to choose a reasonable text size based on
7271 % |\horolbllen|, so that labels with more chunks will be set in smaller
7272 % type. We start out by setting |\count@| to the configuration setting
7273 % |\horotextsize| (actually its negative) and adding the detected value of
7274 % |\horolbllen|.
7275 % \begin{macrocode}
7276 \def\horochoosetextsize{%
7277 \count@=\horotextsize\relax
7278 \multiply\count@ by-1\relax
7279 \advance\count@ by\horolbllen\relax
7280 % \end{macrocode}
7281 %
7282 % Based on the result, we choose a text size from |\Large| down to |\tiny|.
7283 % \begin{macrocode}
7284 \ifcase\the\count@\or\Large\or\large\or\normalsize\or\small\or
7285 \scriptsize\or\scriptsize\or\tiny\fi
7286 }
7287 % \end{macrocode}
7288 % \end{macro}
7289 %
7290 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7291 %
7292 % \subsection{Ready-Made Wheel Templates}
7293 %
7294 % These are all designed to be used inside a |horoscope| environment.
7295 %
7296 % \subsubsection{Basic wheel}
7297 % This is a standard wheel of the sort typically produced by a lot of
7298 % astrological software; it probably resembles Astrolog's more than anything
7299 % else. It has a sign key and angle scale around the outside, and space for
7300 % a centre label or aspect web in the middle. Objects have ticks showing
7301 % their true locations against the angle scale and aspect web, and curves
7302 % connecting those to their displayed locations within the houses. House
7303 % cusps can jog out of their true positions in order to accomodate adjusted
7304 % labels.
7305 %
7306 % \begin{macro}{\horowheelVancouver}
7307 % The optional argument is the label format string, which will be passed
7308 % into the smart labels code. Default value shows degrees and minutes of
7309 % object position.
7310 % \begin{macrocode}
7311 \newcommand{\horowheelVancouver}[1][ydzmr/ymzdr]{%
7312 % \end{macrocode}
7313 %
7314 % The graphic elements that make up the wheel are arranged at the following
7315 % radii:
7316 %
7317 % \begin{tabular}{ll}
7318 % r & element \\ \hline
7319 % 0--21 & aspect web or centre label \\
7320 % 21 & circle bounding aspect web from houses \\ \hline
7321 % 21--22 & radials showing true cusp positions \\
7322 % 22 & arcs connecting cusp radials to displaced cusps \\
7323 % 21--23 & radials showing true object positions \\
7324 % 23--24 & curves connecting object labels to radials \\
7325 % 22--42 & possibly-displaced cusps \\
7326 % 25 & approximate innermost object label chunk \\
7327 % 32 & centres of internal house labels \\
7328 % 38 & centres of outermost label chunks \\
7329 % 40--41 & curves connecting object labels to radials \\
7330 % 41--43 & radials showing true object positions \\
7331 % 42 & arcs connecting cusp radials to displaced cusps \\
7332 % 42--43 & radials showing true cusp positions \\
7333 % 43 & circle on inside of angle scale \\ \hline
7334 % 43--44 & 1\horodegrees\ ticks in angle scale \\
7335 % 43--45 & 5\horodegrees\ ticks in angle scale \\
7336 % 45 & circle bounding angle scale from sign key \\ \hline
7337 % 45--50 & 30\horodegrees\ ticks between signs \\
7338 % 47.5 & centres of sign symbols in key \\
7339 % 50 & circle around entire chart \\ \hline
7340 % \end{tabular}
7341 %
7342 % The object label chunk radii are set by |\horosetsmartradii| to spacing that
7343 % depends on the number of chunks, but the rough guideline is that they occupy
7344 % radii 25--38. In fact, scanning the label string and setting the radii are
7345 % the first things |\horowheelVancouver| does.
7346 % \begin{macrocode}
7347 \horoscanlabels{#1}%
7348 \horosetsmartradii{38}{4.666}{0.333}%
7349 % \end{macrocode}
7350 %
7351 % Set the default rounding mode, which is round to minutes keep degrees,
7352 % if |\hororoundautotrue| is active.
7353 % \begin{macrocode}
7354 \ifhororoundauto\hororoundtominkeepdeg\fi
7355 % \end{macrocode}
7356 %
7357 % Draw the bounding circles (given by their diameter, which are twice their
7358 % radii).
7359 % \begin{macrocode}
7360 \put(0,0){\circle{100}}%
7361 \put(0,0){\circle{90}}%
7362 \put(0,0){\circle{86}}%
7363 \put(0,0){\circle{42}}%
7364 % \end{macrocode}
7365 %
7366 % Draw the angle scale with its 1\horodegrees\ and 5\horodegrees\ ticks, and
7367 % the sign key.
7368 % \begin{macrocode}
7369 \horoputticks{45}{5}{30}%
7370 \horoputticks{43}{1}{1}%
7371 \horoputticks{43}{2}{5}%
7372 \horoputsignkey{47.5}%
7373 % \end{macrocode}
7374 %
7375 % At this point DPos=Pos. Draw all the radials that go in true positions:
7376 % two each for objects and cusps, and two more bold ones for the cusps.
7377 % \changes{v0.92}{2013/05/15}{Replace \cs{allinethickness} with \cs{thicklines}\cs{linethickness}}
7378 % \begin{macrocode}
7379 \ifhorocalculated
7380 \horoputradials{\horoobjects}{41}{2}%
7381 \horoputradials{\horoobjects}{21}{2}%
7382 \ifhorodrawcusps
7383 \horoputradials{\horocusps}{21}{1}%
7384 \horoputradials{\horocusps}{42}{1}%
7385 \fi
7386 \ifhoroboldangles
7387 \begingroup
7388 \thicklines\linethickness{\horoanglecuspwidth}%
7389 \horoputradials{\horoangularcusps}{21}{1}%
7390 \ifhoroanglearrows
7391 \horoputradials{\horoangularcusps}{42}{0.5}%
7392 \else
7393 \horoputradials{\horoangularcusps}{42}{1}%
7394 \fi
7395 \endgroup
7396 \fi
7397 \ifhoroanglearrows
7398 \horoputarrows{\horoangularcusps}{43}{0.7}%
7399 \fi
7400 \fi
7401 % \end{macrocode}
7402 %
7403 % Compute the adjusted DPos values.
7404 % \begin{macrocode}
7405 \horoadjust
7406 % \end{macrocode}
7407 %
7408 % Now draw the linework that goes in, or uses, adjusted positions. That
7409 % includes connecting curves for objects and cusps, and the main chunks
7410 % of the cusps themselves.
7411 % \changes{v0.92}{2013/05/15}{Replace \cs{allinethickness} with \cs{thicklines}\cs{linethickness}}
7412 % \begin{macrocode}
7413 \ifhorocalculated
7414 \horoforeach{\horoobjects}{\horoconncurve{41}{40}}%
7415 \horoforeach{\horoobjects}{\horoconncurve{23}{24}}%
7416 \ifhorodrawcusps
7417 \horoforeach{\horocusps}{\horoconncurve{42}{42}}%
7418 \horoforeach{\horocusps}{\horoconncurve{22}{22}}%
7419 \horoputradials{\horocusps}{22}{20}%
7420 \fi
7421 \ifhoroboldangles
7422 \thicklines\linethickness{\horoanglecuspwidth}%
7423 \horoforeach{\horoangularcusps}{\horoconncurve{42}{42}}%
7424 \horoforeach{\horoangularcusps}{\horoconncurve{22}{22}}%
7425 \horoputradials{\horoangularcusps}{22}{20}%
7426 \thinlines
7427 \fi
7428 % \end{macrocode}
7429 %
7430 % Finally, the smart labels for objects, the aspect web, and
7431 % the internal house labels.
7432 % \begin{macrocode}
7433 {\horochoosetextsize
7434 \horoforeach{\horoobjects}{\horoputsmartlabel}}%
7435 \ifhoroaspectweb\horoautoaspects{21}\fi
7436 \ifhorointhouselabels\horoputinthouselabels{32}\fi
7437 \fi
7438 }
7439 % \end{macrocode}
7440 % \end{macro}
7441 %
7442 % \subsubsection{Harmonic multi-dial charts}
7443 % These templates are intended to be similar to some of those used in
7444 % Cosmobiology; they're also handy for comparing multiple charts. One, two,
7445 % three, or four concentric dials are supported. There's also built-in
7446 % support for calculating harmonics to create a 90\horodegrees\ wheel, or a
7447 % 45\horodegrees\ wheel, or whatever. The dials have ticks on them
7448 % indicating multiples of 1\horodegrees\ and 5\horodegrees (also
7449 % 10\horodegrees\ for the single and double dials), and the ticks
7450 % expand with the harmonic to make it easy to measure angles visually.
7451 % Labels for objects consist of just the object sysbols, to save radial
7452 % space (especially in the many-wheels case).
7453 %
7454 % All these take an optional first argument which is the harmonic number;
7455 % use 4 for a 90\horodegrees\ dial. Their implementations are
7456 % straightforward, based on the helper macros already defined.
7457 %
7458 % \begin{macro}{\horowheelIqaluit}
7459 % Single dial with the main circle at radius 42.
7460 % \begin{macrocode}
7461 \newcommand{\horowheelIqaluit}[1][1]{{%
7462 \horo@dialstart{42}{#1}%
7463 \horoputticks{42}{1}{\horo@dtone}%
7464 \horoputticks{42}{2}{\horo@dtfive}%
7465 \horoputticks{42}{3}{\horo@dtten}%
7466 \horo@dialwheel{5.0}{84}{42}{45}{46}{47.5}{3}%
7467 }}
7468 % \end{macrocode}
7469 % \end{macro}
7470 %
7471 % \begin{macro}{\horowheelIgloolik}
7472 % Double dial, radii 34 and 42. The optional first argument is the harmonic; second
7473 % and third should be two sets of object positions saved with
7474 % |\horosaveobjects|, corresponding to the positions to display in the inner
7475 % and outer dials respectively.
7476 % \begin{macrocode}
7477 \newcommand{\horowheelIgloolik}[3][1]{{%
7478 \horo@dialstart{34}{#1}%
7479 #3\horocalcharmonic{#1}%
7480 \horoputticks{42}{1}{\horo@dtone}%
7481 \horoputticks{42}{2}{\horo@dtfive}%
7482 \horoputticks{42}{3}{\horo@dtten}%
7483 \horo@dialwheel{5.0}{84}{42}{45}{46}{47.5}{3}%
7484 #2\horocalcharmonic{#1}%
7485 \horoputticks{34}{1}{\horo@dtone}%
7486 \horoputticks{34}{2}{\horo@dtfive}%
7487 \horoputticks{34}{3}{\horo@dtten}%
7488 \horo@dialwheel{6.0}{68}{34}{37}{38}{39.5}{3}%
7489 }}
7490 % \end{macrocode}
7491 % \end{macro}
7492 %
7493 % \begin{macro}{\horowheelResolute}
7494 % Triple dial, radii 29, 36, and 43. Optional first argument is harmonic;
7495 % remaining arguments are sets of saved object positions for the dials
7496 % ordered from inner to outer.
7497 % \begin{macrocode}
7498 \newcommand{\horowheelResolute}[4][1]{{%
7499 \horo@dialstart{29}{#1}%
7500 #4\horocalcharmonic{#1}%
7501 \horoputticks{43}{1}{\horo@dtone}%
7502 \horoputticks{43}{2}{\horo@dtfive}%
7503 \horo@dialwheel{5.0}{86}{43}{45}{46}{47.5}{2}%
7504 #3\horocalcharmonic{#1}%
7505 \horoputticks{36}{1}{\horo@dtone}%
7506 \horoputticks{36}{2}{\horo@dtfive}%
7507 \horo@dialwheel{6.0}{72}{36}{38}{39}{40.5}{2}%
7508 #2\horocalcharmonic{#1}%
7509 \horoputticks{29}{1}{\horo@dtone}%
7510 \horoputticks{29}{2}{\horo@dtfive}%
7511 \horo@dialwheel{7.0}{58}{29}{31}{32}{33.5}{2}%
7512 }}
7513 % \end{macrocode}
7514 % \end{macro}
7515 %
7516 % \begin{macro}{\horowheelRankin}
7517 % Quadruple dial, radii 22, 29, 36, and 43. Optional first argument is harmonic;
7518 % remaining arguments are sets of saved object positions for the dials
7519 % ordered from inner to outer.
7520 % \begin{macrocode}
7521 \newcommand{\horowheelRankin}[5][1]{{%
7522 \horo@dialstart{22}{#1}%
7523 #5\horocalcharmonic{#1}%
7524 \horoputticks{43}{1}{\horo@dtone}%
7525 \horoputticks{43}{2}{\horo@dtfive}%
7526 \horo@dialwheel{5.0}{86}{43}{45}{46}{47.5}{2}%
7527 #4\horocalcharmonic{#1}%
7528 \horoputticks{36}{1}{\horo@dtone}%
7529 \horoputticks{36}{2}{\horo@dtfive}%
7530 \horo@dialwheel{6.0}{72}{36}{38}{39}{40.5}{2}%
7531 #3\horocalcharmonic{#1}%
7532 \horoputticks{29}{1}{\horo@dtone}%
7533 \horoputticks{29}{2}{\horo@dtfive}%
7534 \horo@dialwheel{7.0}{58}{29}{31}{32}{33.5}{2}%
7535 #2\horocalcharmonic{#1}%
7536 \horoputticks{22}{1}{\horo@dtone}%
7537 \horoputticks{22}{2}{\horo@dtfive}%
7538 \horo@dialwheel{10.0}{44}{22}{24}{25}{26.5}{2}%
7539 }}
7540 % \end{macrocode}
7541 % \end{macro}
7542 %
7543 % \subsubsection{Decorative wheel charts}
7544 % These were created partly to demonstrate some of the possibilities of
7545 % putting the pieces together to create interesting variations on the basic
7546 % chart, and partly in an effort to imitate historical chart styles. The
7547 % Montreal design was an attempt to create something similar to
7548 % old-fashioned square charts with triangular houses that I've seen; but at
7549 % the time I wasn't remembering clearly how those charts were laid out, and
7550 % I misunderstood which direction the triangles should point. The result is
7551 % not much like historical charts at all, but was retained because it's
7552 % visually interesting anyway, and demonstrates creative abuse of spline
7553 % curves. The Quebec City design is a second attempt
7554 % at imitating historical charts; although circular instead of square, it
7555 % uses the triangular-house layout, in a design that puts emphasis on the
7556 % angles and house cusps. Both are designed to emphasize the houses things
7557 % are in and de-emphasize the precise longitude relationships that the
7558 % Vancouver chart focuses on. That may or may not accomodate a different
7559 % style of interpretation.
7560 %
7561 % \begin{macro}{\horowheelMontreal}
7562 % This chart style puts some labels at small radii, so the minimum distances
7563 % for label adjustment have to be relatively large angles to prevent
7564 % interference.
7565 % \begin{macrocode}
7566 \newcommand{\horowheelMontreal}{{%
7567 \def\horooomindist{10.0}\def\horoocmindist{6.0}%
7568 % \end{macrocode}
7569 %
7570 % Set the default rounding mode, which is round to degrees keep sign,
7571 % if |\hororoundautotrue| is active.
7572 % \begin{macrocode}
7573 \ifhororoundauto\hororoundtodegkeepsign\fi
7574 % \end{macrocode}
7575 %
7576 % Draw circles at radii 15 and 45.
7577 % \begin{macrocode}
7578 \put(0,0){\circle{90}}%
7579 \put(0,0){\circle{30}}%
7580 % \end{macrocode}
7581 %
7582 % Put circular-reading labels at radius 47.5 for the four angles.
7583 % \begin{macrocode}
7584 \ifhorocalculated
7585 \ifhorodrawcusps
7586 \horoforeach{\horoangularcusps}{\horoputcusplabel{47.5}{5}}%
7587 \fi
7588 \fi
7589 % \end{macrocode}
7590 %
7591 % Do adjustment to find non-conflicting locations for everything else.
7592 % \begin{macrocode}
7593 \horoadjust
7594 % \end{macrocode}
7595 %
7596 % Now draw cusps separating succedent houses from the others.
7597 % Note that each call of |\horo@montrealcurve| draws a
7598 % curve from the \emph{middle} of one house, on the inner circle, to the
7599 % \emph{cusp} of another, on the outer circle. For instance,
7600 % |\horo@montrealcurve{I}{II}{III}| connects the first house cusp (that is
7601 % the boundary between the twelfth and first houses; the ascendant) on the
7602 % outside, to the midpoint of the second and third house cusps, which is the
7603 % middle of the second house, on the inside. In general it's midpoints of
7604 % succedent houses and cusps of angular houses, for a total of eight
7605 % connecting curves around the circle. Also note that we use adjusted
7606 % positions (DPos) on the inside and true positions (Pos) on the outside.
7607 % \begin{macrocode}
7608 \ifhorocalculated
7609 \ifhorodrawcusps
7610 \horo@montrealcurve{I}{II}{III}%
7611 \horo@montrealcurve{IV}{II}{III}%
7612 \horo@montrealcurve{IV}{V}{VI}%
7613 \horo@montrealcurve{VII}{V}{VI}%
7614 \horo@montrealcurve{VII}{VIII}{IX}%
7615 \horo@montrealcurve{X}{VIII}{IX}%
7616 \horo@montrealcurve{X}{XI}{XII}%
7617 \horo@montrealcurve{I}{XI}{XII}%
7618 % \end{macrocode}
7619 %
7620 % Draw cusps separating cadent from angular houses. The end result looks
7621 % like a sort of four-petalled flower, with two houses inside each petal and
7622 % one more in each of the spaces between.
7623 % \begin{macrocode}
7624 \horoforeach{\horoangularcusps}{\horoconncurve{45}{15}}%
7625 \fi
7626 % \end{macrocode}
7627 %
7628 % Finally, draw object labels. The code inside |\horo@putmontrealobj|
7629 % places the labels at different radii depending on the house type. In
7630 % general, the cusp adjustments mean that labels should not interfere
7631 % with the cusp curves, but it's imaginable in the case of heavily
7632 % overfilled houses.
7633 % \begin{macrocode}
7634 \horoforeach{\horoobjects}{\horo@putmontrealobj}%
7635 \fi
7636 }}
7637 % \end{macrocode}
7638 % \end{macro}
7639 %
7640 % \begin{macro}{\horowheelQuebecCity}
7641 % As with the Montreal template, this one requires a fair bit of angular
7642 % space between object labels.
7643 % \begin{macrocode}
7644 \newcommand{\horowheelQuebecCity}{{%
7645 \def\horooomindist{10.0}\def\horoocmindist{6.0}%
7646 % \end{macrocode}
7647 %
7648 % Set the default rounding mode, which is round to degrees keep sign,
7649 % if |\hororoundautotrue| is active.
7650 % \begin{macrocode}
7651 \ifhororoundauto\hororoundtodegkeepsign\fi
7652 % \end{macrocode}
7653 %
7654 % Draw two circles for the outside; the cusp labels will go between them.
7655 % \begin{macrocode}
7656 \put(0,0){\circle{100}}%
7657 \put(0,0){\circle{90}}%
7658 % \end{macrocode}
7659 %
7660 % Do adjustment to find nice spacing for everything.
7661 % \begin{macrocode}
7662 \horoadjust
7663 % \end{macrocode}
7664 %
7665 % Find the midpoints of all the houses and rotate the chart so that the
7666 % triangle forming the seventh house will point exactly to the right, which
7667 % means the triangle forming the first house should be very close to
7668 % pointing exactly to the left.
7669 % \begin{macrocode}
7670 \ifhorocalculated
7671 \horo@findcuspmids
7672 \let\hororightcoord=\horoCuspVIIMPos
7673 % \end{macrocode}
7674 %
7675 % The layout here is that there's a (approximate) square in the middle, with
7676 % triangles pointing out of its four sides. Those form the angular houses.
7677 % The spaces between them are each bisected by a radial, to form the
7678 % succedent and cadent houses. We draw those radials first; they are
7679 % exactly on the cusps, and go from radius 20 (which circumscribes the
7680 % near-square) to 45 (the inside of the two rim circles).
7681 % \begin{macrocode}
7682 \ifhorodrawcusps
7683 \horoputradials{CuspIII,CuspVI,CuspIX,CuspXII}{20}{25}%
7684 % \end{macrocode}
7685 %
7686 % Now the eight lines connecting the square corners to the rim to form the
7687 % triangles; these go between angular house midpoints on the outside, and
7688 % cadent house cusps (which are the square corners) on the inside.
7689 % \begin{macrocode}
7690 \horo@qcline{45}{IMPos}{20}{IIIDPos}%
7691 \horo@qcline{45}{IVMPos}{20}{IIIDPos}%
7692 \horo@qcline{45}{IVMPos}{20}{VIDPos}%
7693 \horo@qcline{45}{VIIMPos}{20}{VIDPos}%
7694 \horo@qcline{45}{VIIMPos}{20}{IXDPos}%
7695 \horo@qcline{45}{XMPos}{20}{IXDPos}%
7696 \horo@qcline{45}{XMPos}{20}{XIIDPos}%
7697 \horo@qcline{45}{IMPos}{20}{XIIDPos}%
7698 % \end{macrocode}
7699 %
7700 % Draw the square itself by connecting cusps of cadent houses.
7701 % \begin{macrocode}
7702 \horo@qcline{20}{IIIDPos}{20}{VIDPos}%
7703 \horo@qcline{20}{VIDPos}{20}{IXDPos}%
7704 \horo@qcline{20}{IXDPos}{20}{XIIDPos}%
7705 \horo@qcline{20}{XIIDPos}{20}{IIIDPos}%
7706 \fi
7707 % \end{macrocode}
7708 %
7709 % Now label the cusps. These labels go at midpoints of the houses, so we
7710 % need to copy the MPos of the houses to their DPos.
7711 % \begin{macrocode}
7712 \horocopyvar{\horocusps}{MPos}{DPos}%
7713 \ifhorodrawcusps
7714 \horoforeach{\horocusps}{\horoputcusplabel{47.5}{5}}%
7715 \fi
7716 % \end{macrocode}
7717 %
7718 % Finally, add the labels for the objects.
7719 % \begin{macrocode}
7720 \horoforeach{\horoobjects}{\horo@putqcobj}%
7721 \fi
7722 }}
7723 % \end{macrocode}
7724 % \end{macro}
7725 %
7726 % To end the file: we close the conditional, and set default values for the
7727 % calculation data so users can start typesetting charts immediately and not
7728 % worry about whether they are \emph{defining} or \emph{redefining} macros.
7729 % The default chart data is the author's.
7730 % \begin{macrocode}
7731 \fi
7732 \horocalcparms{1976}{8}{1}{17:22:19}{W123:20:38}{N48:25:53}
7733 % \end{macrocode}
7734 % \Finale
7735 \endinput