mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-25 09:36:31 -05:00
New posts
This commit is contained in:
parent
2eb3effb87
commit
c743dd70a2
4 changed files with 367 additions and 0 deletions
24
content/blog/latexlistlabels.md
Normal file
24
content/blog/latexlistlabels.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
title: "LaTex List Labels"
|
||||||
|
date: 2022-01-16T23:17:51-05:00
|
||||||
|
draft: false
|
||||||
|
tags: ["LaTex"]
|
||||||
|
math: false
|
||||||
|
---
|
||||||
|
|
||||||
|
A quick tip that I recently learned is that the symbols in a LaTex list item is changeable. In fact, the following technique works for both the `enumerate` and `itemize` environments.
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\begin{itemize}
|
||||||
|
\item[$\square$] Item 1
|
||||||
|
\item[$\triangle$] Item 2
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\begin{enumerate}
|
||||||
|
\item[$\rho_1$] Property 1
|
||||||
|
\item[$\rho_2$] Property 2
|
||||||
|
\item[$\rho_3$] Property 3
|
||||||
|
\end{enumerate}
|
||||||
|
```
|
||||||
|
|
||||||
|
![](/files/images/202201162357.svg)
|
55
content/blog/termtosvg.md
Normal file
55
content/blog/termtosvg.md
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
title: "Term To SVG"
|
||||||
|
date: 2022-01-17T10:14:22-05:00
|
||||||
|
draft: false
|
||||||
|
tags: []
|
||||||
|
math: false
|
||||||
|
---
|
||||||
|
|
||||||
|
With [`termtosvg`](https://github.com/nbedos/termtosvg) made by Nicolas Bedo we can make SVG animations from terminal output in the style of [asciinema](https://asciinema.org/). To install use [pipx](http://localhost:1313/blog/managepythonapps/).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pipx install termtosvg
|
||||||
|
```
|
||||||
|
|
||||||
|
To start recording, run the command `termtosvg`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
termtosvg
|
||||||
|
```
|
||||||
|
|
||||||
|
It first outputs:
|
||||||
|
|
||||||
|
```
|
||||||
|
Recording started, enter "exit" command or Control-D to end
|
||||||
|
```
|
||||||
|
|
||||||
|
At "exit", by default it will save the animation to a random filename in the tmp folder.
|
||||||
|
|
||||||
|
```
|
||||||
|
Rendering ended, SVG animation is /tmp/termtosvg_xmadgf9y.svg
|
||||||
|
```
|
||||||
|
|
||||||
|
To control the default save location, pass in a filename after `termtosvg`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
termtosvg /path/to/savefile.svg
|
||||||
|
```
|
||||||
|
|
||||||
|
To record only the execution of a particular command, use the flag `-c`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
termtosvg -c neofetch
|
||||||
|
```
|
||||||
|
|
||||||
|
I recommend that you resize the terminal window so that the frames generated match the desired width and height. You can instead use the `-g` flag to pass in a geometry. ("100x30" creates a screen with 100 colums and 30 rows)
|
||||||
|
|
||||||
|
Lastly, if you don't want an animation, you can pass in `-s` and the result will be a folder of SVG files representing each frame.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
termtosvg -s
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is an example of an animation I made with this tool:
|
||||||
|
|
||||||
|
![](/files/images/202201171031.svg)
|
164
static/files/images/202201162357.svg
Normal file
164
static/files/images/202201162357.svg
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
id="svg2"
|
||||||
|
xml:space="preserve"
|
||||||
|
width="160.70027"
|
||||||
|
height="242.33606"
|
||||||
|
viewBox="0 0 160.70027 242.33603"
|
||||||
|
sodipodi:docname="test.svg"
|
||||||
|
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||||
|
id="defs6" /><sodipodi:namedview
|
||||||
|
id="namedview4"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
showgrid="false"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:zoom="2.3264803"
|
||||||
|
inkscape:cx="27.939201"
|
||||||
|
inkscape:cy="124.65182"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1007"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g8" /><g
|
||||||
|
id="g8"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Test"
|
||||||
|
transform="matrix(1.3333333,0,0,-1.3333333,-152.98118,945.97132)"><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:MSAM10;-inkscape-font-specification:MSAM10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text12"
|
||||||
|
x="116.89151"
|
||||||
|
y="-695.86749"><tspan
|
||||||
|
x="116.89151"
|
||||||
|
y="-695.86749"
|
||||||
|
id="tspan10"
|
||||||
|
style="stroke-width:2">□</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMR10;-inkscape-font-specification:CMR10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text16"
|
||||||
|
x="142.3515"
|
||||||
|
y="-695.86749"><tspan
|
||||||
|
x="142.3515 149.54649 157.29541 166.15016 189.38893"
|
||||||
|
y="-695.86749"
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan14"
|
||||||
|
style="stroke-width:2">Item1</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMSY10;-inkscape-font-specification:CMSY10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text20"
|
||||||
|
x="114.67751"
|
||||||
|
y="-656.01752"><tspan
|
||||||
|
x="114.67751"
|
||||||
|
y="-656.01752"
|
||||||
|
id="tspan18"
|
||||||
|
style="stroke-width:2">△</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMR10;-inkscape-font-specification:CMR10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text24"
|
||||||
|
x="142.3515"
|
||||||
|
y="-656.01752"><tspan
|
||||||
|
x="142.3515 149.54649 157.29541 166.15016 189.38893"
|
||||||
|
y="-656.01752"
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan22"
|
||||||
|
style="stroke-width:2">Item2</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text28"
|
||||||
|
x="113.14751"
|
||||||
|
y="-612.18152"><tspan
|
||||||
|
x="113.14751"
|
||||||
|
y="-612.18152"
|
||||||
|
id="tspan26"
|
||||||
|
style="stroke-width:2">ρ</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:13.9476px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text32"
|
||||||
|
x="123.44951"
|
||||||
|
y="-609.19354"><tspan
|
||||||
|
x="123.44951"
|
||||||
|
y="-609.19354"
|
||||||
|
id="tspan30"
|
||||||
|
style="stroke-width:2">1</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMR10;-inkscape-font-specification:CMR10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text36"
|
||||||
|
x="142.3515"
|
||||||
|
y="-612.18152"><tspan
|
||||||
|
x="142.3515 155.9126 163.7173 173.6799 185.30824 194.16301 201.96771 209.15871 226.31032"
|
||||||
|
y="-612.18152"
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan34"
|
||||||
|
style="stroke-width:2">Property1</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text40"
|
||||||
|
x="113.14751"
|
||||||
|
y="-572.33148"><tspan
|
||||||
|
x="113.14751"
|
||||||
|
y="-572.33148"
|
||||||
|
id="tspan38"
|
||||||
|
style="stroke-width:2">ρ</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:13.9476px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text44"
|
||||||
|
x="123.44951"
|
||||||
|
y="-569.34351"><tspan
|
||||||
|
x="123.44951"
|
||||||
|
y="-569.34351"
|
||||||
|
id="tspan42"
|
||||||
|
style="stroke-width:2">2</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMR10;-inkscape-font-specification:CMR10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text48"
|
||||||
|
x="142.3515"
|
||||||
|
y="-572.33148"><tspan
|
||||||
|
x="142.3515 155.9126 163.7173 173.6799 185.30824 194.16301 201.96771 209.15871 226.31032"
|
||||||
|
y="-572.33148"
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan46"
|
||||||
|
style="stroke-width:2">Property2</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:19.9252px;font-family:CMR10;-inkscape-font-specification:'CMR10, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text48-3"
|
||||||
|
x="141.88194"
|
||||||
|
y="-531.81268"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan164"
|
||||||
|
x="141.88194"
|
||||||
|
y="-531.81268"
|
||||||
|
style="stroke-width:2">Property 3</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:19.9252px;font-family:CMMI10;-inkscape-font-specification:CMMI10;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text52"
|
||||||
|
x="113.14751"
|
||||||
|
y="-532.48151"><tspan
|
||||||
|
x="113.14751"
|
||||||
|
y="-532.48151"
|
||||||
|
id="tspan50"
|
||||||
|
style="stroke-width:2">ρ</tspan></text><text
|
||||||
|
transform="scale(1,-1)"
|
||||||
|
style="font-variant:normal;font-weight:normal;font-size:13.9476px;font-family:CMR7;-inkscape-font-specification:CMR7;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2"
|
||||||
|
id="text56"
|
||||||
|
x="123.44951"
|
||||||
|
y="-529.49152"><tspan
|
||||||
|
x="123.44951"
|
||||||
|
y="-529.49152"
|
||||||
|
id="tspan54"
|
||||||
|
style="stroke-width:2">3</tspan></text></g></svg>
|
After Width: | Height: | Size: 7.5 KiB |
124
static/files/images/202201171031.svg
Normal file
124
static/files/images/202201171031.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 81 KiB |
Loading…
Reference in a new issue