<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://libremelon.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://libremelon.com/" rel="alternate" type="text/html" /><updated>2026-02-10T00:55:27+05:30</updated><id>https://libremelon.com/feed.xml</id><title type="html">Libremelon’s website</title><subtitle>Welcome to libremelon&apos;s website. This is the place where I share my thoughts about the cool stuff I&apos;m upto 👾</subtitle><author><name>libremelon</name><email>libremelon@proton.me</email></author><entry><title type="html">(SOK) Weekly recap (1) - KDE Docs PDF generation</title><link href="https://libremelon.com/blog/kde/2026/02/08/01-sok-kde-docs/" rel="alternate" type="text/html" title="(SOK) Weekly recap (1) - KDE Docs PDF generation" /><published>2026-02-08T00:00:00+05:30</published><updated>2026-02-08T00:00:00+05:30</updated><id>https://libremelon.com/blog/kde/2026/02/08/01-sok-kde-docs</id><content type="html" xml:base="https://libremelon.com/blog/kde/2026/02/08/01-sok-kde-docs/"><![CDATA[<p>This is a sequel to my <a href="https://libremelon.com/blog/kde/2026/01/30/00-sok-kde-docs/">first blog</a> where I’m working on fixing a part of docs.kde.org: PDF generation. The documentation website generation pipeline currently depends on <code class="language-plaintext highlighter-rouge">docs-kde-org</code>, and this week I was focused on decoupling it.</p>

<h2 id="moving-away-from-docs-kde-org">Moving away from docs-kde-org</h2>

<p>I began by copying the script that builds the PDFs in <code class="language-plaintext highlighter-rouge">docs-kde-org</code> to <code class="language-plaintext highlighter-rouge">ci-utilities</code> as a temporary step towards independence.</p>

<p>I then dropped the bundled <code class="language-plaintext highlighter-rouge">dblatex</code> for the one present in the upstream repos, wired up the new paths and hit build. To no one’s surprise, it failed immediately. The culprit here was the custom made <code class="language-plaintext highlighter-rouge">kdestyle</code> latex style. As a temporary measure, I excluded it to get PDFs to generate again, however several (new) locales broke.</p>

<p>So the pipeline now worked, albeit, partially.</p>

<p>(<a href="https://invent.kde.org/libremelon/ci-utilities/-/commit/17bbe090b7997f5558ebb4241fae8e57f1f6d7e5">Commit 17bbe090</a>) (<a href="https://invent.kde.org/libremelon/ci-utilities/-/commit/3e8f8dc942582f3861366ac4878b4712c0921eb2">Commit 3e8f8dc9</a>)</p>

<h2 id="trying-xetex">Trying XeTeX</h2>

<p>Most non-ASCII languages (Chinese, Japanese, Korean, Arabic, etc) are not supported for PDF generation because of wonky unicode support in <code class="language-plaintext highlighter-rouge">pdfTeX</code> (the existing backend driver that converts LaTeX code to a PDF)</p>

<p>So I switched the backend to XeTeX to improve the font and language handling. Now I’m greeted with a new failure :D</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xltxtra.sty not found
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">xltxtra</code> is a package used by <code class="language-plaintext highlighter-rouge">dblatex</code> to process LaTeX code with XeTeX. Installing <code class="language-plaintext highlighter-rouge">texlive-xltxtra</code> fixed this, and almost everything built (except Turkish)</p>

<p>(<a href="https://invent.kde.org/libremelon/ci-utilities/-/commit/7ede0f94d8824aece60700897314df3c9d981bda">Commit 7ede0f94</a>)</p>

<h2 id="the-deprecated-package-rabbit-hole">The deprecated package rabbit hole</h2>

<p>While installing <code class="language-plaintext highlighter-rouge">xltxtra</code>, I noticed that it was deprecated and mostly kept for compatibility. So I tried replacing it with modern alternatives (<code class="language-plaintext highlighter-rouge">fontspec</code>, <code class="language-plaintext highlighter-rouge">realscripts</code>, <code class="language-plaintext highlighter-rouge">metalogo</code>).</p>

<p>Back to <code class="language-plaintext highlighter-rouge">xltxtra.sty</code> not found</p>

<p>At the point I looked at the upstream dblatex code and found references to xltxtra in a Latex style file and in the XSL templates responsible for generating the latex.</p>

<p>I experimented with local overrides, but the dependency was introduced during the XSLT stage so it isn’t trivial to swap out.</p>

<h2 id="clearer-mental-model">Clearer mental model</h2>

<p>A very good outcome from the experiments is that I now understand the pipeline much better</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>DocBook XML -&gt; XSLT Engine -&gt; LaTeX Source -&gt; XeLaTex -&gt; PDF
</code></pre></div></div>

<p>XSL files are templates for the XSLT engine to convert the docbooks to latex and the problem is probably in one of these templates</p>

<h2 id="decision-with-mentor">Decision with mentor</h2>

<p>After discussion, Johnny advised me to</p>

<ul>
  <li>Use <code class="language-plaintext highlighter-rouge">texlive-xltxtra</code> for now</li>
  <li>Open an upstream issue</li>
  <li>And that fixing dblatex itself is outside our scope</li>
</ul>

<p>So I went ahead and filed the issue <a href="https://sourceforge.net/p/dblatex/bugs/134/">https://sourceforge.net/p/dblatex/bugs/134/</a>. Now we keep moving forward while also documenting the technical debt.</p>

<h2 id="locales-experiment">Locales experiment</h2>

<p>I temporarily re-enabled previously excluded locales (CJK etc) to see what happens. Unfortunately most of them didn’t generate silently. I’m still unsure about this part and the behavior might differ in other projects, so I’ll revisit this later.</p>

<p>(<a href="https://invent.kde.org/libremelon/ci-utilities/-/commit/04b698a566f091bc9b3ead60cd25be9f26447048">Commit 04b698a5</a>)</p>

<h2 id="kdestyle-strikes-back">kdestyle strikes back</h2>

<p>Now I fed the absolute path of <code class="language-plaintext highlighter-rouge">kdestyle</code> to dblatex (to maintain PDF output parity) which introduced a new set of errors</p>

<ul>
  <li>Option clash for <code class="language-plaintext highlighter-rouge">graphicx</code></li>
  <li>conflicting driver options in <code class="language-plaintext highlighter-rouge">hyperref</code> (<code class="language-plaintext highlighter-rouge">dvips</code>, <code class="language-plaintext highlighter-rouge">pdftex</code>)</li>
</ul>

<p>These seem to originate from the style file and is the next major thing to resolve.</p>

<p>(<a href="https://invent.kde.org/libremelon/ci-utilities/-/commit/7ede0f94d8824aece60700897314df3c9d981bda">Commit 7ede0f94</a>)</p>

<h2 id="improved-git-skills">Improved Git skills</h2>

<p>I also had a self inflicted problem this week. My feature branch diverged from master and I merged instead of rebasing. As a result the history got messed up. I fixed it by:</p>

<ul>
  <li>dropping the merge commit</li>
  <li>rebasing properly</li>
  <li>force pushing the cleaned branch</li>
</ul>

<p>Lessons learnt. Working with open source projects has really made git less intimidating.</p>

<h2 id="where-things-stand">Where things stand</h2>

<p>Right now</p>

<ul>
  <li>we can build with XeTeX</li>
  <li>we rely on <code class="language-plaintext highlighter-rouge">texlive-xltxtra</code></li>
  <li>most locales work (except Turkish of course)</li>
  <li><code class="language-plaintext highlighter-rouge">kdestyle</code> introduces some problems</li>
</ul>

<p>Also here’s a before vs after of the generated PDFs (the end goal would be to make both of them look identical)</p>

<p>Honestly I don’t feel like I got much accomplished but the understanding gained should make future changes much faster (and safer :D)</p>

<blockquote>
  <p>Dev logs
<a href="https://invent.kde.org/-/snippets/3669">log 1</a>, <a href="https://invent.kde.org/-/snippets/3670">log 2</a>, <a href="https://invent.kde.org/-/snippets/3671">log 3</a>, <a href="https://invent.kde.org/-/snippets/3672">log 4</a></p>
</blockquote>

<p>Edit (09-02-2026): Added links to relevant commits based on feedback received</p>]]></content><author><name>libremelon</name><email>libremelon@proton.me</email></author><category term="kde" /><summary type="html"><![CDATA[This is a sequel to my first blog where I’m working on fixing a part of docs.kde.org: PDF generation. The documentation website generation pipeline currently depends on docs-kde-org, and this week I was focused on decoupling it.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://libremelon.com/assets/images/kde-dragons.png" /><media:content medium="image" url="https://libremelon.com/assets/images/kde-dragons.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Improving a part of KDE documentation generation as an SOK mentee</title><link href="https://libremelon.com/blog/kde/2026/01/30/00-sok-kde-docs/" rel="alternate" type="text/html" title="Improving a part of KDE documentation generation as an SOK mentee" /><published>2026-01-30T00:00:00+05:30</published><updated>2026-01-30T00:00:00+05:30</updated><id>https://libremelon.com/blog/kde/2026/01/30/00-sok-kde-docs</id><content type="html" xml:base="https://libremelon.com/blog/kde/2026/01/30/00-sok-kde-docs/"><![CDATA[<p>The <code class="language-plaintext highlighter-rouge">docs-kde-org</code> project currently relies on an old, hard forked version of <a href="https://dblatex.sourceforge.net/"><code class="language-plaintext highlighter-rouge">dblatex</code></a>, which is bundled directly within the repository. This makes maintenance difficult.</p>

<blockquote>
  <p><strong>What’s dblatex?</strong></p>

  <p>From the man page: <strong>dblatex</strong> is a program that transforms your SGML/XML DocBook documents to DVI, PostScript or PDF by translating them into pure LaTeX as a first process. MathML 2.0 markups are supported, too. It started as a clone of DB2LaTeX.</p>
</blockquote>

<p>My task is to swap the bundled <code class="language-plaintext highlighter-rouge">dblatex</code> with the one present in the upstream repos and make the PDF generation work reliably. Then switch the rendering backend from <code class="language-plaintext highlighter-rouge">pdfLaTeX</code> to <code class="language-plaintext highlighter-rouge">XeLaTeX</code> to support native unicode (to fix rendering issues for languages like Arabic, Chinese, Japanese, Korean, etc).</p>

<p>If that doesn’t work out, I’ll extract the dblatex fork into its own repository to ease maintenance.</p>

<h3 id="checkpoints-to-achieve">Checkpoints to achieve</h3>

<ul class="task-list">
  <li class="task-list-item">
    <p><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />Swap our current fork and use the latest upstream version. Also compare these two.</p>
  </li>
  <li class="task-list-item">
    <p><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />Migrate from <code class="language-plaintext highlighter-rouge">pdfLaTeX</code> to <code class="language-plaintext highlighter-rouge">XeLaTeX</code></p>
  </li>
  <li class="task-list-item">
    <p><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />Verify our fixes and confirm if all the PDFs are being generated properly.</p>
  </li>
</ul>

<p>I’ll be sharing my progress and struggles (setting this website up was probably a struggle in itself) from time to time as I start this project. This work is part of Season of KDE, mentored by Johnny Jazeix.</p>]]></content><author><name>libremelon</name><email>libremelon@proton.me</email></author><category term="kde" /><summary type="html"><![CDATA[The docs-kde-org project currently relies on an old, hard forked version of dblatex, which is bundled directly within the repository. This makes maintenance difficult.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://libremelon.com/assets/images/kde-dragons.png" /><media:content medium="image" url="https://libremelon.com/assets/images/kde-dragons.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">first post</title><link href="https://libremelon.com/blog/journal/2025/09/09/hi/" rel="alternate" type="text/html" title="first post" /><published>2025-09-09T00:00:00+05:30</published><updated>2025-09-09T00:00:00+05:30</updated><id>https://libremelon.com/blog/journal/2025/09/09/hi</id><content type="html" xml:base="https://libremelon.com/blog/journal/2025/09/09/hi/"><![CDATA[<p>Hiii,</p>

<p>Welcome to my first post. This probably would be a not-so-technical technical blog. Unrelated but I’m going to start college in less than a week.</p>

<p>See y’all in the next one</p>]]></content><author><name>libremelon</name><email>libremelon@proton.me</email></author><category term="journal" /><summary type="html"><![CDATA[first post]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://libremelon.com/assets/images/pixelated-melon-banner.png" /><media:content medium="image" url="https://libremelon.com/assets/images/pixelated-melon-banner.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>