Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit 12d38c1

Browse files
committed
Fixed MathJax local config file and added some templates
1 parent ae6c4e8 commit 12d38c1

13 files changed

+160
-42
lines changed

source/_includes/custom/head.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
<!-- Printing rules -->
77
<link href="{{ root_url }}/stylesheets/print.css" media="print" rel="stylesheet" type="text/css">
88

9-
<!-- mathjax config similar to math.stackexchange -->
9+
<!-- mathjax config similar to drz.ac -->
1010
<script type="text/javascript"
11-
src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
12-
</script>
13-
<script type="text/javascript" src="/javascripts/MathJaxLocal.js">
11+
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML,https://vincenttam.github.io/javascripts/MathJaxLocal.js">
1412
</script>
1513

1614
<!-- START COPYING HERE -->
@@ -39,5 +37,3 @@
3937
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
4038

4139
<script type="text/javascript" src="/javascripts/FancyBoxLocal.js"></script>
42-
43-
<!-- vim:set sw=2: -->

source/_includes/custom/header.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ <h2>{{ site.subtitle }}</h2>
1313
<!-- TOP RIGHT RIBBON: END COPYING HERE -->
1414

1515
</hgroup>
16-
17-
<!-- vim:set sw=2: -->

source/_posts/2014-07-12-pappuss-hexagon-theorem.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ and $CD$.
1919
Let <span class="grp1">$R$</span> be the intersection point of $BF$
2020
and $CE$.
2121
Then <span class="grp1">$P,Q$</span> and <span class="grp1">$R$</span>
22-
are *collinear*. (i.e. The red dashed line and the red solid line
23-
are collinear.)
22+
are *collinear*. (i.e. The <span class="grp1">red dashed line</span>
23+
and the <span class="grp1">red solid line</span> are collinear.)
2424

2525
<!-- more -->
2626

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: post
3+
title: "Composition of Limits"
4+
date: 2014-11-08 21:27:29 +0800
5+
comments: true
6+
categories: math
7+
published: false
8+
---

source/about/index.markdown

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Introduction
1111

1212
1. A [GNU/Linux][GNU/Linux] user.
1313
2. Have used [LibreOffice][LibreOffice] for homework.
14-
3. Some differences in the appearance of documents across M$ and
14+
3. Some differences in the appearance of documents across M\$ and
1515
\*nix.
16-
4. Use $\rm \LaTeX$ & HTML for consistency[^markdown].
17-
5. Use [Vim][Vim] for efficient editing of source code.
16+
4. Use $\rm \LaTeX$ & HTML for consistency.[^markdown]
17+
5. Use [Vim] for efficient editing of source code.[^myvimmacros]
1818
6. Acquired knowledge in these areas.
1919
7. Forgotten some of them since I'm *not* a student in IT.
2020
8. Realised the need for writing down the code.
@@ -25,12 +25,40 @@ searched after years.
2525
I have *no* money to hire any IT support person, so I have to support
2626
myself.
2727

28+
[^markdown]:
29+
Finally, I've found out that writing in [Markdown][Markdown] is
30+
**much easier**.
31+
32+
[^myvimmacros]:
33+
I use some custom Vim macros as shorthand. You may view them
34+
[here][myvimmacros].
35+
2836
[GNU/Linux]: https://www.gnu.org/gnu/linux-and-gnu.en.html
2937
[LibreOffice]: https://www.libreoffice.org/
3038
[Vim]: http://www.vim.org/
3139
[Markdown]: http://daringfireball.net/projects/markdown/
40+
[myvimmacros]: /about/myvimmacros.html
41+
42+
My Math Notes
43+
---
3244

33-
[^markdown]: Finally, I've found out that writing in [Markdown][Markdown] is **much easier**.
45+
As the server on which I put my notes is going to close down, I put it
46+
here.
47+
48+
- Variation of parameters: [PDF][ODE], [source][ODE_src]
49+
- My thoughts on ${_nC_r}$: [PDF][ncr], [source][ncr_src]
50+
- Derivation of Vendermonde Determinant: [PDF][vendermonde],
51+
[source][vendermonde_src]
52+
53+
I use some [custom macros][mymacros] as shorthand.
54+
55+
[ODE]: /downloads/var_of_param.pdf
56+
[ODE_src]: /about/ode_src.html
57+
[ncr]: /downloads/diagram.pdf
58+
[ncr_src]: /about/source-code-of-my-thoughts-on-ncr.html
59+
[vendermonde]: /downloads/vendermonde_det.pdf
60+
[vendermonde_src]: /about/src-of-ven-det.html
61+
[mymacros]: /about/mymacros.html
3462

3563
My Old Blogs
3664
---
@@ -92,25 +120,6 @@ A testing repository which contains program code in the `master`
92120
branch and a GitHub project page built with Jekyll Bootstrap in the
93121
`gh-pages` branch.
94122

95-
[^not_it_student]: I reused the words from [my WordPress blog](http://blogueun.wordpress.com/2014/02/03/gnupg-encryption/).
96-
97-
My Math Notes
98123
---
99-
100-
As the server on which I put my notes is going to close down, I put it
101-
here.
102-
103-
- Variation of parameters: [PDF][ODE], [source][ODE_src]
104-
- My thoughts on ${_nC_r}$: [PDF][ncr], [source][ncr_src]
105-
- Derivation of Vendermonde Determinant: [PDF][vendermonde],
106-
[source][vendermonde_src]
107-
108-
I use some [custom macros][mymacros] as shorthand.
109-
110-
[ODE]: /downloads/var_of_param.pdf
111-
[ODE_src]: /about/ode_src.html
112-
[ncr]: /downloads/diagram.pdf
113-
[ncr_src]: /about/source-code-of-my-thoughts-on-ncr.html
114-
[vendermonde]: /downloads/vendermonde_det.pdf
115-
[vendermonde_src]: /about/src-of-ven-det.html
116-
[mymacros]: /about/mymacros.html
124+
[^not_it_student]: I reused the words from [my WordPress blog][wp_pp].
125+
[wp_pp]: http://blogueun.wordpress.com/2014/02/03/gnupg-encryption/

source/about/mymacros.markdown

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,106 @@ title: "My $\\rm \\LaTeX$ Macros for Math Writing"
44
date: 2014-11-08 19:39
55
comments: true
66
sharing: true
7-
footer: true
7+
footer: false
88
---
99

1010
Basically, I just copied all the custom macros defined in
1111
[the local configuration file][MathJaxLoc] `MathJaxLocal.js` and
1212
adapted it for `mymacros.sty`.
1313

14-
Results
14+
Sample output
1515
---
1616

1717
![sample](/images/posts/mymacros/sample.jpg)
1818

19-
Code
19+
Using the macros
20+
---
21+
22+
Since I want *both* the simplicity of Markdown syntax and the
23+
convenience of using Vim-$\rm \LaTeX$, I use `.tex` as the file
24+
extension of the pandoc document. If you mind the *wrong* syntax
25+
highlighting, you may use `.mkd` or whatever way you want.
26+
27+
{% codeblock My sample pandoc document lang:yaml %}
28+
{% raw %}
29+
---
30+
title: Write Efficiently in Markdown!
31+
author: Vincent Tam
32+
date: \today
33+
geometry: margin=1in
34+
header-includes:
35+
- \usepackage{mymacros}
36+
---
37+
38+
# Section 1: sample code block
39+
40+
Use the *following* command to generate a PDF file.
41+
42+
$ pandoc -f markdown+yaml_metadata_block foo.tex -o foo.pdf
43+
44+
The file extension `.tex` is for using Vim-\LaTeX.
45+
46+
## Subsection 1.1: sample math
47+
48+
Suppose that $\vect{x} \ne \zeros \in \complex^n, \rationals^n, \integers^n,
49+
\naturals^n$. Then we have
50+
51+
(@foo) $$\int_{0}^{1} 1 \ud x = \abs{1} =
52+
\normlr{\frac{\vect{x}}{\norm{\vect{x}}}}.$$
53+
54+
# Section 2: sample list
55+
56+
One can refer to (@foo). Here's a numbered list.
57+
58+
1. Sample link to pandoc's [markdown syntax][pandoc_markdown]
59+
2. Sample link to my blog: <https://vincenttam.github.io>
60+
- Sample item: my introduction is under `/about`.
61+
- Sample item: the blog archive is under `/archive`.
62+
3. Sample item.
63+
64+
# Section 3: sample picture
65+
66+
It's **not** so easy to insert pictures in \LaTeX, while it's *simple* in
67+
Markdown.
68+
69+
![Title](fig1.png)
70+
71+
[pandoc_markdown]: http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html
72+
{% endraw %}
73+
{% endcodeblock %}
74+
75+
Here's [the sample output PDF file][output_pdf] and
76+
[the picture used][output_png] in the document. I refered to the
77+
following pages while writing the above example.
78+
79+
1. Pandoc [markdown syntax][pandoc_markdown]
80+
2. Using YAML metadata block as header.[^yaml_metadata_block]
81+
3. Adding numbered equations in pandoc.[^pandoc_num_eq]
82+
83+
Source code for the macros
2084
---
2185

2286
{% include_code My custom macros lang:tex mymacros/mymacros.sty %}
2387

2488
{% include_code Sample output lang:tex mymacros/test_macros.tex %}
2589

90+
The use of the `varwidth` option before the `standalone` class is for
91+
line breaks and the displayed equation at the first line in the sample
92+
output.[^varwidth] Loading the `amsfonts` packages avoid an
93+
"undefined control sequence error".[^amsfonts]
94+
95+
---
96+
[^varwidth]: See [this page][texse82736] for details.
97+
[^amsfonts]: See [this page][texse38771] for details.
98+
[^yaml_metadata_block]: See [this page][texse139139] for details.
99+
[^yaml_metadata_block]: See [this page][texse139139] for details.
100+
[^pandoc_num_eq]: See [this page][texse111868] for details.
101+
26102
[MathJaxLoc]: /javascripts/MathJaxLocal.js
103+
[output_pdf]: /downloads/foo.pdf
104+
[output_png]: /images/posts/mymacros/fig1.png
105+
[pandoc_markdown]: http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html
106+
[texse82736]: http://tex.stackexchange.com/a/82736 "\documentclass[convert]{standalone} ignores linebreak"
107+
[texse38771]: http://tex.stackexchange.com/a/38771 "\mathbb{Z} yields undefined control sequence error"
108+
[texse139139]: http://tex.stackexchange.com/q/139139 "Adding headers and footers using Pandoc"
109+
[texse111868]: http://tex.stackexchange.com/q/111868 "Pandoc: How can I get numbered LaTeX equations to show up in both PDF and HTML output"

source/about/myvimmacros.markdown

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: page
3+
title: "My Vim Macros for Quick Text Editing"
4+
date: 2014-11-09 13:16
5+
comments: true
6+
sharing: true
7+
footer: false
8+
---
9+
10+
The macros are for writing math in $\rm \LaTeX$, Octopress posts,
11+
HTML, etc.
12+
13+
{% codeblock The list of my Vim macros lang:vim %}
14+
"b \mathbf
15+
"c \mathcal
16+
"f \forall
17+
"g &gt;
18+
"i é
19+
"j è
20+
"l &lt;
21+
"m <!-- more -->
22+
"t target="_blank"
23+
"z $\rm \LaTeX$
24+
{% endcodeblock %}

source/about/ode_src.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Source Code of My ODE Notes"
44
date: 2014-03-22 12:19
55
comments: true
66
sharing: true
7-
footer: true
7+
footer: false
88
---
99

1010
{% include_code Explanation to Wikipedia's Variation of Parameters var_of_param.tex %}

source/about/source-code-of-my-thoughts-on-ncr.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Source Code of My Thoughts on ${_nC_r}$"
44
date: 2014-03-29 22:35
55
comments: true
66
sharing: true
7-
footer: true
7+
footer: false
88
---
99

1010
{% include_code A $\rm \LaTeX$ Sample Diagram diagram.tex %}

source/about/src-of-ven-det.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Source Code of Derivation of Vendermonde Determinant"
44
date: 2014-05-18 15:02
55
comments: true
66
sharing: true
7-
footer: true
7+
footer: false
88
---
99

1010
{% include_code Formula of Verdermonde Determinant vendermonde_det.tex %}

0 commit comments

Comments
 (0)