2

I have found an old piece of code of mine that takes some output from another program to produce an astrological chart using LaTeX. I tried to put the list of aspects from text form to symbol form. So I code

\font\astro=astrosym
\def\sun{\astro\char000} 
\def\venus{\astro\char002} 
\def\trine{\astro\char061} 

and

\begin{minipage}[t]{13cm}\footnotesize\strut\offinterlineskip
{\sun} {\trine} {\venus} (12.46)\par
...more like this...

where the "(12.46)" denotes the power of the aspect. It works, except that spaces are ignored (even when escaped), so I have to put braces about every symbol, and worse, the \footnotesize is ignored by the symbols.

How can this be fixed?

  • Have you considered alternatives astronomical symbols (Comprehensive LaTeX Symbol List. pp. 120+)? – Zoxume Apr 22 '16 at 19:11
  • This looks like mixing TeX \font etc. commands with LaTeX ...brrrr – user31729 Apr 22 '16 at 19:23
  • @ChristianHupfer Yes, \brrrr, but I don't understand any better. When I learned latex about 20 years ago, it was to write my thesis without the need of killing my professor for requesting yet another complete rewrite because he wanted the enumeration of equations on the right instead on the left side and lots of other things like that. In retrospective, I should have started with TeX instead of LaTeX. – Gyro Gearloose Apr 22 '16 at 19:57
2

Use the pifont package. According to the Comprehensive LaTeX Symbol List, page 186, using astrosym symbols is possible. Add this to your preamble:

\usepackage{pifont}
\DeclareFontFamily{U}{astrosym}{}
\DeclareFontShape{U}{astrosym}{m}{n}{<-> astrosym}{}

Then, you can access the symbols using this command:

\Pisymbol{astrosym}{number}

number is a specific number for each symbol. The list is available in the same document, in table 499, page 188. For example, for the sun, you write \Pisymbol{astrosym}{0}.

Full example:

\documentclass{article}
\usepackage{pifont}

\DeclareFontFamily{U}{astrosym}{}
\DeclareFontShape{U}{astrosym}{m}{n}{<-> astrosym}{}

\font\astro=astrosym
\def\sun{\astro\char000} 
\def\venus{\astro\char002} 
\def\trine{\astro\char061} 

\begin{document}
\begin{minipage}[t]{13cm}\footnotesize\strut\offinterlineskip
% This is your code:
{\sun} {\trine} {\venus} (12.46)\par
% This is my solution:
\Pisymbol{astrosym}{0} \Pisymbol{astrosym}{61} \Pisymbol{astrosym}{2} (12.46)\par
...more like this...
\end{minipage}
\end{document}

Result:

  • Thanks a lot! It works, but I don't understand. Give me some time until tomorrow to try it out in case I hit some essential problems before accepting your (good looking) answer. – Gyro Gearloose Apr 22 '16 at 19:47
  • I see now, defining "\def\sun{\Pisymbol{astrosym}{0}}" instead of old "\def\sun{\astro\char000}" works, on that symbol alone. Still I'm in need of some explanation. Will need a thorough look at your link. – Gyro Gearloose Apr 22 '16 at 20:13
  • I see on your comment under your question that you learned (La)TeX twenty years ago. What exactly don’t you understand? – Zoxume Apr 22 '16 at 20:16
  • first, I didn't learn Latex completely, second, tex/latex is the most difficult language I ever encountered, and, 20 years is a fairly long time to forget about every detail. In the meantime I didn't do much with latex except replacing text in template letters. Stating that I learned latex 20 years ago does not mean I'd have 20 years of experience but rather that any experience was a really long time ago. – Gyro Gearloose Apr 22 '16 at 20:24
  • 1
    The Comprehensive LaTeX Symbol List is not the best document to refresh your memory on LaTeX since it is only a list with minimal explanation on how to get the symbols. You should read a little tutorial on LaTeX instead. – Zoxume Apr 22 '16 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.