Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

182 linhas
5.3 KiB

  1. \documentclass[a4paper,12pt]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[T1]{fontenc}
  4. \usepackage[margin=25mm]{geometry}
  5. \usepackage{graphicx}
  6. \usepackage{hyperref}
  7. \usepackage{xcolor}
  8. \usepackage{fp}
  9. % Command showing the Moon phase
  10. \newcommand{\moonphase}[2]{
  11. \begin{center}
  12. \begin{minipage}{2cm}
  13. \includegraphics[width=\linewidth]{#1}
  14. \end{minipage}
  15. \hspace{5mm}
  16. \begin{minipage}{7cm}
  17. \textbf{\currentmoonphasetitle}\\#2
  18. \end{minipage}
  19. \end{center}
  20. }
  21. % Environment for the ephemerides, when --no-graph is given on the command line
  22. \newenvironment{ephemerides}{
  23. \begin{table}[h]
  24. \centering
  25. \begin{tabular}{lccc}
  26. \textbf{\ephemeridesobjecttitle} &
  27. \textbf{\ephemeridesrisetimetitle} &
  28. \textbf{\ephemeridesculminationtimetitle} &
  29. \textbf{\ephemeridessettimetitle}\\
  30. \hline
  31. }{
  32. \end{tabular}
  33. \end{table}
  34. }
  35. % Command adding an object to the ephemerides environment
  36. \newcommand{\object}[4]{
  37. \hline
  38. \textbf{#1} & {#2} & {#3} & {#4}\\
  39. }
  40. % Environment to insert the ephemerides graph
  41. \newenvironment{graphephemerides}{\setlength{\unitlength}{0.02\linewidth}
  42. \begin{picture}(20,20)
  43. % Axes
  44. \put(0,-2){\vector(1,0){50}}
  45. \multiput(0,-2)(2,0){24}{
  46. \line(0,-1){0.25}
  47. }
  48. \newcounter{hour}
  49. \multiput(-0.25,-3.5)(4,0){12}{
  50. \sffamily\footnotesize
  51. \arabic{hour}\stepcounter{hour}\stepcounter{hour}
  52. }
  53. \put(49,-3.5){\sffamily\footnotesize \hourslabel}
  54. % Graduation
  55. \put(50,-0.5){\sffamily\footnotesize \Pluto}
  56. \put(50,1.5){\sffamily\footnotesize \Neptune}
  57. \put(50,3.5){\sffamily\footnotesize \Uranus}
  58. \put(50,5.5){\sffamily\footnotesize \Saturn}
  59. \put(50,7.5){\sffamily\footnotesize \Jupiter}
  60. \put(50,9.5){\sffamily\footnotesize \Mars}
  61. \put(50,11.5){\sffamily\footnotesize \Venus}
  62. \put(50,13.5){\sffamily\footnotesize \Mercury}
  63. \put(50,15.5){\sffamily\footnotesize \Moon}
  64. \put(50,17.5){\sffamily\footnotesize \Sun}
  65. \multiput(0,0)(0,2){10}{
  66. \color{gray}\line(1,0){48}
  67. }
  68. \linethickness{1.5mm}
  69. }{
  70. \end{picture}
  71. \vspace{1cm}
  72. }
  73. % Command to add an object to the graph
  74. \newcommand{\graphobject}[8]{%
  75. % #1: Y coordinate component
  76. % #2: Color
  77. % #3: Hour rise time
  78. % #4: Minute rise time
  79. % #5: Hour set time
  80. % #6: Minute set time
  81. % #7: Human-readable rise time
  82. % #8: Human-readable set time
  83. \FPeval{\start}{#3*2+(#4/60)*2}%
  84. \FPeval{\length}{#5*2+(#6/60)*2 - \start}%
  85. \FPeval{\starttext}{\start+0.7}%
  86. \FPeval{\endtext}{\start+\length-3.25}%
  87. {\color{#2}%
  88. \put(\start,#1){%
  89. \line(1, 0){\length}%
  90. }}%
  91. \put(\starttext,#1.5){\sffamily\footnotesize #7}%
  92. \put(\endtext,#1.5){\sffamily\footnotesize #8}%
  93. }
  94. \newcommand{\event}[2]{
  95. \textbf{#1} & {#2}\\
  96. }
  97. \newenvironment{events}{
  98. \begin{table}[h]
  99. \begin{tabular}{ll}
  100. }{
  101. \end{tabular}
  102. \end{table}
  103. }
  104. % Commands to handle the translated strings
  105. \newcommand{\currentmoonphasetitle}{Moon phase:}
  106. \newcommand{\ephemeridesobjecttitle}{Object}
  107. \newcommand{\ephemeridesrisetimetitle}{Rise time}
  108. \newcommand{\ephemeridesculminationtimetitle}{Culmination time}
  109. \newcommand{\ephemeridessettimetitle}{Set time}
  110. \newcommand{\hourslabel}{hours}
  111. \newcommand{\Pluto}{Pluto}
  112. \newcommand{\Neptune}{Neptune}
  113. \newcommand{\Uranus}{Uranus}
  114. \newcommand{\Saturn}{Saturn}
  115. \newcommand{\Jupiter}{Jupiter}
  116. \newcommand{\Mars}{Mars}
  117. \newcommand{\Venus}{Venus}
  118. \newcommand{\Mercury}{Mercury}
  119. \newcommand{\Moon}{Moon}
  120. \newcommand{\Sun}{Sun}
  121. % Fix Unicode issues
  122. \DeclareUnicodeCharacter{202F}{~}
  123. \DeclareUnicodeCharacter{00B0}{$^\circ$}
  124. \hypersetup{pdfinfo={%
  125. Title={Overview of your sky},
  126. Creator={Kosmorro v0.10.12}
  127. }}
  128. \pagenumbering{gobble}
  129. \setcounter{secnumdepth}{0}
  130. \title{\sffamily\href{http://kosmorro.space}{\includegraphics[width=5cm]{__PROJECT_PATH__/assets/png/kosmorro-logo.png}}\\Overview of your sky}
  131. \date{\vspace{-11mm}\sffamily Monday, January 27, 2020}
  132. \begin{document}
  133. \maketitle
  134. This document summarizes the ephemerides and the events of Monday, January 27, 2020. It aims to help you to prepare your observation session. All the hours are given in UTC.
  135. Don't forget to check the weather forecast before you go out with your equipment.
  136. \moonphase{__PROJECT_PATH__/assets/moonphases/png/new-moon.png}{New Moon}
  137. %%% BEGIN-EPHEMERIDES-SECTION
  138. \section{\sffamily Ephemerides of the day}
  139. \begin{graphephemerides}%
  140. \graphobject{18}{gray}{7}{31}{16}{30}{7:31 AM}{4:30 PM}\graphobject{16}{gray}{9}{6}{19}{13}{9:06 AM}{7:13 PM}\graphobject{14}{gray}{8}{10}{17}{28}{8:10 AM}{5:28 PM}\graphobject{12}{gray}{9}{1}{20}{10}{9:01 AM}{8:10 PM}\graphobject{10}{gray}{4}{19}{12}{28}{4:19 AM}{12:28 PM}\graphobject{8}{gray}{6}{15}{14}{21}{6:15 AM}{2:21 PM}\graphobject{6}{gray}{6}{56}{15}{22}{6:56 AM}{3:22 PM}\graphobject{4}{gray}{0}{0}{0}{33}{}{12:33 AM}\graphobject{4}{gray}{10}{21}{24}{0}{10:21 AM}{}\graphobject{2}{gray}{9}{1}{20}{10}{9:01 AM}{8:10 PM}\graphobject{0}{gray}{6}{57}{15}{11}{6:57 AM}{3:11 PM}
  141. \end{graphephemerides}
  142. %%% END-EPHEMERIDES-SECTION
  143. %%% BEGIN-EVENTS-SECTION
  144. \section{\sffamily Expected events}
  145. \begin{events}
  146. \event{8:00 PM}{Venus and Neptune are in conjunction}
  147. \end{events}
  148. %%% END-EVENTS-SECTION
  149. \end{document}