Skip to content

Commit 23cbeb4

Browse files
updated book titles and images
1 parent 7a7e5f8 commit 23cbeb4

File tree

16 files changed

+40
-35
lines changed

16 files changed

+40
-35
lines changed

Diff for: atom.xml

+25-20
Large diffs are not rendered by default.

Diff for: books/index.html

+1-1
Large diffs are not rendered by default.

Diff for: counting-nested-braces/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</span><span> </span><span style=color:#72ab00;>if </span><span>re.</span><span style=color:#5597d6;>search</span><span>(</span><span style=color:#668f14;>r</span><span style=color:#d07711;>'</span><span style=color:#aeb52b;>[{}]</span><span style=color:#d07711;>'</span><span>, expr):
3838
</span><span> </span><span style=color:#72ab00;>return -</span><span style=color:#b3933a;>1
3939
</span><span> </span><span style=color:#72ab00;>return </span><span>count
40-
</span></code></pre><p><img alt=info src=/images/info.svg> I verified these solutions using <code>assert</code> statements. See <a href=https://learnbyexample.github.io/100_page_python_intro/testing.html>Testing</a> chapter from my <a href=https://github.com/learnbyexample/100_page_python_intro>100 Page Python Intro</a> ebook for more details.<p><img alt=info src=/images/info.svg> See <a href=https://learnbyexample.github.io/py_regular_expressions/working-with-matched-portions.html#resubn>Working with matched portions</a> chapter from my <a href=https://github.com/learnbyexample/py_regular_expressions>Python re(gex)?</a> ebook for more details about the <code>re.subn()</code> function.</p><br><h2 id=perl-one-liner>Perl one-liner<a aria-label="Anchor link for: perl-one-liner" class=zola-anchor href=#perl-one-liner>🔗</a></h2><p>Here's a solution for CLI enthusiasts:<pre style=background-color:#f5f5f5;color:#1f1f1f;><code><span>$ cat ip.txt
40+
</span></code></pre><p><img alt=info src=/images/info.svg> I verified these solutions using <code>assert</code> statements. See <a href=https://learnbyexample.github.io/100_page_python_intro/testing.html>Testing</a> chapter from my <a href=https://github.com/learnbyexample/100_page_python_intro>100 Page Python Intro</a> ebook for more details.<p><img alt=info src=/images/info.svg> See <a href=https://learnbyexample.github.io/py_regular_expressions/working-with-matched-portions.html#resubn>Working with matched portions</a> chapter from my <a href=https://github.com/learnbyexample/py_regular_expressions>Understanding Python re(gex)?</a> ebook for more details about the <code>re.subn()</code> function.</p><br><h2 id=perl-one-liner>Perl one-liner<a aria-label="Anchor link for: perl-one-liner" class=zola-anchor href=#perl-one-liner>🔗</a></h2><p>Here's a solution for CLI enthusiasts:<pre style=background-color:#f5f5f5;color:#1f1f1f;><code><span>$ cat ip.txt
4141
</span><span>{a+2}*{b+c}
4242
</span><span>{{a+2}*{{b+{c*d}}+e*d}}
4343
</span><span>a*b{

Diff for: customizing-pandoc/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</span><span style=color:#668f14;>\renewcommand</span><span>{</span><span style=color:#c23f31;>\texttt</span><span>}[1]{
4646
</span><span> </span><span style=color:#b39f04;>\colorbox</span><span>{Light}{</span><span style=color:#b39f04;>\oldtexttt</span><span>{#1}}
4747
</span><span>}
48-
</span></code></pre><p>Add <code>--highlight-style pygments.theme</code> and <code>--include-in-header inline_code.tex</code> to the script and generate the <code>pdf</code> again.<p>With <code>pandoc sample_2.md -f gfm -o sample_2.pdf</code> the output would be:<p><img alt="Default syntax highlighting" src=/images/pandoc_pdf/default_syn.png><p>With <code>./md2pdf_syn.sh sample_2.md sample_2_syn.pdf</code> the output is:<p><img alt="Customized syntax highlighting" src=/images/pandoc_pdf/customized_syn.png></p><br><p>For my <a href=https://github.com/learnbyexample/py_regular_expressions>Python re(gex)?</a> book, by chance I found that using <code>ruby</code> instead of <code>python</code> for REPL code snippets syntax highlighting was better. Snapshot from <code>./md2pdf_syn.sh sample_3.md sample_3.pdf</code> result is shown below. For <code>python</code> directive, string output gets treated as a comment and color for boolean values isn't easy to distinguish from string values. The <code>ruby</code> directive treats string value as expected and boolean values are easier to spot.<p><img alt="REPL syntax highlighting" src=/images/pandoc_pdf/python_vs_ruby_syn.png></p><br><h2 id=bullet-styling>Bullet styling<a aria-label="Anchor link for: bullet-styling" class=zola-anchor href=#bullet-styling>🔗</a></h2><p>This <a href=https://stackoverflow.com/q/22156999/4082052>stackoverflow Q&A</a> helped for bullet styling.<pre class=language-latex data-lang=latex style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-latex data-lang=latex><span style=color:#72ab00;>\usepackage</span><span>{</span><span style=color:#a2a001;>enumitem</span><span>}
48+
</span></code></pre><p>Add <code>--highlight-style pygments.theme</code> and <code>--include-in-header inline_code.tex</code> to the script and generate the <code>pdf</code> again.<p>With <code>pandoc sample_2.md -f gfm -o sample_2.pdf</code> the output would be:<p><img alt="Default syntax highlighting" src=/images/pandoc_pdf/default_syn.png><p>With <code>./md2pdf_syn.sh sample_2.md sample_2_syn.pdf</code> the output is:<p><img alt="Customized syntax highlighting" src=/images/pandoc_pdf/customized_syn.png></p><br><p>For my <a href=https://github.com/learnbyexample/py_regular_expressions>Understanding Python re(gex)?</a> book, by chance I found that using <code>ruby</code> instead of <code>python</code> for REPL code snippets syntax highlighting was better. Snapshot from <code>./md2pdf_syn.sh sample_3.md sample_3.pdf</code> result is shown below. For <code>python</code> directive, string output gets treated as a comment and color for boolean values isn't easy to distinguish from string values. The <code>ruby</code> directive treats string value as expected and boolean values are easier to spot.<p><img alt="REPL syntax highlighting" src=/images/pandoc_pdf/python_vs_ruby_syn.png></p><br><h2 id=bullet-styling>Bullet styling<a aria-label="Anchor link for: bullet-styling" class=zola-anchor href=#bullet-styling>🔗</a></h2><p>This <a href=https://stackoverflow.com/q/22156999/4082052>stackoverflow Q&A</a> helped for bullet styling.<pre class=language-latex data-lang=latex style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-latex data-lang=latex><span style=color:#72ab00;>\usepackage</span><span>{</span><span style=color:#a2a001;>enumitem</span><span>}
4949
</span><span style=color:#72ab00;>\usepackage</span><span>{</span><span style=color:#a2a001;>amsfonts</span><span>}
5050
</span><span>
5151
</span><span style=color:#7f8989;>% level one

Diff for: images/books/pyregex.png

-26.5 KB
Binary file not shown.

Diff for: images/books/vim_reference_guide.png

-34.5 KB
Binary file not shown.

Diff for: index.html

+1-1
Large diffs are not rendered by default.

Diff for: page/2/index.html

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)