You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

116 lines
2.7 KiB

  1. %! Package = kosmorro
  2. %! Author = Jérôme Deuchnord
  3. %! Date = 2020-04-26
  4. \NeedsTeXFormat{LaTeX2e}[1994/06/01]
  5. \ProvidesPackage{kosmorro}[2020/04/26 Kosmorro Package]
  6. \RequirePackage{xcolor}
  7. \RequirePackage{fp}
  8. \newcommand{\moonphase}[2]{
  9. \begin{center}
  10. \begin{minipage}{2cm}
  11. \includegraphics[width=\linewidth]{#1}
  12. \end{minipage}
  13. \hspace{5mm}
  14. \begin{minipage}{7cm}
  15. \textbf{\currentmoonphasetitle}\\#2
  16. \end{minipage}
  17. \end{center}
  18. }
  19. \newenvironment{ephemerides}{
  20. \begin{table}[h]
  21. \centering
  22. \begin{tabular}{lccc}
  23. \textbf{\ephemeridesobjecttitle} &
  24. \textbf{\ephemeridesrisetimetitle} &
  25. \textbf{\ephemeridesculminationtimetitle} &
  26. \textbf{\ephemeridessettimetitle}\\
  27. \hline
  28. }{
  29. \end{tabular}
  30. \end{table}
  31. }
  32. \newcommand{\object}[4]{
  33. \hline
  34. \textbf{#1} & {#2} & {#3} & {#4}\\
  35. }
  36. \newenvironment{graphephemerides}{\setlength{\unitlength}{0.02\linewidth}
  37. \begin{picture}(20,20)
  38. % Axes
  39. \put(0,-2){\vector(1,0){50}}
  40. \multiput(0,-2)(2,0){24}{
  41. \line(0,-1){0.25}
  42. }
  43. \newcounter{hour}
  44. \multiput(-0.25,-3.5)(4,0){12}{
  45. \sffamily\footnotesize
  46. \arabic{hour}\stepcounter{hour}\stepcounter{hour}
  47. }
  48. \put(49,-3.5){\sffamily\footnotesize \hourslabel}
  49. % Graduation
  50. \put(50,-0.5){\sffamily\footnotesize \Pluto}
  51. \put(50,1.5){\sffamily\footnotesize \Neptune}
  52. \put(50,3.5){\sffamily\footnotesize \Uranus}
  53. \put(50,5.5){\sffamily\footnotesize \Saturn}
  54. \put(50,7.5){\sffamily\footnotesize \Jupiter}
  55. \put(50,9.5){\sffamily\footnotesize \Mars}
  56. \put(50,11.5){\sffamily\footnotesize \Venus}
  57. \put(50,13.5){\sffamily\footnotesize \Mercury}
  58. \put(50,15.5){\sffamily\footnotesize \Moon}
  59. \put(50,17.5){\sffamily\footnotesize \Sun}
  60. \multiput(0,0)(0,2){10}{
  61. \color{gray}\line(1,0){48}
  62. }
  63. \linethickness{1.5mm}
  64. }{
  65. \end{picture}
  66. \vspace{1cm}
  67. }
  68. \newcommand{\graphobject}[8]{%
  69. % #1: Y coordinate component
  70. % #2: Color
  71. % #3: Hour rise time
  72. % #4: Minute rise time
  73. % #5: Hour set time
  74. % #6: Minute set time
  75. % #7: Human-readable rise time
  76. % #8: Human-readable set time
  77. \FPeval{\start}{#3*2+(#4/60)*2}%
  78. \FPeval{\length}{#5*2+(#6/60)*2 - \start}%
  79. \FPeval{\starttext}{\start+0.7}%
  80. \FPeval{\endtext}{\start+\length-3.25}%
  81. {\color{#2}%
  82. \put(\start,#1){%
  83. \line(1, 0){\length}%
  84. }}%
  85. \put(\starttext,#1.5){\sffamily\footnotesize #7}%
  86. \put(\endtext,#1.5){\sffamily\footnotesize #8}%
  87. }
  88. \newcommand{\event}[2]{
  89. \textbf{#1} & {#2}\\
  90. }
  91. \newenvironment{events}{
  92. \begin{table}[h]
  93. \begin{tabular}{ll}
  94. }{
  95. \end{tabular}
  96. \end{table}
  97. }
  98. \endinput