« On language and the use thereo... | Home | Disabling Ctrl-Shift-Underscor... »

Typesetting astrology with LaTeX

Mon 4 Oct 2010 by mskala Tags used: , ,

This entry gathers together information on using TeX and LaTeX for astrological documents, including both software I've released myself, and links to other resources. This is the master entry, which will be updated from time to time; I may also post brief announcements linking back to it as things get updated and changed.

The starfont package, v1.2

As of the end of September 2010, there's a new version of this package. Anthony I.P. Owen, who designed the fonts in 1993, found out about my efforts to package them for LaTeX, and he very kindly released these fonts to the public domain. That resolves the former licensing issues that had meant CTAN couldn't distribute the font files. I've put together a new version of the package including an updated license notice, the font files, and added support for the serif version of the font. You can download the new version from CTAN (information page) or locally from my site (ZIP file). You can also preview the package documentation (PDF file).

If you're not using TeX/LaTeX, you might also find the original TrueType font files useful: STRFNSAN.TTF and STRFNSER.TTF. These have been released to the public domain, notwithstanding their embedded copyright notices.

Anthony Owen also sent me four JPEG files containing scans of the booklet he used to distribute with floppy disc copies of the fonts. The booklet includes names for all the symbols in the fonts, including many that I didn't recognize when I prepared the LaTeX package. So it's likely that at some point in the future I'll put together a version 1.3 incorporating this information; until then, you can read the booklet yourselves and use the code numbers therein to typeset the extra glyphs. Here are the JPEGs: Font/back cover, pages 1 and 2, pages 3 and 4, pages 5 and 6.

The horoscop package, version 0.91ish

NEW! As of May 2013, I've posted horoscop in a GitHub repository. When I last released a version of horoscop, it only worked with dvips (not pdflatex) because of the need for arbitrary-slope lines and large circles. But that was 2008. In 2011, some nice people stepped in and created the long-promised "pict2e" LaTeX package, allowing those features in other drivers; and I have just now updated horoscop to use pict2e. The result is that now it will work with pdflatex, and it should also produce better-looking results even in dvips-based work flows. This is very new; the changes are only available in the GitHub version, and the documentation has only partially been updated. However, in the near future (since I'm kind of unemployed at the moment, and have time) I plan to package a release and submit it to CTAN for the first time, at which point the whole package should become a lot more visible.

The horoscop package is my software for typesetting astrological charts in LaTeX. It is several years old - I'm not sure when I first started working on it, but no later than 2004. It works pretty well, but I'm still calling it "beta" for the moment. Summary of features:

  • A unified interface for astrological symbols/glyphs, supporting three different astrological fonts as well as text abbreviations. 
  • Support for invoking Astrolog or Swiss Ephemeris to calculate charts.  Positions can also be specified manually. 
  • Loading and saving object and cusp positions into TeX macros. 
  • Typesetting of angles and positions as text. 
  • Ready-made templates for basic wheel charts, dial charts including multi-dials with up to four sets of objects, and decorative wheel charts. 
  • Optional variations of the standard templates:  aspect webs, highlighting for angular cusps, choice of what to include in object labels, house labels inside the houses. 
  • Low-level graphics functions for plotting in polar coordinates and building new templates. 
  • Labels move, and where necessary houses expand, to prevent crowding. 
  • Smart rounding of angles for display.

Documentation of the package, including extensive examples and implementation details, is available in a 126-page PDF file.  The package itself is available as a traditional .ins and .dtx pair, or a ready-made .sty file.  To make full use of horoscop, you will also need the starfont package, and a working installation of either Swiss Ephemeris or Astrolog. (Swiss Ephemeris is more thoroughly tested, and is recommended.) Please note that the links in this paragraph are to the last released beta version, from 2008. A more recent version is available from GitHub.

Online chart service

The Web site for the online chart service is a little ugly because it hasn't been updated for my latest round of site redesign. However, it is UP, and due to the march of CPU power increases, there is now no practical limit to how often it's okay to use it. The former rate limits have been removed.

This mostly exists as an online demo of the horoscop package.

Visit https://ansuz.sooke.bc.ca/astrology/makechart.php to start making charts.


Hi Matthew,
I try to use the horoscope package in combination with astrolog - without success. Perhaps you may and can help me?

Where I have to install astrolog? simply at c:\ ?
How and where I tell thetexfile/horoscope that it has to use astrolog?
You wrote that I have to use the "\write18 support". How ...? What I have to change in output profile for texniccenter? Normaly I use pdflatex with the arguments: -synctex=-1 -interaction=nonstopmode "%Wm"
Can I use pdflatex or I need to change to "pure" latex, i.e. tex -> dvi -> ps followed by ps2pdf ?

Do you have 2 simple executable (comlete, including documentclass, usepackage and so on) examples for me, how I have to use horoscope with latex (miktex texniccenter)?
1st ex by using the external prog astrolog and
2nd ex by entering positions manually?

Sorry for the partly stupid questions. But I hope your answer will be a great help for me.

Thank you for answering and best regards,
Elke - 2012-06-29 13:27
Hi Mattew,
i try your package which works fine on my Debian i386. Consider I prefer European chart's drawing, so would you have such a routine to add to horoscop style, or could you give me some help to modify your code? Regards
taxo - 2013-05-02 11:19
What do you mean by a "European" chart drawing - do you have an example I could look at? The package can be configured (with more or less difficulty depending on what you want to do) to produce a variety of styles.
Matt - 2013-05-02 16:21
I simply want to put planets in the outer part of the chart, zodiac in the middle and aspects in the inner part ( you could have an example here http://www.astrotheme.fr . i look at a glance at you code and i don't find any global variable for radius value of those circles, so it would be hard to modify... Thank you for your rapid answer, but i went on a journey!
taxo - 2013-05-12 14:13
Okay, it looks like the easiest thing for you to do would be to define a new chart template of your own by copying the definition of \horowheelVancouver, giving it a new name of your choice, and changing the radii there. It looks like the style you want has basically the same things that are in the default template, just at different distances from the centre. Nearly all the radii will have to change, though - it's not just a case of swapping the signs and the objects, because there are also a lot of things like the short "ticks" connecting the labels to the degree scale, all of which have will have to be moved to new radii. You may also want to change some font sizes, but that's a separate issue. I'd suggest looking at the table at the top of page 111 in the manual, which describes all the radii used by the Vancouver chart design. You'll need to carefully plan out a similar set of radii for where you want to put everything in your new template, and it'll probably take some trial and error, but (especially if you remove the code for any optional features you're not using, which will reduce the complexity of what remains) it shouldn't be hard to edit the Vancouver template into what you want by changing the radii that should change, and deleting the parts no longer needed.

There is also a section in the main part of the user manual about defining your own templates (starting on page 50) but it's terse, and you may be better off jumping right to the code.
Matt - 2013-05-12 14:52
Right, i'll proceed as you say as soon as i could; another point to focus is running astrolog in background: horoscop uses systematically swetest while astrolog is in the bin Path.
Any idea ?
taxo - 2013-05-13 09:43
Use the astrolog package option, that is, load horoscop with a command like \usepackage[astrolog]{horoscop} . Be aware of the differences between Astrolog and Swiss Ephemeris. I think the main ones are: Astrolog uses one NorthNode object instead of separate MeanNode and TrueNode objects; Astrolog doesn't calculate the angle pseudo-objects at all (these must be inferred from the house cusps); there are differences in the macros used for custom objects; and the author of Astrolog purports to forbid commercial use of the output by means of copyright. Search the manual for references to "Astrolog" (case sensitive, to reduce false hits) for more information on these points.
Matt - 2013-05-14 12:22
Your questions inspired me to take another look at this code, and in so doing, I discovered that the long-promised unimplemented pict2e LaTeX package has been implemented. It became available in 2011; I last looked seriously at horoscop in 2010. This is significant because pict2e allows arbitrary-slope lines and large circles in the picture environment in pdflatex without needing TikZ or similar. So with relatively minor changes to horoscop, it becomes possible to use it with pdflatex instead of dvips/ps2pdf. I've created a Github repository at http://github.com/mskala/horoscop and have checked in a modified version that will work with pdflatex (and most other TeX engines). Seeing as how horoscop has had plenty of years of "beta" now, I think very soon I'll package it into a form that I can submit to CTAN.
Matt - 2013-05-16 06:45
Pleased you could achieve your work!
taxo - 2013-05-19 01:36
Trying your code on another machine, compilation stops
with this warning:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, us
englishmax, ukenglish, french, basque, loaded.
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty))) (./essai.aux)
! Missing \endcsname inserted.
<to be read again>
l.10 \horocalculate


I followed your instructions to install fonts and horoscope style, which are
recognised by Latex...
Any idea?
taxo - 2013-05-23 04:06
"Missing \endcsname" from horoscop is usually associated with trouble calling an external program (specifically, reading the external program's output). Make sure whichever astrological calculation backend you're using (swetest or astrolog) is installed and in the PATH; and try looking in the .hor file for error messages.
Matt - 2013-05-23 04:57
sorry i forgot enabling write 18 in that fresh install!
taxo - 2013-05-23 14:13

I am using your horoscop package, but something does not work. I guess it may be something with the external program ( I use swetest ). Could you provide a valid "file.hor" so as I could check with mine. Thanks in advance, and thanks for your package !.
francisco - 2016-12-31 02:37

(optional field)
(optional field)
Answer "bonobo" here to fight spam. ここに「bonobo」を答えてください。SPAMを退治しましょう!
I reserve the right to delete or edit comments in any way and for any reason. New comments are held for a period of time before being shown to other users.