Skip to content

Instantly share code, notes, and snippets.

@michal-h21
michal-h21 / config.cfg
Created Apr 2, 2022
Configuration for TeX4ht that uses <th> tags for table header
View config.cfg
\Preamble{xhtml}
\catcode`\:=11
% configuration for tabular with support of change of table cell tag
% this code comes from TeX4ht sources
% default table cell tag:
\def\tablecelltype{td}
\Configure{tabular}
{\ifvmode \IgnorePar\fi \EndP \halignTB{tabular}\putVBorder }
{\HCode{</table>}}
{\HCode{<tr \Hnewline}\halignTR
View gemrss
#!/usr/bin/env texlua
-- get feed from gemini or https, and replace links to gemini with links to HTML proxy
-- it is meant for use with Newsboat.
-- to use it, add a similar line to your "urls" file:
-- "exec: gemrss gemini://marginalia.nu/log/feed.xml"
local socket = require("socket")
local ports = {gemini = 1965, https = 443, http = 80}
local commands = {
View latex.4ht
% latex.4ht (2021-06-24-21:37), generated from tex4ht-4ht.tex
% Copyright 1997-2009 Eitan M. Gurari
% Copyright 2009-2021 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
@michal-h21
michal-h21 / unicode-math-hooks.4ht
Created Apr 8, 2021
unicode-math support for TeX4ht
View unicode-math-hooks.4ht
\:dontusepackage{unicode-math}
\usepackage{fontspec}
\NewDocumentCommand \setmathfont { O{} m O{} }{}
View ooffice.4ht
% ooffice.4ht (2021-01-07-14:02), generated from tex4ht-ooffice.tex
% Copyright 2009-2019 TeX Users Group
% Copyright 2001-2009 Maarten Wisse, James Naughton, Eitan M. Gurari
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
View biblatex.4ht
% biblatex.4ht (2020-10-05-15:22), generated from tex4ht-4ht.tex
% Copyright 2007-2009 Eitan M. Gurari
% Copyright 2009-2020 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
@michal-h21
michal-h21 / fourier.tex
Created Aug 28, 2020
Compile with etex fourier.tex to generate HTF files
View fourier.tex
% tex {nameofthefile.tex}
%
% Copyright (C) 2018 TeX Users Group
\input tex4ht.sty
\Preamble{xhtml,th4,sections+}
\EndPreamble
\input ProTex.sty
%\AlProTex{c,<<<>>>,`,title,list,ClearCode,_^}
\AlProTex{c,<<<>>>,`,title,list,`,ClearCode,_^}
View mathml.4ht
% mathml.4ht (2020-08-19-17:51), generated from tex4ht-mathml.tex
% Copyright 2009-2020 TeX Users Group
% Copyright 1999-2009 Eitan M. Gurari
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
@michal-h21
michal-h21 / graphics.4ht
Last active Oct 13, 2019
error with image inclusion
View graphics.4ht
% graphics.4ht (2019-09-12-14:02), generated from tex4ht-4ht.tex
% Copyright 1997-2009 Eitan M. Gurari
% Copyright 2009-2019 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
@michal-h21
michal-h21 / sample.tex
Last active Oct 9, 2019
tex4ht configuraton file for xskak.sty. compile with `make4ht sample.tex svg`
View sample.tex
\documentclass[12pt]{article}
\ifdefined\HCode
\def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\fi
\usepackage{xskak}
\begin{document}
\newchessgame[id=main]
\chessboard
\end{document}