Viernes 1ro de oncenbre

¡No lo puedo cree! El día bisiesto estaba bien una cosa, el segundo bisiesto era un poco mucho, pero todo un mes extra es demasiado.  

De todas maneras estoy más preocupado por el 13/13/2020. Suena mal. Suena mal.

2020/12/30

(Near) total eclipse of December 14, 2020


A few days ago there was a partial eclipse here in Buenos Aires (79% <<<< 100%). It was a total eclipse about 600mi from here, but due to the pandemic and work we could not go to see it.

It was almost at noon. It was weird because everything looked normal but in low light. The sky had the normal light blue color, it was not gray like a cloudy day or reddish like a sunset. Everything had normal coloring, but in low light.

I did not had time to build a homemade camera obscura, but the leaves of the trees form small holes that have the same effect, and you can see the image of the Sun in the shape of a crescent (moon) on the ground. (It is a very strange combination of words.) With the wind the little holes move, appear and disappear, so there are dancing crescents. The effect is very nice.

Photo of shadows during the eclipse.

For comparison, I tried to take a few additional photos three days later at the same time, because it's always good to have something as close to a control group as possible. I didn't find a photo of the previous spot, but I like the it anyway. So here are two photos comparing a nearby site.

Photo of shadows during the eclipse.

 


Photo of shadows during the eclipse.

2020/06/25

Equations system with a black rectangle in LaTeX

A friend sent me a file in LaTeX that she had received. When compiling it, one of the equations had a strange black rectangle:
The file was about 20 pages long. After minimizing and minimizing the file, I got this simplified version:

\documentclass[12pt]{article}

\usepackage[table]{xcolor}



\begin{document}

\centering


Some initial text.



\[

  \begin{array}{c}

    \rowcolor{red}

      1 + 2 = 3 \\

    \rowcolor{green}

      1 + 2 = 3 \\

    \rowcolor{blue}

  \end{array}

\]




Some random two pages of text here \\

just to make debugging difficult.



\[

  \left\{

    \begin{array}{rrrrrrr}

       2x &+& y &+& 4z &=& 0\\

        x &+& 6y &+& 7z &=& 0\\

    \end{array}

  \right.

\]



Some final text.



\end{document}


Can you spot the error? In case you can't mentally compile LaTeX, the result is:

Now, is it easier to find the error?

[spoiler alert]

Well, the problem is in the previous table, it has the declaration of the color of the “last” row that does not exist. In the original version, it was a commented row, making it more difficult to spot. Moreover, between one table and the equations system there were one or two pages, making it more difficult to see that the error was actually caused by something that was much earlier than the position where it appeared.
\[

  \begin{array}{c}

    \rowcolor{red}

      1 + 2 = 3 \\

    \rowcolor{green}

      1 + 2 = 3 \\

    \rowcolor{blue}    % <---- the error is here

  \end{array}

\]



The strangest thing is that you get a black rectangle instead of a blue rectangle. I suppose some flag is set that says that there is something interesting in the next cell, but  the color is reset and that is why it is black. I've been looking at the xcolor package code, but my LaTeX-Fu is not strong enough. (It is not even clear to me if this is classified as a bug or not.) And furthermore, there is a workaround that is not to write LaTex with errors.


Bonus: The error is in the first part, so with a trivial change in the second part we can get a matrix or table with a strange black cell.
\begin{center}

  \begin{tabular}{|c|c| c|}

     \hline

      a  &  b  &  c  \\

     \hline

     $1$ & $2$ & $3$ \\

     \hline

  \end{tabular}

\end{center}

Sistema de ecuaciones con un rectángulo negro en LaTeX

Una amiga me pasó un archivo en LaTeX que había recibido. Al compilarlo una de las ecuaciones tenía un extraño rectángulo negro:
El archivo tenía unas 20 páginas. Después de minimizar y minimizar el archivo, llegué a esta versión simplificada:
\documentclass[12pt]{article}

\usepackage[table]{xcolor}



\begin{document}

\centering


Some initial text.



\[

  \begin{array}{c}

    \rowcolor{red}

      1 + 2 = 3 \\

    \rowcolor{green}

      1 + 2 = 3 \\

    \rowcolor{blue}

  \end{array}

\]




Some random two pages of text here \\

just to make debugging difficult.



\[

  \left\{

    \begin{array}{rrrrrrr}

       2x &+& y &+& 4z &=& 0\\

        x &+& 6y &+& 7z &=& 0\\

    \end{array}

  \right.

\]



Some final text.



\end{document}


¿Podés encontrar el error? Por si no podés compilar LaTeX mentalmente, el resultado es:
¿Ahora es más fácil encontrar el error?

[spoiler alert]

Bueno, el problema está en la tabla anterior, tiene declarado el color de la “última” fila que no existe. En la versión original, era una fila comentada, lo que hacía que sea más difícil notarla. Es más, entre una tabla y el sistema de ecuaciones había una o dos páginas, por lo que era más difícil ver que el error en realidad era causado por algo que estaba mucho antes de la posición en la que se veía
\[

  \begin{array}{c}

    \rowcolor{red}

      1 + 2 = 3 \\

    \rowcolor{green}

      1 + 2 = 3 \\

    \rowcolor{blue}    % <---- the error is here

  \end{array}

\]



Lo más extraño es que aparece un rectángulo negro en vez de un rectángulo azul. Supongo que queda seteado un flag de que hay algo interesante en la próxima celda, pero el color se resetea y por eso es negro. Estuve viendo el código del paquete xcolor, pero mi LaTeX-Fu no es lo suficientemente fuerte. (Ni siquiera me queda claro si esto se clasifica como un bug o no.) Y además hay una solución que es no escribir LaTex con errores.


Bonus: El error está en la primera parte, así que con un cambio trivial en la segunda parte podemos obtener una matriz o una tabla con una extraña celda negra.
\begin{center}

  \begin{tabular}{|c|c| c|}

     \hline

      a  &  b  &  c  \\

     \hline

     $1$ & $2$ & $3$ \\

     \hline

  \end{tabular}

\end{center}