diff --git a/_posts/2025-12-10-2nd-diff.md b/_posts/2025-12-10-2nd-diff.md
index e69426d..23ac34e 100644
--- a/_posts/2025-12-10-2nd-diff.md
+++ b/_posts/2025-12-10-2nd-diff.md
@@ -110,13 +110,13 @@ Again, because it goes from (d1)1 to (d1)n
Tn = a1 + (n - 1)a2 + ((1 + 2 + 3 + ... + (n - 3) + (n - 2) + (n - 1)) + (n - 1)(-1))d2.
-Now the pattern is easier to see. It is the sum of integers to (n - 1):
+Now the pattern is easier to see. It is the sum of integers from 1 to (n - 1):
Tn = a1 + (n - 1)a2 + (Sn-1 + (n - 1)(-1))d2
= a1 + (n - 1)a2 + (Sn-1 - (n - 1))d2.
-Luckily for us, the great mathematician Gauss found a closed-form solution for finding the sum of integers to n when he was apparently 9 years-old or something (dubious):
+Luckily for us, the great mathematician Gauss had already found a closed-form solution for finding the sum of integers from 1 to n when he was apparently 9 years-old or something (dubious):
Tn = a1 + (n - 1)a2 + (1/2(n - 1)((n - 1) + 1) - (n - 1))d2
diff --git a/_site/404.html b/_site/404.html
index 08f89c2..e7c6c86 100644
--- a/_site/404.html
+++ b/_site/404.html
@@ -9,16 +9,16 @@
-
-
+
+
+{"@context":"https://schema.org","@type":"WebPage","description":"Technical blog","headline":"de_soot","url":"https://de-soot.github.io/404.html"}
-
+
If you found this blog post useful, leave a comment down below! Also check out how to add giscus comments to your own website on my previous guide for it.
diff --git a/_site/feed.xml b/_site/feed.xml
index a11725e..7760e0b 100644
--- a/_site/feed.xml
+++ b/_site/feed.xml
@@ -1,4 +1,224 @@
-Jekyll2025-12-10T10:58:32+08:00http://localhost:4000/feed.xmlde_sootTechnical blog2’s Complement Derivation2025-12-08T00:00:00+08:002025-12-08T00:00:00+08:00http://localhost:4000/2s-complementIf you have ever taken CS in high school or college, you have probably been taught about how to represent negative numbers in binary using 2’s complement.
+Jekyll2025-12-11T18:42:53+08:00https://de-soot.github.io/feed.xmlde_sootTechnical blog2nd Difference Formula Proof2025-12-10T00:00:00+08:002025-12-10T00:00:00+08:00https://de-soot.github.io/2nd-diff1. Preamble
+
+
During junior high school, I was introduced to a formula for finding the nth term of a certain sequence with a second difference that went something like:
+
+
Tn = 1/2(n)2 - 1/2(n) + 1, for a sequence 1, 2, 4, 7 ... and n >= 1.
+
+
At first, the formula seemed quite random (similar to the quadratic formula) and I could not wrap my head around it at the time.
+
+
I wondered how adding a second difference could make the trivial arithmetic formula so complex, and I was inspired by a textbook I was reading (“Concrete Mathematics” by Donald Knuth), so I tried to derive the formula myself.
+I also did not like to use things I did not understand, and there is no better way to understand something than to make it yourself from scratch.
+
+
I wrote this blog post to share in hopes that someone may find it useful.
+
+
2. What is a 2nd Difference?
+
+
Say there is a sequence 1, 2, 4, 7 ....
+You may have come across quite a few of these types of sequences on IQ tests and whatnot, and it is easy to find that the fifth term is 11 and so on.
+
+
However, it is obvious at a glance that the sequence does not follow the familiar arithmetic or geometric formulas, so we cannot yet find an arbitrary nth term of the sequence without knowing the previous terms.
+Finding the general formula for this will be the goal of this derivation.
+
+
The difference or ratio between every term and its subsequent term is not constant, unlike what is needed for a+(n-1)d or arn-1 to work properly.
+Instead, the difference (which we will now call the ‘first difference’) increases by a constant amount as the sequence goes on.
+
+
We can see this clearly if we construct a new sequence from the first differences:
+
+
T2 - T1 = 2 - 1 = 1;
+
+
T3 - T2 = 4 - 2 = 2;
+
+
T4 - T3 = 7 - 4 = 3;
+
+
…
+
+
so the sequence of first differences is:
+
+
1, 2, 3 ....
+
+
Unlike the original sequence, it is easy to see that this sequence has a constant difference of one, so the nth term can be found using the familiar formula (albeit with some notation modifications):
+
+
(d1)n = a2 + (n - 1)d2, for n >= 1,
+
+
where (d1)n is the nth first difference, a2 is the first term of the sequence of first differences (a1 would be the first term of the original sequence), and d2 is the difference for the sequence of first differences (or the second difference).
+
+
3. Derivation of the Formula
+
+
Using the approach we naturally used to find that 11 was the fifth term in the original sequence earlier, we can model the sequence as a recursive problem:
+
+
T1 = a1;
+
+
Tn = Tn-1 + (d1)n-1, for n >= 2.
+
+
Note that it is (d1)n-1 and not (d1)n because the 1st term of the first difference is
+
+
(d1)1 = T2 - T1 = 2 - 1 = 1,
+
+
so it is
+
+
(d1)n = Tn+1 - Tn
+
+
and not
+
+
(d1)n = Tn - Tn-1.
+
+
Moving on, we expand—or “unfold”—the recursive formula to try and spot some patterns we could use to find a closed-form solution:
+
+
Tn = Tn-1 + (d1)n-1
+
+
= Tn-2 + (d1)n-2 + (d1)n-1
+
+
= Tn-3 + (d1)n-3 + (d1)n-2 + (d1)n-1.
+
+
…
+
+
Although not particularly useful by itself, there is an easy to spot pattern:
+
+
Tn = Tn-k + (d1)n-k + (d1)n-(k-1) + (d1)n-(k-2) + … + (d1)n-2 + (d1)n-1, for 1 <= k < n.
Now the pattern is easier to see. It is the sum of integers from 1 to (n - 1):
+
+
Tn = a1 + (n - 1)a2 + (Sn-1 + (n - 1)(-1))d2
+
+
= a1 + (n - 1)a2 + (Sn-1 - (n - 1))d2.
+
+
Luckily for us, the great mathematician Gauss had already found a closed-form solution for finding the sum of integers from 1 to n when he was apparently 9 years-old or something (dubious):
The above is the closed-form solution of the general formula for finding the nth term of a sequence with a 2nd difference.
+We can test it against the earlier sequence that we used as an example (1, 2, 4, 7 ...):
Which matches what I wrote on the preamble.
+You can try out a few examples to check for any counter-examples, but you will not know for certain if it will always be correct unless you prove it, which will be talked about in the next section.
+
+
4. Proof by Mathematical Induction
+
+
Continuing from the previous section: the derivation makes sense, and we can try a few examples, but how do we know for sure that there is no counter-example somewhere we did not check?
+We need to be mathematically rigorous to show our formula will always work.
+
+
Fortunately, there is a convenient method called “proof by induction” that fits nicely for our sequences situation.
+If we show that our formula is true for a base case and also that it is true for any n if it was true for (n - 1), we can confidently conclude that the formula is true for all n.
That matches our formula, and hence proves that the formula will hold true for any n if (n - 1) is true.
+However, we are still missing our base case (n = 1), which is covered in the next subsection.
+
+
4.2 Base Case
+
+
Plugging in the formula for T1:
+
+
T1 = a1 + (n - 1)a2 + 1/2(n - 2)(n - 1)d2
+
+
= a1 + (1 - 1)a2 + 1/2(1 - 2)(1 - 1)d2, for n = 1
+
+
= a1 + (0)a2 + 1/2(-1)(0)d2, for n = 1
+
+
= a1 + 0 + 0
+
+
= a1.
+
+
Which matches our definition, and hence proves that the formula is true for n = 1.
+Combining that with the earlier induction step, we get that it is also true for n = 2, n - 1 = 1.
+Then that also shows that the formula is true for n = 3, n - 1 = 2.
+This then continues on infinitely, which shows that our formula holds true for any n.
+
+
QED.
+
+
5. Conclusion
+
+
So thats the derivation and proof of the formula for finding the nth term of a sequence with a second difference.
+Hopefully after reading through all that, you have gained a better understanding of how sequences with 2nd differences work.
If you have ever taken CS in high school or college, you have probably been taught about how to represent negative numbers in binary using 2’s complement.
But teachers generally just tell you to “flip the bits and add one” without really explaining why it works—similar to how high school teachers treat math formulas.
@@ -33,16 +253,14 @@ When we flip the bits of xHopefully after reading this, you will have gained a better understanding of using 2’s complement for converting binary numbers to negative.
]]>Guide to APA with groff ms and refer2025-02-20T00:00:00+08:002025-02-20T00:00:00+08:00http://localhost:4000/groff-apaThis guide explains why and how I used groff with the ms and refer macros to write my college essay in Neovim.
-
-
1. Table of Contents
+]]>Guide to APA with groff ms & refer2025-02-20T00:00:00+08:002025-02-20T00:00:00+08:00https://de-soot.github.io/groff-apa1. Table of Contents
@@ -93,7 +311,7 @@ When we flip the bits of xConclusion
-
2. Preface
+
2. Preamble
Many colleges give students a mandatory class where they learn how to cite and do referencing in essays.
@@ -107,7 +325,7 @@ When we flip the bits of xA fun fact about this blog post: this is actually my second time writing this whole thing because I frustratingly lost the first one in the dumbest way possible. I accidentally deleted the folder containing it because I forgot that I put it in the folder. Unfortunately, it was already gone by the time I realised due to the auto-emptying routine of my Trash folder scheduled to run once every hour.
-
3. Introduction
+
3. Introduction
The American Psychological Association (APA) 7th Edition style guide is the most popular for formatting references and citations in college-level essays (at least that was what my lecturer said when they gave out the writing assignment).
@@ -117,11 +335,11 @@ When we flip the bits of xHowever, groff by itself cannot do citations and referencing out-of-the-box. Fortunately, it does come with a preprocessor called refer that does the citing and referencing for it. Although the defaults for refer do not conform to APA guidelines, it is not too complex to change those defaults to match any style guide as long as you know where to find the right things to change.
-
4. Prerequisites
+
4. Prerequisites
This guide assumes you are using a Unix-based system (e.g. GNU/Linux, *BSD, macOS, etc.) and already know how to write and compile basic groff ms documents to Portable Document Format (PDF). If not, do not worry. There are many resources online for getting started, such as Luke Smith’s videos on groff and refer. For more detail, see GNU’s official manual or troff’s HOWTO.
-
5. Cover Page
+
5. Cover Page
My assignment did not require me to include a cover page, but yours might. By default, groff puts cover page information on the same page as the essay. Luckily, the ms macros contain a convenient way to change this. Just put .RP no as the first line of your document (.RP stands for “report”; the no argument tells it to not repeat the cover page information on the next page):
@@ -130,7 +348,7 @@ When we flip the bits of xThis is also needed for the next section on page numbering.
-
6. Page Numbering
+
6. Page Numbering
The first page does not have any headers (including page numbering) because groff expects it to include cover page information (i.e. the title of the paper; optionally author(s), institution(s), date, and abstract).
@@ -155,22 +373,22 @@ When we flip the bits of xwhich works because even though the title (.TL) is required, it stops at the abstract (.AB, which ends at .AE; the no argument suppresses the “Abstract” heading).
-
6.1 Suppress Page Headers
+
6.1 Suppress Page Headers
If instead you want to not have any page headers (including page numbering) for reasons such as plagerism report checkers potentially producing errors, disabling automatic page numbering is as easy as defining the central header to be empty:
.ds CH
-
7. Font
+
7. Font
Many lecturers demand assignments to be submitted in double-spaced Times New Roman in 12 point size. This section covers how to change the font family, size, style, and line spacing.
-
7.1 Font Family
+
7.1 Font Family
By default, groff already outputs text in your device’s default serif font family (typically Times New Roman), but sometimes (very rarely, in my experience) lecturers prefer sans-serif or even monospace in some cases.
-
7.1.1 Default Fonts
+
7.1.1 Default Fonts
Changing to another one of the default fonts in groff is simple.
@@ -191,11 +409,11 @@ When we flip the bits of xThere are many other default fonts in groff listed in this post.
-
7.1.2 Custom Fonts
+
7.1.2 Custom Fonts
Installing custom fonts for groff is a little bit trickier; I have not been able to get it to work on my device yet. I did find a guide that seemed promising though. Maybe I will revisit this if I get it working in the future.
-
7.2 Font Size
+
7.2 Font Size
The default font size in groff is a little bit less than 12pt (10pt, to be exact), but it is very easy to change. Simply add this line to your plaintext document to change the font size to 12pt:
@@ -204,14 +422,14 @@ When we flip the bits of xAs for what PS stands for, it probably means something like “Point Size”; .nr stands for “Number Registers”.
-
7.3 Line Spacing
+
7.3 Line Spacing
All parts of an APA-styled paper should be double-spaced. By default, groff uses 120% of font size as vertical spacing. Fortunately, changing this to double-spacing is just as simple as changing the font size: just set the vertical spacing (.nr VS) to double your font size (.nr PS).
.nr VS 24
-
7.4 Font Style
+
7.4 Font Style
Here is how to make your text bold,
@@ -228,13 +446,13 @@ When we flip the bits of x
.ft R \" Stands for Regular or Roman
-
8. In-text Citation
+
8. In-text Citation
Now that everything is set up, we can start to get into the citations.
refer uses numbered footnotes by default, but APA wants the author(s) and date included in their in-text citations. This section will cover how to do exactly as APA says.
-
8.1 Parenthetical Citation
+
8.1 Parenthetical Citation
After some research, I found a blog post “no-tears” guide, 2 Githubrepositories, and a post from the GNU mailing list archive (which I cannot seem to find anymore). I extracted the refer block (denoted by .R1 and .R2) from all those sources and combined them to make a frankenstein that works perfectly for most APA parenthetical citations:
My lecturer luckily did not require me to use narrative citations, but yours might. If you do have to use narrative citation, unfortunately, refer does not have any support for narrative citations being alongside parenthetical citations. While it is possible to repurpose the citation formatting part of the refer block to change it from parenthetical to narrative, it would still not be possible to have both narrative and parenthetical citation on the same page.
The only practical solution I can think of for this problem is to keep the refer block as-is and write the narrative citations manually. This will require you to have a separate document for producing the referencing for the narrative citations, because refer will not make entries for them in the reference list as it will not recognise the narrative citations that you manually typed in, treating them like ordinary text. This also means that you need to generate 2 separate output PDFs and extract the correct reference list from the one without narrative citations to merge (using PDF-editing software) with the other one that does.
-
9. Reference List
+
9. Reference List
This section is where we start to dive into refer’s code (usually located inside either /usr/share/groff/current/tmac or /usr/local/share/groff/current/tmac). Rest assured, the changes that will be made will not be difficult as long as you know 3 things: what to change, what to change them to, and where to find them (all 3 being what I had to figure out on my own by reading and tinkering with the source code).
-
9.1 Formatting the Heading
+
9.1 Formatting the Heading
The “References” heading is left-aligned by default, whereas APA wants it centered. Some extra changes not specified by APA my lecturer wanted were to make the Heading a little bigger and add an extra line of space below it.
(Optional) .sp 2 adds two extra lines of space below the heading.
-
9.2 Space Between Entries
+
9.2 Space Between Entries
There is no space between reference entries by default. This is already conforming to APA, but my lecturer wanted extra padding between the entries (even if that meant breaking APA guidelines) and maybe yours might too.
The way refer orders the fields of each reference entry is hard-coded and different from what APA desires. More specifically, the date field is placed after the title field instead of being in between it and the author(s) field.
@@ -344,7 +562,7 @@ join-authors " & " ", " " & " # Change default "and" to ampersand (&
.ds ref*spec!4 Q A D T R G P I C O
-
9.4 Punctuation
+
9.4 Punctuation
Switching the order of the fields messes up the hard-coded punctuation order, but there are also some defaults that do not follow APA guidelines.
When numbering pages, APA does not denote with p. for single pages or pp. for page ranges, so they were removed in their respective rows.
-
9.4.1 Period Suppression
+
9.4.1 Period Suppression
By default, refer appends a period at the end of each entry. This means that a period is added after the last field that contains a DOI or URL, which APA has explicitly stated to not do.
(Optional) -dpaper=a4 and -P-pa4 exports the paper to the international-standard A4 size instead of the default US letter.
-
11. Conclusion
+
11. Conclusion
If you found this helpful in any way or have any questions, feel free to leave a comment below. Also read my previous guide on how I justify and hyphenate the text on this website.
]]>Dark Mode without Javascript2024-09-07T00:00:00+08:002024-09-07T00:00:00+08:00http://localhost:4000/dark-modeThis guide explains why and how to easily make a dark theme for your website using CSS @media queries.
-
-
Alternative title: System default theme for websites
+]]>Dark Mode without Javascript2024-09-07T00:00:00+08:002024-09-07T00:00:00+08:00https://de-soot.github.io/dark-modeAlternative title: System default theme for webpages
-
Why Dark Mode
+
Why Dark Mode
For users visiting a website in a dark room at night, it would be less straining for their eyes if the webpage was displayed in a darker colour to match the environment, which is what dark mode does.
The @media CSSat-rule can be used to apply part of a style sheet based on the result of one or more media queries. With it, you specify a media query and a block of CSS to apply to the document if and only if the media query matches the device on which the content is being used.
It is a little bit less straightforward to do this with static site generators like Jekyll (which is what this website uses) or Hugo, as you have to override the theme’s CSS style sheet.
For other static site generator websites, you can refer to the official documentation found online for information on how to override your theme’s style-sheet.
-
Configure Giscus Theme
+
Configure Giscus Theme
To set giscus comments to match the website if you have done the CSS @media trick shown above, simply set the <script>’s data-theme attribute value to "preferred_color_scheme" as shown below.
If you found this blog post useful, leave a comment down below! Also check out how to add giscus comments to your own website on my previous guide for it.
]]>Justify and Hyphenate Text on Websites using CSS2024-09-07T00:00:00+08:002024-09-07T00:00:00+08:00http://localhost:4000/justify-textThis blog guide goes into why and how to justify and hyphenate text on your website without Javascript.
+]]>Justify and Hyphenate Text on Websites using CSS2024-09-07T00:00:00+08:002024-09-07T00:00:00+08:00https://de-soot.github.io/justify-textFor Static-Site-Generator Websites
-
For Static-Site-Generator Websites
-
-
It is a little bit less straightforward to do this with static site generators like Jekyll (which is what this website uses) or Hugo, you will have to override the theme’s CSS style sheet.
+
It is a little bit less straightforward to follow this guide with static site generators like Jekyll (which is what this website also uses) or Hugo, you will have to override the theme’s CSS style sheet.
After this, you can follow all the steps below the same way as it would be done if you were using CSS in a non-static-site-generator instead of SCSS in a static site generator.
-
Why Justify Text
+
Why Justify Text
It is more of an aesthetic preference than anything. This jaggedness generally does not bother people that much because they have grown used to the popular left-aligned style of text on the web and probably do not know justification even exists on the web, only on printed books and newspapers. But it just looks better to me when all lines are the same length and the right side of text is not jagged. Justifcation is a way of acheiving that aesthetic goal without cutting words off abruptly.
-
How to Justify
+
How to Justify
It is actually pretty simple. To justify your body text, just add this to your CSS style sheet:
Text justification can make your paragraphs look tidier, but it has the side-effect of awkwardly stretching out the whitespace between words, which can create and worsen an undesirable effect commonly referred to as ‘rivers of white’. This effect is known to make text harder for dyslexic readers to read, decreasing accessibility.
Hyphenating text will cut off some words at the end of lines (indicated by an auto-inserted hyphen), but it will do it with an algorithm that tries to make it seamless.
-
How to Hyphenate
+
How to Hyphenate
Although there is a way to hyphenate with Javascript using Hyphenopoly.js, there already is a built-in functionality in CSS to do this and it is widely supported by browsers.
JPEG XL’s jpegxl.info, which had fixed its un-hyphenated text.
-
Conclusion
+
Conclusion
f you found this blog post useful, leave a comment down below! Also read how to add reactive dark-mode to your website in my previous blog post.
]]>Comments on Github Pages with giscus2024-05-24T00:00:00+08:002024-05-24T00:00:00+08:00http://localhost:4000/giscus-commentsI added a commenting feature for the blog using giscus. Basically, it uses Github Discussions to store comments instead of storing it in its own database on the web server. Since this website is hosted on Github Pages and Pages only supports static websites, it cannot host its own databases to store things such as comments. This guide explains how to add giscus comments to statically-hosted websites, and some quirks and caveats with using Github Discussions as a database for your comments.
+]]>Comments on Github Pages with giscus2024-05-24T00:00:00+08:002024-05-24T00:00:00+08:00https://de-soot.github.io/giscus-commentsPreamble
+
+
I added a commenting feature for the blog using giscus. Basically, it uses Github Discussions to store comments instead of storing it in its own database on the web server. Since this website is hosted on Github Pages and Pages only supports static websites, it cannot host its own databases to store things such as comments. This guide explains how to add giscus comments to statically-hosted websites, and some quirks and caveats with using Github Discussions as a database for your comments.
-
Try it
+
Try it
You can test it out yourself on this blog post in the comments below by signing into your Github account and commenting, or you can comment on the Github Discussions post directly and it will show up on the comments section on the website similarly.
-
Add it to your own Github Pages website
+
Add it to your own Github Pages website
1) Make sure to enable Github Discussions on your website’s Github repository.
3) After you have done so, you can simply copy and paste it into your webpage!
-
Note
+
Note
Giscus finds and links the comments to the Github Discussions by searching through and matching URLs, path names, titles, and other such metadata. If you try to change a page’s title without editing the associated Github Discussion accordingly, it may lead to giscus not being able to find and link it to the Github Discussion (this is especially noticible if you set the <script>’s data-strict attribute value to "1"), and hence Giscus will create a new Github Discussion.
Giscus also does not update or sync the posts made on Github Discussions with the blogs on your website, so you may have to manually copy across the changes and edits you make to your blog posts. Luckily, giscus only creates a post on Discussions when there is interaction (reactions or comments) with giscus on your blog post, so it should not be an issue for new blog posts that no one has commented or reacted to yet.
]]>
\ No newline at end of file
+]]>
\ No newline at end of file
diff --git a/_site/giscus-comments.html b/_site/giscus-comments.html
index 38ae4f0..9383526 100644
--- a/_site/giscus-comments.html
+++ b/_site/giscus-comments.html
@@ -7,19 +7,19 @@
-
-
-
-
+
+
+
+
+{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2024-05-24T00:00:00+08:00","datePublished":"2024-05-24T00:00:00+08:00","description":"Preamble","headline":"Comments on Github Pages with giscus","mainEntityOfPage":{"@type":"WebPage","@id":"https://de-soot.github.io/giscus-comments"},"url":"https://de-soot.github.io/giscus-comments"}
-
+
I added a commenting feature for the blog using giscus. Basically, it uses Github Discussions to store comments instead of storing it in its own database on the web server. Since this website is hosted on Github Pages and Pages only supports static websites, it cannot host its own databases to store things such as comments. This guide explains how to add giscus comments to statically-hosted websites, and some quirks and caveats with using Github Discussions as a database for your comments.
+
Preamble
-
Try it
+
I added a commenting feature for the blog using giscus. Basically, it uses Github Discussions to store comments instead of storing it in its own database on the web server. Since this website is hosted on Github Pages and Pages only supports static websites, it cannot host its own databases to store things such as comments. This guide explains how to add giscus comments to statically-hosted websites, and some quirks and caveats with using Github Discussions as a database for your comments.
+
+
Try it
You can test it out yourself on this blog post in the comments below by signing into your Github account and commenting, or you can comment on the Github Discussions post directly and it will show up on the comments section on the website similarly.
-
Add it to your own Github Pages website
+
Add it to your own Github Pages website
1) Make sure to enable Github Discussions on your website’s Github repository.
@@ -61,7 +63,7 @@
Add it to your own Github Pages
3) After you have done so, you can simply copy and paste it into your webpage!
-
Note
+
Note
Giscus finds and links the comments to the Github Discussions by searching through and matching URLs, path names, titles, and other such metadata. If you try to change a page’s title without editing the associated Github Discussion accordingly, it may lead to giscus not being able to find and link it to the Github Discussion (this is especially noticible if you set the <script>’s data-strict attribute value to "1"), and hence Giscus will create a new Github Discussion.
This blog guide goes into why and how to justify and hyphenate text on your website without Javascript.
+
For Static-Site-Generator Websites
-
For Static-Site-Generator Websites
-
-
It is a little bit less straightforward to do this with static site generators like Jekyll (which is what this website uses) or Hugo, you will have to override the theme’s CSS style sheet.
+
It is a little bit less straightforward to follow this guide with static site generators like Jekyll (which is what this website also uses) or Hugo, you will have to override the theme’s CSS style sheet.
After this, you can follow all the steps below the same way as it would be done if you were using CSS in a non-static-site-generator instead of SCSS in a static site generator.
-
Why Justify Text
+
Why Justify Text
It is more of an aesthetic preference than anything. This jaggedness generally does not bother people that much because they have grown used to the popular left-aligned style of text on the web and probably do not know justification even exists on the web, only on printed books and newspapers. But it just looks better to me when all lines are the same length and the right side of text is not jagged. Justifcation is a way of acheiving that aesthetic goal without cutting words off abruptly.
-
How to Justify
+
How to Justify
It is actually pretty simple. To justify your body text, just add this to your CSS style sheet:
@@ -76,7 +74,7 @@
How to Justify
}
-
Why Hyphenate
+
Why Hyphenate
Text justification can make your paragraphs look tidier, but it has the side-effect of awkwardly stretching out the whitespace between words, which can create and worsen an undesirable effect commonly referred to as ‘rivers of white’. This effect is known to make text harder for dyslexic readers to read, decreasing accessibility.
@@ -88,7 +86,7 @@
Why Hyphenate
Hyphenating text will cut off some words at the end of lines (indicated by an auto-inserted hyphen), but it will do it with an algorithm that tries to make it seamless.
-
How to Hyphenate
+
How to Hyphenate
Although there is a way to hyphenate with Javascript using Hyphenopoly.js, there already is a built-in functionality in CSS to do this and it is widely supported by browsers.
@@ -99,7 +97,7 @@
How to Hyphenate
}
-
Other Blogs That Justify
+
Other Blogs That Justify
Here are a list of other blogsites that I know of that use justified text:
@@ -110,7 +108,7 @@
Other Blogs That Justify
JPEG XL’s jpegxl.info, which had fixed its un-hyphenated text.
-
Conclusion
+
Conclusion
f you found this blog post useful, leave a comment down below! Also read how to add reactive dark-mode to your website in my previous blog post.
diff --git a/_site/robots.txt b/_site/robots.txt
index d297064..d4ec90a 100644
--- a/_site/robots.txt
+++ b/_site/robots.txt
@@ -1 +1 @@
-Sitemap: http://localhost:4000/sitemap.xml
+Sitemap: https://de-soot.github.io/sitemap.xml
diff --git a/_site/sitemap.xml b/_site/sitemap.xml
index 02c8548..e1cc4c7 100644
--- a/_site/sitemap.xml
+++ b/_site/sitemap.xml
@@ -1,29 +1,33 @@
-http://localhost:4000/giscus-comments
+https://de-soot.github.io/giscus-comments2024-05-24T00:00:00+08:00
-http://localhost:4000/dark-mode
+https://de-soot.github.io/dark-mode2024-09-07T00:00:00+08:00
-http://localhost:4000/justify-text
+https://de-soot.github.io/justify-text2024-09-07T00:00:00+08:00
-http://localhost:4000/groff-apa
+https://de-soot.github.io/groff-apa2025-02-20T00:00:00+08:00
-http://localhost:4000/2s-complement
+https://de-soot.github.io/2s-complement2025-12-08T00:00:00+08:00
-http://localhost:4000/about
+https://de-soot.github.io/2nd-diff
+2025-12-10T00:00:00+08:00
-http://localhost:4000/
+https://de-soot.github.io/about
+
+
+https://de-soot.github.io/
diff --git a/about.md b/about.md
index 7a35d0e..1b9d891 100644
--- a/about.md
+++ b/about.md
@@ -4,7 +4,9 @@ title: About
permalink: /about
---
-Welcome to my website! [This](/) is where I write about whatever I think is interesting or helpful. It is made with [Jekyll][jekyll] using the [Minima][minima] theme and is hosted for free on [Github Pages][pages].
+Welcome to my website! Here is where I write blog posts on technical topics.
+
+It is made with [Jekyll][jekyll] using the [Minima][minima] theme and is hosted for free on [Github Pages][pages].
The `source code` for this website can be found on its [Github repository][github repo].