Skip to content

Commit cd40c32

Browse files
committed
Fix doc
1 parent 20c2192 commit cd40c32

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# readme2tex
22
Renders LaTeX for Github Readmes
33

4-
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/d27ecd9d6334c7a020001926c8000801.svg?invert_in_darkmode" align=middle width=159.690135pt height=30.925785pt/></p>
4+
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/d27ecd9d6334c7a020001926c8000801.svg?invert_in_darkmode" align=middle width=159.69013499999997pt height=30.925784999999998pt/></p>
55

66
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/a00f34be6b1ce8e4820c9852c5e6163e.svg" align=middle width=281.2953pt height=243.69345pt/></p>
77

@@ -10,7 +10,7 @@ Renders LaTeX for Github Readmes
1010
----------------------------------------
1111

1212
`readme2tex` is a Python script that "texifies" your readme. It takes in Github Markdown and
13-
replaces anything enclosed between dollar signs with rendered <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058005pt height=22.40667pt/>.
13+
replaces anything enclosed between dollar signs with rendered <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058004999999994pt height=22.40667000000001pt/>.
1414

1515
In addition, unlike the other Github TeX renderers, `readme2tex` ensures that inline mathematical expressions
1616
are properly aligned with the rest of the text to avoid giving a "jumpy" look to the document.
@@ -56,7 +56,7 @@ of what you can do in `readme2tex`.
5656
### Examples:
5757

5858
Here's a display level equation
59-
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/32737e0a8d5a4cf32ba3ab1b74902ab7.svg?invert_in_darkmode" align=middle width=127.89183pt height=39.30498pt/></p>
59+
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/32737e0a8d5a4cf32ba3ab1b74902ab7.svg?invert_in_darkmode" align=middle width=127.89182999999998pt height=39.30498pt/></p>
6060

6161
The code that was used to render this equation is just
6262

@@ -68,20 +68,20 @@ The code that was used to render this equation is just
6868

6969
Here's an inline equation.
7070

71-
> It is well known that if <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/162f63774d8a882cc15ae1301cfd8ac0.svg?invert_in_darkmode" align=middle width=119.011695pt height=26.70624pt/>, then <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/584fa2612b78129d140fb208e9d76ae9.svg?invert_in_darkmode" align=middle width=112.358235pt height=33.20526pt/>.
71+
> It is well known that if <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/162f63774d8a882cc15ae1301cfd8ac0.svg?invert_in_darkmode" align=middle width=119.01169499999999pt height=26.70624000000001pt/>, then <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/584fa2612b78129d140fb208e9d76ae9.svg?invert_in_darkmode" align=middle width=112.358235pt height=33.20525999999999pt/>.
7272
7373
The code that was used to render this is:
7474

7575
It is well known that if $ax^2 + bx + c = 0$, then $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
7676

7777
Notice that the equations line up with the baseline of the text, even when the height of these two images are different.
7878

79-
Sometimes, you might run into equations that are bottom-heavy, like <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/4cb4ead947a07837121937c807973436.svg?invert_in_darkmode" align=middle width=47.63913pt height=37.03227pt/>. Here, `readme2tex`
79+
Sometimes, you might run into equations that are bottom-heavy, like <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/4cb4ead947a07837121937c807973436.svg?invert_in_darkmode" align=middle width=47.639129999999994pt height=37.03226999999998pt/>. Here, `readme2tex`
8080
can compute the correct offset to align this equation to the baseline of your paragraph of text as well.
8181

8282
#### Tikz (Courtesy of http://www.texample.net/)
8383

84-
Did you notice the picture at the top of this page? That was also generated by <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058005pt height=22.40667pt/>. `readme2tex` is capable of
84+
Did you notice the picture at the top of this page? That was also generated by <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058004999999994pt height=22.40667000000001pt/>. `readme2tex` is capable of
8585
handling Tikz code. For reference, the picture
8686

8787
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/522cbfbc866df378cb95b2ef083131b2.svg" align=middle width=281.2953pt height=243.69345pt/></p>
@@ -109,7 +109,7 @@ is given by the tikz code
109109

110110
We can see a few other examples, such as this graphical proof of the Pythagorean Theorem.
111111

112-
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/e148d2d3bb31215788cc03f9b472e5ba.svg?invert_in_darkmode" align=middle width=328.0629pt height=374.83545pt/></p>
112+
<p align="center"><img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/e148d2d3bb31215788cc03f9b472e5ba.svg?invert_in_darkmode" align=middle width=328.06289999999996pt height=374.83545pt/></p>
113113

114114
How about a few snowflakes?
115115

@@ -126,18 +126,17 @@ In addition, you can specify other arguments to `render.py`, such as:
126126

127127
* `--readme READOTHER.md` The raw readme to process. Defaults to `READOTHER.md`.
128128
* `--output README.md` The processed readme.md file. Defaults to `README_GH.md`.
129-
* `--usepackage tikz` Addition packages to use during <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058005pt height=22.40667pt/> compilation. You can specify this multiple times.
129+
* `--usepackage tikz` Addition packages to use during <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058004999999994pt height=22.40667000000001pt/> compilation. You can specify this multiple times.
130130
* `--svgdir svgs/` The directory to store the output svgs. The default is `svgs/`
131131
* `--branch master` *Experimental* Which branch to store the svgs into, the default is just master.
132132
* `--username username` Your github username. This is optional, and `render.py` will try to infer this for you.
133133
* `--project project` The current github project. This is also optional.
134134
* `--nocdn` Ticking this will use relative paths for the output images. Defaults to False.
135135
* `--htmlize` Ticking this will output a `md.html` file so you can preview what the output looks like. Defaults to False.
136136
* `--valign` Ticking this will use the `valign` trick (detailed below) instead. See the caveats section for tradeoffs.
137-
* `--rerender` Ticking this will force a recompilation of all <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058005pt height=22.40667pt/> equations even if they are already cached.
137+
* `--rerender` Ticking this will force a recompilation of all <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/c068b57af6b6fa949824f73dcb828783.svg?invert_in_darkmode" align=middle width=42.058004999999994pt height=22.40667000000001pt/> equations even if they are already cached.
138138
* `--bustcache` Ticking this will ensure that Github renews its image cache. Github may sometimes take up to an hour for changed images to reappear. This is usually not necessary unless you've made stylistic changes.
139139
* `--add-git-hook` Ticking this will generate a post-commit hook for git that runs readme2tex with the rest of the specified arguments after each `git commit`.
140-
* `--generate-script script.sh` Generates the above script, but at `script.sh`.
141140

142141
My usual workflow is to create a secondary branch just for the compiled svgs. You can accomplish this via
143142

@@ -167,7 +166,7 @@ is the exact middle of the image. For IE and Edge however, the center is about 5
167166
above the exact center. Since this looks great for non-IE browsers, and reasonably good on Edge, this is the default
168167
rendering method. The trick here is to pad either the top or the bottom of the image with extra spaces until the
169168
baseline of the equation is at the center. For most equations, this works great. However, if you have a tall equation,
170-
like <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/bdd0f9b91b7fff7fe5a2b1b7684a96ef.svg?invert_in_darkmode" align=middle width=56.166495pt height=71.68986pt/>, you'll notice that there might be a lot
169+
like <img src="https://rawgit.com/leegao/readme2tex/svgs/svgs/bdd0f9b91b7fff7fe5a2b1b7684a96ef.svg?invert_in_darkmode" align=middle width=56.166495pt height=71.68985999999998pt/>, you'll notice that there might be a lot
171170
of slack vertical spacing between these lines. If this is a deal-breaker for you, you can always try the `--valign True`
172171
mode. For most inline equations, this is usually a non-issue.
173172

READOTHER.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ In addition, you can specify other arguments to `render.py`, such as:
261261
* `--rerender` Ticking this will force a recompilation of all $\text{\LaTeX}$ equations even if they are already cached.
262262
* `--bustcache` Ticking this will ensure that Github renews its image cache. Github may sometimes take up to an hour for changed images to reappear. This is usually not necessary unless you've made stylistic changes.
263263
* `--add-git-hook` Ticking this will generate a post-commit hook for git that runs readme2tex with the rest of the specified arguments after each `git commit`.
264-
* `--generate-script script.sh` Generates the above script, but at `script.sh`.
265264

266265
My usual workflow is to create a secondary branch just for the compiled svgs. You can accomplish this via
267266

0 commit comments

Comments
 (0)