TeXConfig.cfg

Last Updated: Jun 18, 2025

Download here.

\Preamble{xhtml,mathml,nostyle} 
\Configure{VERSION}{} 
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}} 
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}} 
\Configure{@HEAD}{\HCode{ 
<script type="text/x-mathjax-config"> 
  MathJax.Hub.Config({ 
    TeX: { 
      Macros: { 
        \unexpanded{ ket: ['{\\left|\#1\\right\\rangle}',1]} 
      }, 
      equationNumbers: { autoNumber: "AMS" } 
    }, 
    extensions: ["tex2jax.js"], 
    tex2jax: { 
        \unexpanded{ 
      inlineMath: [ ['\$','\$'], ["\\\\(","\\\\)"] ], 
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],} 
      processEscapes: true 
    } 
  }); 
</script> 
}} 
\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline 
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"\Hnewline 
></script>\Hnewline}} 
 
\ConfigureEnv{minted}{\NoFonts}{\EndNoFonts}{}{} 
 
\newtoks\eqtoks 
\def\AltMath#1${\eqtoks{$#1$}% 
   \HCode{\the\eqtoks}$} 
\Configure{$}{}{}{\expandafter\AltMath} 
\def\AltlMathI#1\){\eqtoks{\(#1\)}% 
        \HCode{\the\eqtoks}} 
\Configure{()}{\AltlMathI}{} 
\def\AltlDisplay#1\]{\eqtoks{\[#1\]}% 
        \HCode{\the\eqtoks}} 
\Configure{[]}{\AltlDisplay}{} 
\def\AltlDisplayI#1$${\eqtoks{$$#1$$}% 
  \HCode{\the\eqtoks}$$} 
\Configure{$$}{}{}{\expandafter\AltlDisplayI} 
\Css{ 
  @media (max-aspect-ratio: 1/1) { 
    .columns-2 { 
      display: flex; 
      flex-direction: column; 
      gap: 0; 
    } 
    .columns-2 p { 
      margin: 0; 
      padding: 0; 
      padding-bottom: 1em; 
    } 
  } 
  table td, table th { 
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    white-space: normal !important; 
  } 
  html { 
    padding: 3vmin; 
    color: \#D8D8D8; 
  } 
  body { 
    background-color: \#2f3716; 
    font-family: 'Meiryo', 'Hiragino Kaku Gothic Pro', 'Noto Sans CJK JP',  'Noto Sans JP', 'TakaoGothic', 'IPAPGothic', 'BIZ UDPGothic', sans-serif; 
    word-wrap: break-word; 
    font-size: 1.2em; 
    max-width: 69em; 
    margin:auto; 
  } 
  p { 
    text-align: justify; 
    hyphens: auto; 
    margin-bottom: 1em; 
  } 
  a { 
    color: inherit; 
  } 
  .fancyvrb { 
    margin-top: 1em !important; 
    margin-bottom: 1em !important; 
  } 
  .tcolorbox-content { 
    padding-left: 20px; 
  } 
  .selector { 
    font-weight: clamp(550, 3vw, 700); 
  } 
} 
 
\Configure{graphics*} 
   {pdf} 
   {\Needs{"convert '\csname Gin@base\endcsname.pdf' 
           '\csname Gin@base\endcsname.png'"}% 
   \Picture[pict]{\csname Gin@base\endcsname.png}% 
   \special{t4ht+@File: \csname Gin@base\endcsname.png} 
   } 
 
\setcounter{secnumdepth}{0} 
\renewcommand{\maketitle}{ 
  \ifvmode\IgnorePar\fi\EndP\HCode{<div class="maketitle">\Hnewline} 
  \HCode{<h1 class="title">}\thetitle\HCode{</h1>\Hnewline} 
  \HCode{<div class="updated">}{Last Updated: \thedate}\HCode{</div>} 
  \ifvmode\IgnorePar\fi\EndP\HCode{</div>} 
} 
\Css{.maketitle{text-align: left;}} 
\Css{h1.title{font-size:2.5em; text-align: left;}} 
\Css{.updated{text-align: left;}} 
\Css{h2.title{font-size:2em;}} 
\Css{.sectionHead{font-weight: bold; border-bottom: 2px solid; font-size: 1.7em;}} 
\Css{.subsectionHead{font-weight: bold; font-size:1.3em;}} 
\Css{.subsubsectionHead{font-weight: normal; font-size:1.2em;}} 
\Css{html *{ line-height: calc(4px + 2ex + 4px); }} 
\Css{figure p{text-align: center;}} 
\makeatletter 
\ExplSyntaxOn 
\Configure{Gin-dim}{style="width:\fp_eval:n{round(\Gin@req@width/\textwidth*100,2)}\char_generate:nn { `\% } { 12 }"} 
\ExplSyntaxOff 
\makeatother 
\begin{document} 
\EndPreamble