This is an update on my old "Colourful Cheatsheet Template". It is based on the old one, so similar but not the same.
It still supports all the old visualization features and code listings using tcolorbox / minted. Just input the language you want (and that is supported by minted) in the codebox environment.
However, the style now is a bit less bright and mimicks the Metropolis beamer template in style (a bit).
This is the blogpost to go with it: https://latex-ninja.com/2021/10/01/a-new-version-of-the-colourful-cheatsheet-template/
This is an example illustating how to typeset code in LaTeX, especially in beamer presentations. It uses the metropolis theme.
It is a presentation with one slide per "technique" which include some explanatory comments.
Examples shown are minted, lstlisting, verbatim, tcolorbox and knitR. The main document has the ending ".Rtex" which is required if you want it to be able to run knitR. Otherwise, you can just use normal ".tex".
It is accompanied by a blog post with more information here.
In this blog post, some complications which can arise when using code listings in beamer are discussed (package clashes, etc.), so this might be informative if you want to learn more.
We study Logarithmically Spiral Trajectories and, in particular, we look for a solution to minimize the transit time of a Spacecraft propelled by a Solar Sail, while simultaneously minimizing the area of the Solar Sail, which would allow us to carry more payload on board. We start by analyzing the forces that act on the Spacecraft taking into account that its propellant is a Solar Sail; we use the studied forces to deduce the motion equations. We then solve this motion equation with a Runge-Kutta 4 method and transform the problem of minimizing time and area to a Non-linear Optimization problem. When solving the NLP we also try to minimize the relative final speed of th spacecraft with the destination planet in order to guarantee the possibility of a safe landing on its surface. The model improves when an angle parameter α (describing the angle formed by the Solar Sail with the colliding photons) is defined as a piecewise constant function and optimized whose values are optimized in every interval to minimize transit time and Area. Using the developed model to optimize the trajectory to be followed for sending from Earth to Mars a 2000kg-spacecraft propelled by a Solar Sail, subject to the condition that at trajectory start Mars and Earth were at their closest approach, and the Arrival Relative Velocity is less than 9km/s, give us a minimal transit time of 500days and a minimal area for the Solar Sail of 183158m2, meaning that the maximal payload would be 718kg. Compared with different number of partitions of α, the optimum stays stable. This gives a solid optimal trajectory and a great result for the numerical method used. Actually, waiting until the best moment to throw the Spacecraft, id est, Mars is at 1.14 radians respectively to Earth initial position, the minimal sail area 145950 m2 and, therefore, ables to transport until 978 kg of payload with the same transit time. In addition and to conclude we tried the model to optimize the inverse trajectory.
Marco Praderio Bova, Eneko Martin Martinez, & Maria dels Àngels Guinovart Llort
Ejemplo de uso del archivo arduino_code.tex que define el comando ArduinoSketch y el ambiente ArduinoSketchBox para incluir código arduino en documento LaTeX utilizando el resaltado de sintaxis propio de Arduino IDE