<?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: 川口晃世（Kosei Kawaguchi）</title>
    <description>The latest articles on DEV Community by 川口晃世（Kosei Kawaguchi） (@kktex).</description>
    <link>https://dev.to/kktex</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%2F3730677%2Fb577cf2a-0014-48db-a1d4-e8aa238ef2b1.jpeg</url>
      <title>DEV Community: 川口晃世（Kosei Kawaguchi）</title>
      <link>https://dev.to/kktex</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kktex"/>
    <language>en</language>
    <item>
      <title>How Classical Chinese Is Traditionally Annotated in Japan</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Sat, 01 Aug 2026 16:44:12 +0000</pubDate>
      <link>https://dev.to/kktex/how-classical-chinese-is-traditionally-annotated-in-japan-2m18</link>
      <guid>https://dev.to/kktex/how-classical-chinese-is-traditionally-annotated-in-japan-2m18</guid>
      <description>&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I maintain TeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt;, including &lt;a href="https://ctan.org/pkg/gckanbun" rel="noopener noreferrer"&gt;&lt;code&gt;gckanbun&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In Japan, Classical Chinese can be read through a traditional annotation system called &lt;em&gt;kanbun kundoku&lt;/em&gt;. The Chinese text remains in place while tiny marks encode a Japanese reading.&lt;/p&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%2Fmn7sjqum8k3tdcs5dsd4.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%2Fmn7sjqum8k3tdcs5dsd4.png" alt="Three layers of kanbun kundoku: original Classical Chinese, Japanese annotations, and Japanese reading order" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the tiny marks?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Furigana&lt;/strong&gt; are small kana showing Japanese pronunciation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Okurigana&lt;/strong&gt; add Japanese verb endings and grammatical particles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kaeriten&lt;/strong&gt;, or "return marks," tell the reader when to reverse the order of characters.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;rereading character&lt;/strong&gt; is read twice, with a different Japanese form each time.&lt;/li&gt;
&lt;/ul&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%2F19rrom4o87sns9z5a1t4.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%2F19rrom4o87sns9z5a1t4.png" alt="Four kinds of kanbun annotations: furigana, okurigana, kaeriten, and a rereading character" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The annotations are not decoration. Together they carry pronunciation, grammar, and reading order without rewriting the original text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Typesetting it with TeX
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gckanbun&lt;/code&gt; keeps the source editable while handling the delicate placement of all those marks. It supports LuaLaTeX and (u)pLaTeX, is included in TeX Live, and is released under the MIT License.&lt;/p&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%2F4mnq035649ozruxq9jk5.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%2F4mnq035649ozruxq9jk5.png" alt="A short gckanbun source example beside its compiled output" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ctan.org/pkg/gckanbun" rel="noopener noreferrer"&gt;gckanbun on CTAN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/munepi/gckanbun" rel="noopener noreferrer"&gt;Source on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;📘 &lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; turns a photo or screenshot of a mathematics problem into a polished, reference-book-style solution PDF.&lt;/p&gt;

&lt;p&gt;✍️ &lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; opens a LaTeX panel beside your cursor and pastes the finished formula into the app you are already using. It is free and requires no account.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What is the most unusual writing or annotation system you have typeset with TeX?&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>latex</category>
      <category>opensource</category>
      <category>japanese</category>
    </item>
    <item>
      <title>Engineering a Japanese Exam-Prep Handout with LuaLaTeX and tcolorbox</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Thu, 30 Jul 2026 01:06:18 +0000</pubDate>
      <link>https://dev.to/kktex/engineering-a-japanese-exam-prep-handout-with-lualatex-and-tcolorbox-3o53</link>
      <guid>https://dev.to/kktex/engineering-a-japanese-exam-prep-handout-with-lualatex-and-tcolorbox-3o53</guid>
      <description>&lt;p&gt;&lt;em&gt;Measured headers, drawing layers, and page-break states for a dense three-page mathematics booklet.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I publish LaTeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt; and maintain a private toolkit for producing books and teaching materials.&lt;/p&gt;

&lt;p&gt;In the shorter companion article, I treated a Japanese exam-preparation handout as information design. This article opens the implementation.&lt;/p&gt;

&lt;p&gt;The result is a three-page LuaLaTeX document:&lt;/p&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%2F0pe8zwdzf905ics8k3aq.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%2F0pe8zwdzf905ics8k3aq.png" alt="Page 1 of the technical handout" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&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%2Fl7smepsrgmjb0tmtrqph.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%2Fl7smepsrgmjb0tmtrqph.png" alt="Page 2 of the technical handout" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&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%2F6gy2ife8jp8c41bs7nw2.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%2F6gy2ife8jp8c41bs7nw2.png" alt="Page 3 of the technical handout" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The design is original. Tetsuryokukai is a useful public reference point for Japan's highly selective &lt;em&gt;juku&lt;/em&gt;—private after-school education—culture, but this is not a reproduction of its material, and I am not claiming that it uses TeX. The organization publicly describes itself as a University of Tokyo preparation school for students in six-year secondary programs (&lt;a href="https://www.tetsuryokukai.co.jp/index.html" rel="noopener noreferrer"&gt;official profile&lt;/a&gt;). The wider social context is also substantial: the OECD describes private after-school lessons as a pervasive part of Japanese education (&lt;a href="https://www.oecd.org/en/publications/education-policy-in-japan_9789264302402-en/full-report/component-5.html" rel="noopener noreferrer"&gt;OECD overview&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The technical problem is independent of any one institution:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do we build a compact visual language that remains stable when titles change, solutions grow, and boxes cross pages?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The frame grammar grows from two families in my private toolkit: &lt;code&gt;ascolorbox4&lt;/code&gt;, which cuts a rule with its title and combines different rail styles, and later ornate-frame experiments with explicit corner geometry. I call this production variant the &lt;strong&gt;Rinceau Frame / 唐草額&lt;/strong&gt;. It keeps the dotted outer boundary, title interruption, inward quarter-circle corners, and four terminals of &lt;code&gt;ascolorbox4&lt;/code&gt;, then rebuilds the terminals as compact C-scroll and palmette ornaments. The result deliberately looks like a Western book frame, but the ornament remains outside the mathematics.&lt;/p&gt;

&lt;p&gt;I will focus on four implementation decisions, followed by two editorial ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Model pedagogical roles, not appearances
&lt;/h2&gt;

&lt;p&gt;The document does not contain a generic &lt;code&gt;FancyBox&lt;/code&gt;. It contains components named after their jobs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\LessonHeading&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;11&lt;span class="p"&gt;}{&lt;/span&gt;LECTURE&lt;span class="p"&gt;}{&lt;/span&gt;A Moving Minimum&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{DrillBox}&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;PROBLEM 18&lt;span class="p"&gt;}{&lt;/span&gt;Quadratic Optimization&lt;span class="p"&gt;}&lt;/span&gt;[3]
  ...
&lt;span class="nt"&gt;\end{DrillBox}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{StrategyBox}&lt;/span&gt;
  ...
&lt;span class="nt"&gt;\end{StrategyBox}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{SolutionBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;SOLUTION&lt;span class="p"&gt;}&lt;/span&gt;
  ...
&lt;span class="nt"&gt;\end{SolutionBox}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{KeyPointBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;STRUCTURAL MAP / 見通し&lt;span class="p"&gt;}&lt;/span&gt;
  ...
&lt;span class="nt"&gt;\end{KeyPointBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This matters when a book grows.&lt;/p&gt;

&lt;p&gt;If an editor later decides that every strategy should use a left rule instead of a filled background, the content files do not change. If every problem needs a difficulty marker, the &lt;code&gt;DrillBox&lt;/code&gt; interface already has one.&lt;/p&gt;

&lt;p&gt;The markup carries semantics; the style file carries the visual system.&lt;/p&gt;

&lt;p&gt;The implementation uses &lt;code&gt;\DeclareTColorBox&lt;/code&gt; rather than a collection of copied &lt;code&gt;\newtcolorbox&lt;/code&gt; definitions. Its xparse-style argument specification gives each component a small, explicit interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\DeclareTColorBox&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;DrillBox&lt;span class="p"&gt;}{&lt;/span&gt;m m O&lt;span class="p"&gt;{&lt;/span&gt;2&lt;span class="p"&gt;}&lt;/span&gt; O&lt;span class="p"&gt;{}}{&lt;/span&gt;
  ...
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the first mandatory argument is the problem number;&lt;/li&gt;
&lt;li&gt;the second is the topic;&lt;/li&gt;
&lt;li&gt;the first optional argument selects the &lt;code&gt;基礎&lt;/code&gt; / &lt;code&gt;標準&lt;/code&gt; / &lt;code&gt;発展&lt;/code&gt; level;&lt;/li&gt;
&lt;li&gt;the final optional argument accepts ordinary &lt;code&gt;tcolorbox&lt;/code&gt; overrides.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Preserve a grammar, not a screenshot
&lt;/h2&gt;

&lt;p&gt;The design started by treating &lt;code&gt;ascolorbox4&lt;/code&gt; as a set of invariants:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the title cuts the top rail;&lt;/li&gt;
&lt;li&gt;a dotted boundary sits outside a solid rail;&lt;/li&gt;
&lt;li&gt;every corner turns through an inward quarter-circle;&lt;/li&gt;
&lt;li&gt;every corner has a visible terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the Western vocabulary, I studied public-domain museum material rather than tracing a modern border. The Metropolitan Museum's ornamental designs show scrolling acanthus, palmettes, garlands, and pearl strips; Cooper Hewitt's catalog describes frame designs built from &lt;em&gt;rinceaux&lt;/em&gt;, flowers, scrolls, shells, rosettes, and bead-like rails (&lt;a href="https://www.metmuseum.org/art/collection/search/746162" rel="noopener noreferrer"&gt;Met example&lt;/a&gt;, &lt;a href="https://www.si.edu/object/ornamental-frame-design%3Achndm_1921-6-267-12" rel="noopener noreferrer"&gt;Cooper Hewitt frame design&lt;/a&gt;, &lt;a href="https://www.si.edu/object/album-ornanment-designs%3Achndm_1921-6-213" rel="noopener noreferrer"&gt;Cooper Hewitt ornament album&lt;/a&gt;). I reduced that vocabulary to one mirrored C-scroll and a three-leaf palmette small enough for a study booklet.&lt;/p&gt;

&lt;p&gt;The title is attached to the frame instead of positioned with an absolute coordinate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;attach boxed title to top left=&lt;span class="p"&gt;{&lt;/span&gt;
  xshift=10mm,
  yshift=-&lt;span class="k"&gt;\tcboxedtitleheight&lt;/span&gt;/2
&lt;span class="p"&gt;}&lt;/span&gt;,
boxed title style=&lt;span class="p"&gt;{&lt;/span&gt;
  colback=white,
  colframe=white,
  boxrule=0pt,
  left=2mm,
  right=2mm
&lt;span class="p"&gt;}&lt;/span&gt;,
borderline=&lt;span class="p"&gt;{&lt;/span&gt;.55pt&lt;span class="p"&gt;}{&lt;/span&gt;2.7pt&lt;span class="p"&gt;}{&lt;/span&gt;ehBlue,dotted&lt;span class="p"&gt;}&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The white title field is not a badge pasted over the frame. It is a controlled interruption: the solid and dotted rails disappear behind it, then resume at &lt;code&gt;title.east&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The main rail is a single path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\draw&lt;/span&gt;[ehAccent,line width=.72pt,
      line cap=round,line join=round]
  ([xshift=2mm]title.east|-frame.north east)
  --([xshift=-7mm]frame.north east)
  arc[start angle=180,end angle=270,radius=7mm]
  --([yshift=7mm]frame.south east)
  arc[start angle=90,end angle=180,radius=7mm]
  --([xshift=7mm]frame.south west)
  arc[start angle=0,end angle=90,radius=7mm]
  --([yshift=-7mm]frame.north west)
  arc[start angle=270,end angle=360,radius=7mm]
  --([xshift=-2mm]title.west|-frame.north west);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A second, thinner antique-gold path is inset by 2 mm. That pair reads as picture-frame molding. The outer dotted &lt;code&gt;borderline&lt;/code&gt; preserves the lighter rail contrast of &lt;code&gt;ascolorbox4&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This follows a principle I use throughout my Japanese Qiita articles:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If an ornament depends on a box, derive it from the box. If it depends on a title, derive it from the title.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The geometry can therefore survive a new title, a taller solution, or a different page width.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Put each line on the correct drawing layer
&lt;/h2&gt;

&lt;p&gt;An advanced &lt;code&gt;tcolorbox&lt;/code&gt; is easier to reason about as a layer stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;finish
overlay
content
underlay
interior
frame
shadow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The title box has its own corresponding layers.&lt;/p&gt;

&lt;p&gt;The navy rail, gold inset molding, and four ornaments belong in the &lt;code&gt;underlay&lt;/code&gt;: they must sit below the mathematics. The difficulty marker belongs in an &lt;code&gt;overlay&lt;/code&gt;, because its white field intentionally knocks out a small portion of the top rail.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\DeclareTColorBox&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;DrillBox&lt;span class="p"&gt;}{&lt;/span&gt;m m O&lt;span class="p"&gt;{&lt;/span&gt;2&lt;span class="p"&gt;}&lt;/span&gt; O&lt;span class="p"&gt;{}}{&lt;/span&gt;
  enhanced,
  breakable,
  empty,
  sharp corners,
  title=&lt;span class="p"&gt;{&lt;/span&gt;#1&lt;span class="k"&gt;\hspace&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;2.2mm&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\color&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehGold&lt;span class="p"&gt;}&lt;/span&gt;/&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\hspace&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;2.2mm&lt;span class="p"&gt;}&lt;/span&gt;#2&lt;span class="p"&gt;}&lt;/span&gt;,
  left=9mm,
  right=9mm,
  top=5mm,
  bottom=5mm,
  borderline=&lt;span class="p"&gt;{&lt;/span&gt;.55pt&lt;span class="p"&gt;}{&lt;/span&gt;2.7pt&lt;span class="p"&gt;}{&lt;/span&gt;ehBlue,dotted&lt;span class="p"&gt;}&lt;/span&gt;,
  underlay unbroken=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameUnbroken&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
  underlay first=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameFirst&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
  underlay middle=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameMiddle&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
  underlay last=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameLast&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
  overlay unbroken and first=&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;% the 基礎 / 標準 / 発展 marker&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;empty&lt;/code&gt; removes the default skin. The component then draws only the parts of the selected grammar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one rounded solid rail;&lt;/li&gt;
&lt;li&gt;one thinner inset molding;&lt;/li&gt;
&lt;li&gt;one dotted offset boundary;&lt;/li&gt;
&lt;li&gt;one title interruption;&lt;/li&gt;
&lt;li&gt;four C-scroll and palmette terminals;&lt;/li&gt;
&lt;li&gt;a &lt;code&gt;基礎&lt;/code&gt; / &lt;code&gt;標準&lt;/code&gt; / &lt;code&gt;発展&lt;/code&gt; level chip.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This avoids a common failure mode: drawing a custom frame on top of a default frame and then chasing tiny disagreements in corner radius and line position.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A breakable box has four drawings
&lt;/h2&gt;

&lt;p&gt;The solution box is allowed to grow. Therefore it cannot have one frame path.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tcolorbox&lt;/code&gt; exposes four states:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;unbroken  one-page box
first     first fragment of a broken box
middle    intermediate fragment
last      final fragment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fragment drawings are assigned accordingly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;underlay unbroken=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameUnbroken&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
underlay first=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameFirst&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
underlay middle=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameMiddle&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
underlay last=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameLast&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first fragment draws the title, top corners, and vertical continuations. A middle fragment draws only two pairs of vertical rails. The last fragment draws the bottom corners and closes the frame.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ehFrameLast&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\draw&lt;/span&gt;[ehAccent,line width=.72pt,
        line cap=round,line join=round]
    (frame.north east)
    --([yshift=7mm]frame.south east)
    arc[start angle=90,end angle=180,radius=7mm]
    --([xshift=7mm]frame.south west)
    arc[start angle=0,end angle=90,radius=7mm]
    --(frame.north west);
  &lt;span class="k"&gt;\ehFrameBottomCorners&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The direction of those arcs matters. The last fragment is traced from the right edge to the left edge, matching the angle sequence used by the original &lt;code&gt;ascolorbox4&lt;/code&gt;. Reversing the path without also reversing the angles makes the bottom rail leave the corner diagonally—a defect that can hide in a one-page test and appear only after a forced page break.&lt;/p&gt;

&lt;p&gt;On the middle fragment, there are no fake corners and no repeated ornament. Treating the four states as separate drawings is not an optimization. It is the correct model.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Keep visual weight scarce
&lt;/h2&gt;

&lt;p&gt;The page uses eight named colors, each with a narrow role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehInk&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;202428&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehMuted&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;667085&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehLine&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;AEB5BF&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehPale&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;F3F4F6&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehAccent&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;34435F&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehBlue&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;8292AE&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehGold&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;A37B3C&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ehVermilion&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;B4442E&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ehInk&lt;/code&gt; carries mathematics and hard structure;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehAccent&lt;/code&gt; carries navigation and the main frame rail;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehBlue&lt;/code&gt; carries the dotted offset boundary;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehGold&lt;/code&gt; carries the inset molding and palmette leaves;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehLine&lt;/code&gt; remains available for quiet separators;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehPale&lt;/code&gt; is limited to secondary label fields.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehMuted&lt;/code&gt; carries running metadata;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ehVermilion&lt;/code&gt; appears only in advanced-level and answer signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not to make every component visibly different. The point is to make different components recognizable without making the page compete with itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Design the return visit
&lt;/h2&gt;

&lt;p&gt;The third PDF page is a review page, not another full solution.&lt;/p&gt;

&lt;p&gt;Its prompts ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What does “for every real &lt;em&gt;x&lt;/em&gt;” become?&lt;/li&gt;
&lt;li&gt;Which variable is currently being optimized?&lt;/li&gt;
&lt;li&gt;Do strict inequalities exclude the endpoints?&lt;/li&gt;
&lt;li&gt;Is the claimed maximum attained?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a typesetting decision as much as a teaching decision. A weekly booklet is a retrieval system. Numbering, labels, and stable component shapes help a student find a previous method quickly.&lt;/p&gt;

&lt;p&gt;That is why a dense handout can benefit from stronger visual structure than a conventional textbook chapter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compilation environment
&lt;/h2&gt;

&lt;p&gt;I compiled the specimen with LuaLaTeX and &lt;code&gt;ltjsarticle&lt;/code&gt;. When recreating the example from these excerpts, place the component definitions in &lt;code&gt;exam-handout.sty&lt;/code&gt; beside &lt;code&gt;technical-handout.tex&lt;/code&gt;, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lualatex &lt;span class="nt"&gt;-interaction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;nonstopmode &lt;span class="nt"&gt;-halt-on-error&lt;/span&gt; technical-handout.tex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example uses &lt;code&gt;ltjsarticle&lt;/code&gt;, matching my Japanese material workflow. The visible content is mostly English, but the component labels can contain Japanese micro-labels such as &lt;code&gt;要点&lt;/code&gt; and &lt;code&gt;見通し&lt;/code&gt; without changing the geometry.&lt;/p&gt;

&lt;p&gt;The box system is built on &lt;a href="https://ctan.org/pkg/tcolorbox" rel="noopener noreferrer"&gt;&lt;code&gt;tcolorbox&lt;/code&gt;&lt;/a&gt;, whose current CTAN release supports framed boxes, split content, and breakable material.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Disclosure: these are my projects.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; converts a photographed mathematics problem into a polished solution PDF. It is useful when the finished explanation needs the visual discipline of a reference book.&lt;/p&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%2Fxsrxnj4j1n0mbqfsn94x.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%2Fxsrxnj4j1n0mbqfsn94x.png" alt="Evolton interface and solution-PDF examples" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; keeps formula entry close to the cursor, so mathematical writing does not have to pause for a separate editor.&lt;/p&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%2Fe45gsspz3q59z7x8emxy.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%2Fe45gsspz3q59z7x8emxy.png" alt="MathHover formula panel showing a completed limit and integral" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The deeper lesson is simple: a teaching-material style should not be a collection of attractive boxes. It should be a small visual language whose components survive the text ranges and page lengths they were designed for—and expose clear guard rails when content exceeds them.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>design</category>
      <category>academic</category>
      <category>japan</category>
    </item>
    <item>
      <title>What Japan's Elite Cram-School Handouts Teach Us About Page Design</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Thu, 30 Jul 2026 01:03:44 +0000</pubDate>
      <link>https://dev.to/kktex/what-japans-elite-cram-school-handouts-teach-us-about-page-design-5h6</link>
      <guid>https://dev.to/kktex/what-japans-elite-cram-school-handouts-teach-us-about-page-design-5h6</guid>
      <description>&lt;p&gt;&lt;em&gt;A one-page mathematics handout can tell a student what to do before the teacher says a word.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I publish LaTeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt; and build typesetting tools for education in Japan.&lt;/p&gt;

&lt;p&gt;Japan has a large system of private after-school education known as &lt;em&gt;juku&lt;/em&gt;. One unusually intensive public example is Tetsuryokukai. According to its official profile, it is a six-year secondary-school program specializing in preparation for the University of Tokyo and was founded in 1983 by students and graduates of the university's medical and law faculties (&lt;a href="https://www.tetsuryokukai.co.jp/index.html" rel="noopener noreferrer"&gt;official profile&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The institution is interesting. But for a typesetter, the more interesting question is smaller:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What does an intensive mathematics handout ask the page itself to do?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is my answer, built from scratch in LuaLaTeX:&lt;/p&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%2Fsz8imh187zo7o3xru916.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%2Fsz8imh187zo7o3xru916.png" alt="An original one-page Japanese exam-prep-style mathematics handout" width="800" height="1131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is not a reproduction of a Tetsuryokukai handout, and I am not claiming that the organization uses TeX. It is an original reconstruction of the broader visual grammar surrounding high-density Japanese exam preparation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The page gives instructions
&lt;/h2&gt;

&lt;p&gt;Look at the page before reading the mathematics.&lt;/p&gt;

&lt;p&gt;The dark &lt;code&gt;07&lt;/code&gt; badge answers: &lt;strong&gt;Where am I?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The segmented header answers: &lt;strong&gt;What kind of object is this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The right-hand &lt;code&gt;標準&lt;/code&gt; (&lt;em&gt;standard&lt;/em&gt;) chip answers: &lt;strong&gt;How demanding is it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;STRATEGY&lt;/code&gt; answers: &lt;strong&gt;What should I notice before calculating?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SOLUTION&lt;/code&gt; answers: &lt;strong&gt;How do I verify the argument?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;KEY POINT / 要点&lt;/code&gt; answers: &lt;strong&gt;What should I retain for the next problem?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;QUICK RETRIEVAL&lt;/code&gt; answers: &lt;strong&gt;Can I rebuild it later without rereading?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;None of these elements is merely decorative. Together they turn a page into a sequence of learning actions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;locate;&lt;/li&gt;
&lt;li&gt;classify;&lt;/li&gt;
&lt;li&gt;calibrate;&lt;/li&gt;
&lt;li&gt;choose a method;&lt;/li&gt;
&lt;li&gt;verify;&lt;/li&gt;
&lt;li&gt;remember;&lt;/li&gt;
&lt;li&gt;retrieve.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That sequence is especially useful in a weekly booklet. Students do not read such material once from beginning to end. They return to it before a test, search for a familiar problem type, cover the solution, and try again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dense does not have to mean noisy
&lt;/h2&gt;

&lt;p&gt;An intensive handout needs to carry a great deal of information, but visual weight must remain scarce.&lt;/p&gt;

&lt;p&gt;In this design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;black is reserved for mathematics and the main structure;&lt;/li&gt;
&lt;li&gt;blue-slate identifies navigation;&lt;/li&gt;
&lt;li&gt;a dotted outer boundary and a solid inner rail establish each teaching object;&lt;/li&gt;
&lt;li&gt;a thin antique-gold inset reads like the molding inside a picture frame;&lt;/li&gt;
&lt;li&gt;compact C-scrolls and shell-like palmettes terminate the four corners;&lt;/li&gt;
&lt;li&gt;pale gray is reserved for secondary labels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is dense, but it still has a reading order. I call this production variant the &lt;strong&gt;Rinceau Frame / 唐草額&lt;/strong&gt;. Its structure comes directly from my &lt;code&gt;ascolorbox4&lt;/code&gt; experiments: the title interrupts the top rail, a dotted boundary sits outside it, and inward quarter-circles turn all four corners. I then rebuilt those corner terminals with the grammar of a Western picture frame—C-scrolls, a small palmette, and a second molding line—without letting the ornament enter the reading column.&lt;/p&gt;

&lt;p&gt;The most important design decision is not the color. It is placing the strategy &lt;em&gt;before&lt;/em&gt; the full solution. A student first receives a way into the problem, not an answer to copy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The TeX idea
&lt;/h2&gt;

&lt;p&gt;The page uses one reusable component for each pedagogical role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\LessonHeading&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;07&lt;span class="p"&gt;}{&lt;/span&gt;LESSON&lt;span class="p"&gt;}{&lt;/span&gt;A Parameter and a Quadratic&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{DrillBox}&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;EXAMPLE 12&lt;span class="p"&gt;}{&lt;/span&gt;Positive for Every Real &lt;span class="k"&gt;\textit&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;x&lt;span class="p"&gt;}}&lt;/span&gt;[2]
  ...
&lt;span class="nt"&gt;\end{DrillBox}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{StrategyBox}&lt;/span&gt;
  ...
&lt;span class="nt"&gt;\end{StrategyBox}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{SolutionBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;SOLUTION&lt;span class="p"&gt;}&lt;/span&gt;
  ...
&lt;span class="nt"&gt;\end{SolutionBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The content says what an object &lt;em&gt;means&lt;/em&gt;. The style file decides how that meaning should look.&lt;/p&gt;

&lt;p&gt;That separation is what makes TeX unusually well suited to systematic teaching materials: the visual language can remain stable across hundreds of pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Disclosure: these are my projects.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; turns a photograph or screenshot of a mathematics problem into a polished solution PDF. It treats the answer as a teaching object, not merely a block of correct text.&lt;/p&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%2Fxsrxnj4j1n0mbqfsn94x.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%2Fxsrxnj4j1n0mbqfsn94x.png" alt="Evolton interface and solution-PDF examples" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; opens a LaTeX panel beside the cursor and inserts the finished formula into the application you are already using.&lt;/p&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%2Fe45gsspz3q59z7x8emxy.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%2Fe45gsspz3q59z7x8emxy.png" alt="MathHover formula panel showing a completed limit and integral" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next article opens the same component system and explains the engineering behind title-cut rails, ornamental corner geometry, and page-break states in a longer specimen.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>design</category>
      <category>academic</category>
      <category>japan</category>
    </item>
    <item>
      <title>Build a Ghost-Number Section Heading in LaTeX</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Tue, 28 Jul 2026 11:24:22 +0000</pubDate>
      <link>https://dev.to/kktex/build-a-ghost-number-section-heading-in-latex-ki9</link>
      <guid>https://dev.to/kktex/build-a-ghost-number-section-heading-in-latex-ki9</guid>
      <description>&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I publish LaTeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt; and build typesetting tools for education in Japan.&lt;/p&gt;

&lt;p&gt;In many Japanese mathematics books, a section heading is not merely larger text. It is page architecture: number, hierarchy, and reading rhythm.&lt;/p&gt;

&lt;p&gt;This article makes one heading with a pale “ghost number” and a restrained blue rule.&lt;/p&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%2Fd3t2mjerh8lkik4ub1j0.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%2Fd3t2mjerh8lkik4ub1j0.png" alt="Preview of the ghost-number section heading" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The drawing
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;tikz&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qink&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0F172A&lt;span class="p"&gt;}&lt;/span&gt;         &lt;span class="c"&gt;% slate-900&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qline&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;CBD5E1&lt;span class="p"&gt;}&lt;/span&gt;        &lt;span class="c"&gt;% slate-300&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccent&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;38BDF8&lt;span class="p"&gt;}&lt;/span&gt;      &lt;span class="c"&gt;% sky-400&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentDark&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0369A1&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c"&gt;% sky-700&lt;/span&gt;

&lt;span class="k"&gt;\newcounter&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;booksection&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\NewDocumentCommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\BookSection&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;m&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\refstepcounter&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;booksection&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\par\medskip\noindent&lt;/span&gt;
  &lt;span class="nt"&gt;\begin{tikzpicture}&lt;/span&gt;
    &lt;span class="k"&gt;\useasboundingbox&lt;/span&gt;
      (0,0) rectangle (&lt;span class="k"&gt;\linewidth&lt;/span&gt;,-2.7&lt;span class="k"&gt;\baselineskip&lt;/span&gt;);

    &lt;span class="k"&gt;\node&lt;/span&gt;[
      anchor=base west,text=qline,
      font=&lt;span class="k"&gt;\sffamily\bfseries&lt;/span&gt;
            &lt;span class="k"&gt;\fontsize&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;40pt&lt;span class="p"&gt;}{&lt;/span&gt;40pt&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\selectfont&lt;/span&gt;
    ] at (0,-1.55&lt;span class="k"&gt;\baselineskip&lt;/span&gt;)
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ifnum\value&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;booksection&lt;span class="p"&gt;}&lt;/span&gt;&amp;lt;10 0&lt;span class="k"&gt;\fi&lt;/span&gt;
       &lt;span class="k"&gt;\arabic&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;booksection&lt;span class="p"&gt;}}&lt;/span&gt;;

    &lt;span class="k"&gt;\node&lt;/span&gt;[
      anchor=base west,text=qaccentDark,
      font=&lt;span class="k"&gt;\sffamily\scriptsize\bfseries&lt;/span&gt;
    ] at (26mm,-.55&lt;span class="k"&gt;\baselineskip&lt;/span&gt;) &lt;span class="p"&gt;{&lt;/span&gt;LESSON&lt;span class="p"&gt;}&lt;/span&gt;;

    &lt;span class="k"&gt;\node&lt;/span&gt;[
      anchor=base west,text=qink,
      font=&lt;span class="k"&gt;\sffamily\Large\bfseries&lt;/span&gt;
    ] at (26mm,-1.45&lt;span class="k"&gt;\baselineskip&lt;/span&gt;) &lt;span class="p"&gt;{&lt;/span&gt;#1&lt;span class="p"&gt;}&lt;/span&gt;;

    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qaccent,line width=.8pt]&lt;/span&gt;
      (26mm,-2.2&lt;span class="k"&gt;\baselineskip&lt;/span&gt;)
      -- (.78&lt;span class="k"&gt;\linewidth&lt;/span&gt;,-2.2&lt;span class="k"&gt;\baselineskip&lt;/span&gt;);
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qline,line width=.8pt]&lt;/span&gt;
      (.78&lt;span class="k"&gt;\linewidth&lt;/span&gt;,-2.2&lt;span class="k"&gt;\baselineskip&lt;/span&gt;)
      -- (&lt;span class="k"&gt;\linewidth&lt;/span&gt;,-2.2&lt;span class="k"&gt;\baselineskip&lt;/span&gt;);

    &lt;span class="k"&gt;\foreach&lt;/span&gt; &lt;span class="k"&gt;\x&lt;/span&gt; in &lt;span class="p"&gt;{&lt;/span&gt;0,1,2&lt;span class="p"&gt;}{&lt;/span&gt;
      &lt;span class="k"&gt;\fill&lt;/span&gt;&lt;span class="na"&gt;[qaccentDark]&lt;/span&gt;
        ([xshift=-&lt;span class="k"&gt;\x*&lt;/span&gt;3.4mm]&lt;span class="k"&gt;\linewidth&lt;/span&gt;,
          -.55&lt;span class="k"&gt;\baselineskip&lt;/span&gt;)
        circle[radius=1.2pt];
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;\end{tikzpicture}&lt;/span&gt;
  &lt;span class="k"&gt;\par\smallskip&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use it once per section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\BookSection&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Completing the Square&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compilation note: my figure source uses &lt;code&gt;ltjsarticle&lt;/code&gt; with LuaLaTeX, matching my Japanese material workflow. The heading itself also works inside an ordinary &lt;code&gt;article&lt;/code&gt; document.&lt;/p&gt;

&lt;p&gt;The page gets a clear hierarchy, ordered here by visual importance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The dark title carries meaning.&lt;/li&gt;
&lt;li&gt;The small &lt;code&gt;LESSON&lt;/code&gt; label identifies the component.&lt;/li&gt;
&lt;li&gt;The pale number helps navigation without competing for attention.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The component-system idea comes from my private book-production toolkit, &lt;code&gt;kkbookmaker&lt;/code&gt;, but the ghost-number design is new for this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the number is large but pale
&lt;/h2&gt;

&lt;p&gt;Japanese reference books often expose structure more aggressively than ordinary prose books. A student may jump between an example, its solution, a related exercise, and a later review page. Strong numbering helps that movement, but a dark oversized number would compete with the mathematics.&lt;/p&gt;

&lt;p&gt;The ghost number solves both problems: it is large enough to find quickly and light enough to sit behind the reading hierarchy. The title remains the darkest element, while the small &lt;code&gt;LESSON&lt;/code&gt; label tells the reader what kind of marker this is. This is navigation, not decoration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;p&gt;Disclosure: I'm promoting both projects in this section.&lt;/p&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%2Fmvwj7cbyzrxjld0stngh.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%2Fmvwj7cbyzrxjld0stngh.png" alt="Evolton interface and solution-PDF examples" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; turns a photo or screenshot of a mathematics problem into a reference-book-style worked-solution PDF. Its database lets you browse university entrance-exam material by university, faculty, and year.&lt;/p&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%2Fpf4zpo8tdl26ap1fw8x2.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%2Fpf4zpo8tdl26ap1fw8x2.png" alt="MathHover LaTeX input panel" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; opens a LaTeX input panel beside your cursor, then pastes the finished formula into your current app. It is free to use and requires no account.&lt;/p&gt;

&lt;p&gt;Next in the series: Japanese-born CTAN packages for answer fields, Kanbun, underlining, and more.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>design</category>
      <category>academic</category>
      <category>japan</category>
    </item>
    <item>
      <title>Build a Star-Rated Example Box in LaTeX</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Tue, 28 Jul 2026 11:22:56 +0000</pubDate>
      <link>https://dev.to/kktex/build-a-star-rated-example-box-in-latex-3818</link>
      <guid>https://dev.to/kktex/build-a-star-rated-example-box-in-latex-3818</guid>
      <description>&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I publish LaTeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt; and build typesetting tools for education in Japan.&lt;/p&gt;

&lt;p&gt;A Japanese exam-prep page often tells you three things before the problem begins: its number, its topic, and its difficulty. That compact metadata turns a dense booklet into something students can scan and revisit.&lt;/p&gt;

&lt;p&gt;Today we will make one component: a worked-example box with two measured header segments and a three-star difficulty scale.&lt;/p&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%2Fc7gpvxdcqf0s40bmae4k.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%2Fc7gpvxdcqf0s40bmae4k.png" alt="A measured ExampleBox for a quadratic-inequality problem" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The locator above the box and the bold problem statement are page content from my figure source, not automatic parts of &lt;code&gt;ExampleBox&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure first, then draw
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="na"&gt;[most]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;tcolorbox&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usetikzlibrary&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;shapes.geometric&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qink&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0F172A&lt;span class="p"&gt;}&lt;/span&gt;         &lt;span class="c"&gt;% slate-900&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qline&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;CBD5E1&lt;span class="p"&gt;}&lt;/span&gt;        &lt;span class="c"&gt;% slate-300&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentDark&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0369A1&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c"&gt;% sky-700&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentPale&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;E0F2FE&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c"&gt;% sky-100&lt;/span&gt;

&lt;span class="k"&gt;\newlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\newlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTitleWidth&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\newlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTopicWidth&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\newlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTopicX&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\setlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;6.2mm&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleSegmentFont&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="k"&gt;\sffamily\bfseries\fontsize&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;8.5&lt;span class="p"&gt;}{&lt;/span&gt;10&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\selectfont&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\DeclareTColorBox&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;ExampleBox&lt;span class="p"&gt;}{&lt;/span&gt; m m o O&lt;span class="p"&gt;{&lt;/span&gt;2&lt;span class="p"&gt;}&lt;/span&gt; O&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  enhanced,
  empty,
  sharp corners,
  before=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\def\ExampleTitleText&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      #1&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\IfValueT&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;#3&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
        &lt;span class="k"&gt;\hspace&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;1.5mm&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\fontsize&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;6&lt;span class="p"&gt;}{&lt;/span&gt;7&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\selectfont&lt;/span&gt; #3&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\settowidth&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTitleWidth&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\ExampleSegmentFont\ExampleTitleText&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\settowidth&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTopicWidth&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\ExampleSegmentFont&lt;/span&gt; #2
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\setlength&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTopicX&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\dimexpr\ExampleTitleWidth&lt;/span&gt;+7.7mm&lt;span class="k"&gt;\relax&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\par\noindent&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;,
  enlarge top by=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;,
  left=5mm, right=3mm, top=3.5mm, bottom=3.5mm,
  underlay unbroken=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="c"&gt;% Measured title segment&lt;/span&gt;
    &lt;span class="k"&gt;\fill&lt;/span&gt;&lt;span class="na"&gt;[qaccentDark]&lt;/span&gt;
      ([yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north west)
      -- ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTitleWidth&lt;/span&gt;+6.5mm&lt;span class="k"&gt;\relax&lt;/span&gt;,
           yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north west)
      -- ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTitleWidth&lt;/span&gt;+6.5mm
                         -.5&lt;span class="k"&gt;\ExampleHeadHeight\relax&lt;/span&gt;]
           frame.north west)
      -- (frame.north west)
      -- cycle;
    &lt;span class="k"&gt;\node&lt;/span&gt;[anchor=west,inner sep=0pt,text=white,
          font=&lt;span class="k"&gt;\ExampleSegmentFont&lt;/span&gt;]
      at ([xshift=2.5mm,yshift=.5&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]
          frame.north west)
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\ExampleTitleText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;;

    &lt;span class="c"&gt;% Measured topic segment with the same shear&lt;/span&gt;
    &lt;span class="k"&gt;\fill&lt;/span&gt;&lt;span class="na"&gt;[qaccentPale]&lt;/span&gt;
      ([xshift=&lt;span class="k"&gt;\ExampleTopicX&lt;/span&gt;,yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]
        frame.north west)
      -- ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTopicX&lt;/span&gt;+&lt;span class="k"&gt;\ExampleTopicWidth&lt;/span&gt;
                         +5mm&lt;span class="k"&gt;\relax&lt;/span&gt;,
           yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north west)
      -- ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTopicX&lt;/span&gt;+&lt;span class="k"&gt;\ExampleTopicWidth&lt;/span&gt;
                         +5mm-.5&lt;span class="k"&gt;\ExampleHeadHeight\relax&lt;/span&gt;]
           frame.north west)
      -- ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTopicX&lt;/span&gt;
                         -.5&lt;span class="k"&gt;\ExampleHeadHeight\relax&lt;/span&gt;]
           frame.north west)
      -- cycle;
    &lt;span class="k"&gt;\node&lt;/span&gt;[anchor=west,inner sep=0pt,text=qink,
          font=&lt;span class="k"&gt;\ExampleSegmentFont&lt;/span&gt;]
      at ([xshift=&lt;span class="k"&gt;\dimexpr\ExampleTopicX&lt;/span&gt;+2.5mm
                         -.25&lt;span class="k"&gt;\ExampleHeadHeight\relax&lt;/span&gt;,
           yshift=.5&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north west)
      &lt;span class="p"&gt;{&lt;/span&gt;#2&lt;span class="p"&gt;}&lt;/span&gt;;

    &lt;span class="c"&gt;% Right-anchored stars; #4 is the filled count.&lt;/span&gt;
    &lt;span class="k"&gt;\foreach&lt;/span&gt; &lt;span class="k"&gt;\i&lt;/span&gt; in &lt;span class="p"&gt;{&lt;/span&gt;1,2,3&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\ifnum\i&lt;/span&gt;&amp;gt;#4&lt;span class="k"&gt;\relax&lt;/span&gt;
        &lt;span class="k"&gt;\node&lt;/span&gt;[star,star points=5,star point ratio=2.2,
          minimum size=2.6mm,inner sep=0pt,
          fill=white,draw=qline,line width=.4pt]
          at ([xshift=&lt;span class="p"&gt;{&lt;/span&gt;-2.3mm-(3-&lt;span class="k"&gt;\i&lt;/span&gt;)*3.4mm&lt;span class="p"&gt;}&lt;/span&gt;,
               yshift=.5&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]
               frame.north east) &lt;span class="p"&gt;{}&lt;/span&gt;;
      &lt;span class="k"&gt;\else&lt;/span&gt;
        &lt;span class="k"&gt;\node&lt;/span&gt;[star,star points=5,star point ratio=2.2,
          minimum size=2.6mm,inner sep=0pt,
          fill=qaccentDark,draw=qaccentDark,line width=.4pt]
          at ([xshift=&lt;span class="p"&gt;{&lt;/span&gt;-2.3mm-(3-&lt;span class="k"&gt;\i&lt;/span&gt;)*3.4mm&lt;span class="p"&gt;}&lt;/span&gt;,
               yshift=.5&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]
               frame.north east) &lt;span class="p"&gt;{}&lt;/span&gt;;
      &lt;span class="k"&gt;\fi&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;

    &lt;span class="c"&gt;% Open frame: a strong spine and three quiet rules.&lt;/span&gt;
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=1.5pt]&lt;/span&gt;
      ([xshift=.75pt,yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]
        frame.north west)
      -- ([xshift=.75pt]frame.south west);
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=.5pt]&lt;/span&gt;
      ([yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north west)
      -- ([yshift=&lt;span class="k"&gt;\ExampleHeadHeight&lt;/span&gt;]frame.north east);
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=.5pt]&lt;/span&gt;
      (frame.north west) -- (frame.north east);
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=.5pt]&lt;/span&gt;
      (frame.south west) -- (frame.south east);
  &lt;span class="p"&gt;}&lt;/span&gt;,
  #5
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The normal call is portable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="nt"&gt;\begin{ExampleBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;EXAMPLE 07&lt;span class="p"&gt;}{&lt;/span&gt;Quadratic Inequalities&lt;span class="p"&gt;}&lt;/span&gt;
Find all real &lt;span class="p"&gt;\(&lt;/span&gt;&lt;span class="nb"&gt;a&lt;/span&gt;&lt;span class="p"&gt;\)&lt;/span&gt; such that
&lt;span class="p"&gt;\[&lt;/span&gt;&lt;span class="nb"&gt;
  x&lt;/span&gt;&lt;span class="p"&gt;^&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nb"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nb"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="nb"&gt;&amp;gt;&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;
&lt;/span&gt;&lt;span class="p"&gt;\]&lt;/span&gt;
for every real &lt;span class="p"&gt;\(&lt;/span&gt;&lt;span class="nb"&gt;x&lt;/span&gt;&lt;span class="p"&gt;\)&lt;/span&gt;.
&lt;span class="nt"&gt;\end{ExampleBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first optional argument adds a LuaLaTeX Japanese label; the second sets the filled-star count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="nt"&gt;\begin{ExampleBox}&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;EXAMPLE 07&lt;span class="p"&gt;}{&lt;/span&gt;Quadratic Inequalities&lt;span class="p"&gt;}&lt;/span&gt;[例題][2]
  ...
&lt;span class="nt"&gt;\end{ExampleBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important rule is simple: measure with the exact font used to draw. Both polygons then grow with their text, while &lt;code&gt;\ExampleHeadHeight&lt;/code&gt; controls the band and both parallel shears.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the strategy appears before the answer
&lt;/h2&gt;

&lt;p&gt;Japanese self-study books often separate the &lt;em&gt;way in&lt;/em&gt; from the full solution. For example, the exam-prep series described by Suken Publishing places a &lt;code&gt;指針&lt;/code&gt; (strategy) before each solution and uses side notes for formulas and extra explanation (&lt;a href="https://prtimes.jp/main/html/rd/p/000000013.000056817.html" rel="noopener noreferrer"&gt;publisher release&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;That is why the preview says &lt;code&gt;STRATEGY&lt;/code&gt; before calculating (D&amp;lt;0). The line is ordinary content inside the same box—not a second component.&lt;/p&gt;

&lt;p&gt;This measured-header pattern grew from &lt;code&gt;KKfbox11&lt;/code&gt; and &lt;code&gt;KKfbox8&lt;/code&gt; in my private &lt;code&gt;kkbookmaker&lt;/code&gt; toolkit. I kept the genre's information hierarchy but replaced its proportions, colors, glyph stars, and frame construction.&lt;/p&gt;

&lt;p&gt;This design and its proportions are new for this series. It is not affiliated with, and does not copy, Suken Publishing, a particular textbook series, or any school.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;p&gt;Disclosure: I'm promoting both projects in this section.&lt;/p&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%2Fmvwj7cbyzrxjld0stngh.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%2Fmvwj7cbyzrxjld0stngh.png" alt="Evolton interface and solution-PDF examples" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; turns a photo or screenshot of a mathematics problem into a polished, reference-book-style solution PDF. Its database is browsable by university, faculty, and year.&lt;/p&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%2Fpf4zpo8tdl26ap1fw8x2.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%2Fpf4zpo8tdl26ap1fw8x2.png" alt="MathHover LaTeX input panel" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; opens a LaTeX panel beside your cursor and pastes the finished formula into the app you are already using. It is free and requires no account.&lt;/p&gt;

&lt;p&gt;Next: a section heading with a ghost number.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>design</category>
      <category>academic</category>
      <category>japan</category>
    </item>
    <item>
      <title>Build a Chamfered Key-Point Box in LaTeX</title>
      <dc:creator>川口晃世（Kosei Kawaguchi）</dc:creator>
      <pubDate>Tue, 28 Jul 2026 11:21:41 +0000</pubDate>
      <link>https://dev.to/kktex/build-a-chamfered-key-point-box-in-latex-38j4</link>
      <guid>https://dev.to/kktex/build-a-chamfered-key-point-box-in-latex-38j4</guid>
      <description>&lt;p&gt;Hi, I'm &lt;a href="https://x.com/KKTeX_LaTeX3" rel="noopener noreferrer"&gt;KKTeX&lt;/a&gt;. I publish LaTeX packages on &lt;a href="https://ctan.org/author/kktex" rel="noopener noreferrer"&gt;CTAN&lt;/a&gt; and build typesetting tools for education in Japan.&lt;/p&gt;

&lt;p&gt;Japanese study guides use small, repeated labels—&lt;code&gt;要点&lt;/code&gt; (key point), &lt;code&gt;例題&lt;/code&gt; (worked example), &lt;code&gt;指針&lt;/code&gt; (strategy)—as navigation. The frame is not merely decoration: it tells the learner what kind of reading to do.&lt;/p&gt;

&lt;p&gt;Today we will make one component: a print-friendly key-principle box with a title tab whose chamfer stays at 45 degrees.&lt;/p&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%2F6ago4tbt8x750rd8rziw.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%2F6ago4tbt8x750rd8rziw.png" alt="A chamfered KeyPointBox showing the AM-GM inequality" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The small locator above the box is page context from my figure source, not part of the component.&lt;br&gt;
The gray closing sentence and right-aligned Japanese tag are ordinary box content, not generated automatically by &lt;code&gt;KeyPointBox&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The component
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="na"&gt;[most]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;tcolorbox&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qink&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0F172A&lt;span class="p"&gt;}&lt;/span&gt;         &lt;span class="c"&gt;% slate-900&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qline&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;CBD5E1&lt;span class="p"&gt;}&lt;/span&gt;        &lt;span class="c"&gt;% slate-300&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentDark&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;0369A1&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c"&gt;% sky-700&lt;/span&gt;
&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentPale&lt;span class="p"&gt;}{&lt;/span&gt;HTML&lt;span class="p"&gt;}{&lt;/span&gt;E0F2FE&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c"&gt;% sky-100&lt;/span&gt;

&lt;span class="k"&gt;\DeclareTColorBox&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;KeyPointBox&lt;span class="p"&gt;}{&lt;/span&gt; m o O&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  enhanced,
  empty,
  sharp corners,
  arc=0pt,
  outer arc=0pt,
  left=5mm, right=5mm, top=4mm, bottom=4mm,
  enlarge top by=6mm,
  attach boxed title to top left=&lt;span class="p"&gt;{&lt;/span&gt;xshift=0mm,yshift=0mm&lt;span class="p"&gt;}&lt;/span&gt;,
  boxed title style=&lt;span class="p"&gt;{&lt;/span&gt;
    empty,
    arc=0pt,
    outer arc=0pt,
    boxrule=0pt,
    top=1.4mm, bottom=1.4mm,
    left=3mm, right=3mm,
  &lt;span class="p"&gt;}&lt;/span&gt;,
  fonttitle=&lt;span class="k"&gt;\sffamily\bfseries\fontsize&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;8.5&lt;span class="p"&gt;}{&lt;/span&gt;10&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\selectfont&lt;/span&gt;,
  coltitle=white,
  title=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    #1&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\IfValueT&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;#2&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\hspace&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;2mm&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\textcolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;white&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\rule&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;.4pt&lt;span class="p"&gt;}{&lt;/span&gt;2.2mm&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
      &lt;span class="k"&gt;\hspace&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;2mm&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\fontsize&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;6&lt;span class="p"&gt;}{&lt;/span&gt;7&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;\selectfont&lt;/span&gt;
        &lt;span class="k"&gt;\textcolor&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;qaccentPale&lt;span class="p"&gt;}{&lt;/span&gt;#2&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;,
  underlay boxed title=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\fill&lt;/span&gt;&lt;span class="na"&gt;[qink]&lt;/span&gt;
      (title.north west) rectangle (title.south east);
    &lt;span class="k"&gt;\fill&lt;/span&gt;&lt;span class="na"&gt;[qaccentDark]&lt;/span&gt;
      (title.north east)
      -- +(&lt;span class="k"&gt;\dimexpr\tcboxedtitleheight&lt;/span&gt;-.6mm&lt;span class="k"&gt;\relax&lt;/span&gt;,
           -&lt;span class="k"&gt;\dimexpr\tcboxedtitleheight&lt;/span&gt;-.6mm&lt;span class="k"&gt;\relax&lt;/span&gt;)
      -- (title.south east)
      -- cycle;
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=.5pt]&lt;/span&gt;
      ([xshift=&lt;span class="k"&gt;\dimexpr\tcboxedtitleheight&lt;/span&gt;-.6mm&lt;span class="k"&gt;\relax&lt;/span&gt;]
        title.south east)
      -- (title.south east-|frame.east);
  &lt;span class="p"&gt;}&lt;/span&gt;,
  underlay unbroken=&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="c"&gt;%&lt;/span&gt;
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qink,line width=.5pt]&lt;/span&gt;
      (title.south west-|frame.west)
      -- (frame.south west)
      -- (frame.south east)
      -- (title.south east-|frame.east);
    &lt;span class="k"&gt;\draw&lt;/span&gt;&lt;span class="na"&gt;[qline,line width=.3pt]&lt;/span&gt;
      ([xshift=-1.2pt]title.south east-|frame.east)
      -- ([xshift=-1.2pt,yshift=1.2pt]frame.south east)
      -- ([xshift=1.2pt,yshift=1.2pt]frame.south west);
  &lt;span class="p"&gt;}&lt;/span&gt;,
  #3
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The portable call contains only Latin text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="nt"&gt;\begin{KeyPointBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;KEY PRINCIPLE&lt;span class="p"&gt;}&lt;/span&gt;
For positive reals &lt;span class="p"&gt;\(&lt;/span&gt;&lt;span class="nb"&gt;a,b&lt;/span&gt;&lt;span class="p"&gt;\)&lt;/span&gt;, the arithmetic mean is at least
the geometric mean.
&lt;span class="p"&gt;\[&lt;/span&gt;&lt;span class="nb"&gt;
  &lt;/span&gt;&lt;span class="nv"&gt;\frac&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nb"&gt;b&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;\geq\sqrt&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;ab&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="nb"&gt;
  &lt;/span&gt;&lt;span class="nv"&gt;\qquad&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;a&amp;gt;&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;\ &lt;/span&gt;&lt;span class="nb"&gt;b&amp;gt;&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;
&lt;/span&gt;&lt;span class="p"&gt;\]&lt;/span&gt;
Equality holds if and only if &lt;span class="p"&gt;\(&lt;/span&gt;&lt;span class="nb"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;b&lt;/span&gt;&lt;span class="p"&gt;\)&lt;/span&gt;.
&lt;span class="nt"&gt;\end{KeyPointBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With LuaLaTeX and &lt;code&gt;luatexja&lt;/code&gt;, add the optional Japanese micro-label:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="nt"&gt;\begin{KeyPointBox}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;KEY PRINCIPLE&lt;span class="p"&gt;}&lt;/span&gt;[要点]
  ...
&lt;span class="nt"&gt;\end{KeyPointBox}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The useful trick
&lt;/h2&gt;

&lt;p&gt;Inside &lt;code&gt;underlay boxed title&lt;/code&gt;, &lt;code&gt;\tcboxedtitleheight&lt;/code&gt; is the measured title height. I use &lt;code&gt;\tcboxedtitleheight-.6mm&lt;/code&gt; for both the horizontal run and vertical drop of the blue tail. Equal run and drop give a 45-degree chamfer even when the title font changes.&lt;/p&gt;

&lt;p&gt;The rest stays quiet: white paper, one dark frame, one pale inner rule, and a single accent. Japanese publishers explicitly describe using frames to separate important material while limiting dark colors and the total number of colors to reduce visual stimulation (&lt;a href="https://ten.tokyo-shoseki.co.jp/text/shou_current/sansu/data/sansu_kento.pdf" rel="noopener noreferrer"&gt;Tokyo Shoseki, PDF&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The engineering idea grew from &lt;code&gt;ascolorbox&lt;/code&gt; patterns in my private &lt;code&gt;kkbookmaker&lt;/code&gt; toolkit. This design is not affiliated with Tokyo Shoseki; its proportions are new for this series and do not copy any particular publisher or school.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools from the same desk
&lt;/h2&gt;

&lt;p&gt;Disclosure: I'm promoting both projects in this section.&lt;/p&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%2Fmvwj7cbyzrxjld0stngh.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%2Fmvwj7cbyzrxjld0stngh.png" alt="Evolton interface and solution-PDF examples" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://evolton.jp/" rel="noopener noreferrer"&gt;Evolton&lt;/a&gt;&lt;/strong&gt; turns a photo or screenshot of a mathematics problem into a polished, reference-book-style solution PDF—useful when you want the answer to look teachable, not merely correct.&lt;/p&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%2Fpf4zpo8tdl26ap1fw8x2.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%2Fpf4zpo8tdl26ap1fw8x2.png" alt="MathHover LaTeX input panel" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mathhover.com/" rel="noopener noreferrer"&gt;MathHover&lt;/a&gt;&lt;/strong&gt; opens a LaTeX panel beside your cursor and pastes the finished formula into the app you are already using. It is free and requires no account.&lt;/p&gt;

&lt;p&gt;Next: a worked-example header that measures its own segments.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>design</category>
      <category>academic</category>
      <category>japan</category>
    </item>
  </channel>
</rss>
