<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lakshitha Deshan</title>
    <description>The latest articles on DEV Community by Lakshitha Deshan (@itzmeready).</description>
    <link>https://dev.to/itzmeready</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4157885%2Fd639377a-7349-4766-896f-99dbf6e6645f.png</url>
      <title>DEV Community: Lakshitha Deshan</title>
      <link>https://dev.to/itzmeready</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itzmeready"/>
    <language>en</language>
    <item>
      <title>I Built Inkwell So My Friend Would Stop Retyping Lecture Notes into LaTeX</title>
      <dc:creator>Lakshitha Deshan</dc:creator>
      <pubDate>Sun, 04 Oct 2026 22:08:38 +0000</pubDate>
      <link>https://dev.to/itzmeready/i-built-inkwell-so-my-friend-would-stop-retyping-lecture-notes-into-latex-50b3</link>
      <guid>https://dev.to/itzmeready/i-built-inkwell-so-my-friend-would-stop-retyping-lecture-notes-into-latex-50b3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Inkwell turns messy, plain-text lecture notes into a clean study guide, with the math properly typeset and a sharp vector PDF at the end. You paste in whatever you typed during the lecture, an AI model sorts out the structure, and KaTeX renders the formulas. It's open source under the MIT license.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who I Built It For
&lt;/h2&gt;

&lt;p&gt;Inkwell is for me and my friend Asuna, a second-year engineering and CS student.&lt;/p&gt;

&lt;p&gt;In classes like Linear Algebra, Differential Equations and Machine Learning, the professor talks and writes at full speed, so we type whatever we can into Notepad or a quick Markdown file. The result looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eigenvalues and eigenvectors
linear transformation Av = lambda v where lambda is eigenvalue, v is non zero eigenvector
to find lambda solve characteristic equation det(A - lambda I) = 0
example 2x2 matrix with row 1: 2, 1 and row 2: 1, 2
find eigenvalues: det is (2 - lambda)^2 - 1 = lambda^2 - 4lambda + 3 = 0
factor it: (lambda - 3)(lambda - 1) = 0 so lambda1 = 3 and lambda2 = 1
since A is symmetric eigenvectors are guaranteed to be orthogonal
formula for roots: x = (-b +- sqrt(b^2 - 4ac)) / (2a)
key takeaway: matrix powers can be computed easily via A^k = P * D^k * P^-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;By the end of class it's a wall of text. Shorthand like &lt;code&gt;Av = lambda v&lt;/code&gt; or &lt;code&gt;[[2,1],[1,2]]&lt;/code&gt; is fine while you're typing, but it's miserable to study from. We were spending 3 to 4 hours every weekend retyping everything into LaTeX or Notion just to make it readable, which is a silly way to spend a weekend.&lt;/p&gt;
&lt;h2&gt;
  
  
  How Inkwell Fixes That
&lt;/h2&gt;

&lt;p&gt;You paste in the raw notes, pick a layout, and hit "Clean &amp;amp; Format Notes."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It recognizes the math.&lt;/strong&gt; Plain-text equations and matrices become KaTeX automatically. &lt;code&gt;Av = lambda v&lt;/code&gt; becomes 

&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;A&lt;/span&gt;&lt;span class="mord mathnormal"&gt;v&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="mord mathnormal"&gt;v&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
, &lt;code&gt;det(A - lambda I) = 0&lt;/code&gt; becomes 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mop"&gt;det&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal"&gt;A&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;−&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;λ&lt;/span&gt;&lt;span class="mord mathnormal"&gt;I&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
, and &lt;code&gt;[[2, 1], [1, 2]]&lt;/code&gt; becomes:&lt;/p&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="minner"&gt;&lt;span class="mopen delimcenter"&gt;&lt;span class="delimsizing size1"&gt;[&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mtable"&gt;&lt;span class="col-align-c"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="arraycolsep"&gt;&lt;/span&gt;&lt;span class="arraycolsep"&gt;&lt;/span&gt;&lt;span class="col-align-c"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;span class="mspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="arraycolsep"&gt;&lt;/span&gt;&lt;span class="arraycolsep"&gt;&lt;/span&gt;&lt;span class="col-align-c"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose delimcenter"&gt;&lt;span class="delimsizing size1"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;It has three layouts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single page, for reading everything through&lt;/li&gt;
&lt;li&gt;Two-column cheat sheet, for last-minute exam review&lt;/li&gt;
&lt;li&gt;Cornell notes, with cue questions, key takeaways and a summary block&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;You can draw on it.&lt;/strong&gt; A canvas overlay gives you a pen, highlighter, eraser and movable text boxes, so you can sketch a diagram, circle the formula that's definitely going to be on the exam, or scribble in the margins right on top of the rendered math.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It exports a real vector PDF.&lt;/strong&gt; The math fonts stay sharp and your annotations come along with them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo9c980y98rzcrgic4j3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo9c980y98rzcrgic4j3p.png" alt="Inkwell with the raw eigenvalue notes on the left and the formatted study guide with rendered math on the right" width="799" height="320"&gt;&lt;/a&gt;&lt;br&gt;
Try it here: &lt;a href="https://inkwell-frontend-net1.onrender.com/" rel="noopener noreferrer"&gt;Inkwell on Render&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few things to try:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type on the left and watch the math render on the right&lt;/li&gt;
&lt;li&gt;Switch between the Dark Slate, Minimal Grid and Clean Academic themes&lt;/li&gt;
&lt;li&gt;Annotate over the notes, then export to PDF&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/itzmeReadY" rel="noopener noreferrer"&gt;
        itzmeReadY
      &lt;/a&gt; / &lt;a href="https://github.com/itzmeReadY/inkwell" rel="noopener noreferrer"&gt;
        inkwell
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Inkwell: Clean, structured note generation with LaTeX formulas powered by Gemma open-weight models. Built for Hacktoberfest 2026.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Inkwell&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Inkwell is an open-source, AI-powered tool that transforms messy, raw, plain-text lecture notes into beautifully formatted, structured PDFs with precisely rendered mathematical formulas. By combining the power of Gemma open-weight models with modern rendering technologies, Inkwell automatically distills chaotic class notes into elegant, highly readable documents and study materials.&lt;/p&gt;
&lt;p&gt;Built for students, researchers, and engineers who type fast during lectures and need clean, structured outputs without spending hours manually formatting LaTeX.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Messy Text to Structured PDF:&lt;/strong&gt; Paste your frantic lecture notes, and let AI structure them with headings, bold definitions, and clear bullet points.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic LaTeX Rendering:&lt;/strong&gt; Plain text equations like &lt;code&gt;A v = lambda v&lt;/code&gt; are automatically detected, converted to KaTeX &lt;code&gt;$$A \mathbf{v} = \lambda \mathbf{v}$$&lt;/code&gt;, and rendered in perfect mathematics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple PDF Themes &amp;amp; Layouts:&lt;/strong&gt; Choose from Dark Slate, Minimal Grid, Clean, and layouts like Two-Column Cheat Sheet or Cornell Notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vector PDFs &amp;amp; Pen&lt;/strong&gt;…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/itzmeReadY/inkwell" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; Google's Gemma open-weight models (&lt;code&gt;gemma-4-31b-it&lt;/code&gt;, &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;, &lt;code&gt;gemma-2-27b-it&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; FastAPI, Python 3.12, Playwright for PDF rendering, Python-Markdown with KaTeX extensions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; React 18, TypeScript, Vite, ReactMarkdown, Rehype-KaTeX, and a custom HTML5 canvas annotation layer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting:&lt;/strong&gt; Render&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Gemma does the cleanup
&lt;/h3&gt;

&lt;p&gt;Inkwell is built around the Gemma family. I wrote a STEM-focused prompt in &lt;code&gt;llm.py&lt;/code&gt; that asks the model to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;turn messy math notation (&lt;code&gt;lambda&lt;/code&gt;, &lt;code&gt;alpha&lt;/code&gt;, &lt;code&gt;a/b&lt;/code&gt;, summations, matrix rows) into valid LaTeX, using &lt;code&gt;$...$&lt;/code&gt; inline and &lt;code&gt;$$...$$&lt;/code&gt; for blocks&lt;/li&gt;
&lt;li&gt;reorganize stream-of-consciousness text into headings, bold terms and short bullets&lt;/li&gt;
&lt;li&gt;adjust to the chosen layout: Cornell mode gets &lt;code&gt;**CUE:**&lt;/code&gt; prompts, explanations and a &lt;code&gt;## Summary&lt;/code&gt;, while two-column mode gets short, dense bullets that split well across columns&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. MathGuard, so the model doesn't "fix" the math
&lt;/h3&gt;

&lt;p&gt;LLMs like to get creative, and I didn't want my formulas rewritten. &lt;code&gt;backend/math_guard.py&lt;/code&gt; uses regex heuristics to find raw equations (like &lt;code&gt;A v = lambda v&lt;/code&gt;) and swaps them for placeholders (&lt;code&gt;⟦EQ1⟧&lt;/code&gt;, &lt;code&gt;⟦EQ2⟧&lt;/code&gt;). Then it checks that every placeholder survives the trip through the model and puts the formatted KaTeX back afterward.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Drawing and sticky notes
&lt;/h3&gt;

&lt;p&gt;Engineering notes aren't just text. You need to draw axes, circle things, and write in the margins. &lt;code&gt;DrawingCanvas.tsx&lt;/code&gt; and &lt;code&gt;TextBoxLayer.tsx&lt;/code&gt; give you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;smooth freehand drawing with adjustable color and stroke width&lt;/li&gt;
&lt;li&gt;a semi-transparent highlighter&lt;/li&gt;
&lt;li&gt;text boxes you can move and resize, sitting right above the rendered equations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. A PDF engine that doesn't mangle math
&lt;/h3&gt;

&lt;p&gt;Inkwell doesn't render your notes a second time on the server. The preview on your screen is the source of truth, and the PDF is a snapshot of it. When you hit export, the React frontend serializes its live DOM, with the KaTeX math already rendered, and sends it to &lt;code&gt;/api/compile-pdf&lt;/code&gt;. The backend wraps that HTML in print CSS and hands it to Playwright's headless Chromium, which produces a multi-page vector PDF.&lt;/p&gt;

&lt;p&gt;That means the math fonts stay crisp, your annotations come along, and there's no second rendering pipeline to drift out of sync with what you were looking at. It's also why Inkwell skips &lt;code&gt;window.print()&lt;/code&gt;, which tends to rasterize or clip equations.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Putting it on Render
&lt;/h3&gt;

&lt;p&gt;Gemma does the thinking, and Render hosts the part people actually open. The frontend is deployed on Render, so Asuna (or anyone else) can use Inkwell from a link, with nothing to install and no setup before a study session.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cost.&lt;/strong&gt; Many AI study tools sit behind closed APIs and monthly subscriptions that a lot of students can't justify. Open-weight models like Gemma make a tool like this possible without that price tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privacy.&lt;/strong&gt; Lecture notes can include unpublished research, lab data or personal study logs, and some hosted AI services may use prompts for training. Because Gemma's weights are open, the same model can run on your own machine through Ollama or vLLM, so your notes don't have to leave your laptop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Freedom to tinker.&lt;/strong&gt; Since Inkwell is MIT-licensed, anyone can change the LaTeX rules, add chemistry support with mhchem, build a theme for their university's thesis format, or self-host it offline in a lecture hall with no Wi-Fi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Inkwell is built around Google's open-weight Gemma models, which turn raw STEM notes into clean Markdown and accurate LaTeX.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; Inkwell is a hybrid deployment on Render. The React frontend runs as a Static Site and the FastAPI backend runs as a Docker Web Service, which lets Playwright's headless Chromium render the PDFs. The live demo above runs there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I made this to fix a real problem for Asuna and me, and to give back those hours of manual LaTeX every weekend.&lt;/p&gt;

&lt;p&gt;Made with ❤️ for Hacktoberfest 2026.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
