Skip to content

Instantly share code, notes, and snippets.

@michal-h21
michal-h21 / scale.css
Created August 19, 2014 17:09
Responsive typography css style from Viljami Salminen with modifications for tex4ht. source http://viljamis.com/blog/2012/typography/
/*
###### ###### ### ## ########
## ## ## ## ## ## ## ##
## ## ## ## ## ##
###### ## ## ## ## ######
## ## ######### ## ##
## ## ## ## ## ## ## ##
###### ###### ## ## ######## ########
http://viljamis.com/blog/2012/typography/
kpse.set_program_name("luatex")
local load_enc = function()
local f = "t1.tsv"
local i = 0
local uni = {}
local chars = {}
for line in io.lines(f) do
local c = string.explode(line,"\t")
hex = c[3]
if hex then
@michal-h21
michal-h21 / hello.cfg
Last active August 30, 2015 08:55
LaTeX to TEI conversion. context: http://tex.stackexchange.com/q/263548/2891
\renewcommand\SetSemanticMarkup[1]{\typeout{semantic markup}}
\Preamble{xhtml,tei}
\Configure{VERSION}{}
\Configure{DOCTYPE}{}
\Configure{HTML}{\HCode{<TEI xmlns="http://www.tei-c.org/ns/1.0">\Hnewline}}{\HCode{\Hnewline</TEI>}}
\ifdefined\ifmathml\else
\newif\ifmathml
\mathmlfalse
\fi
\csname :CheckOption\endcsname{mathml}\csname if:Option\endcsname\mathmltrue\fi
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"><head> <title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" />
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" />
<!-- charset=utf-8,html,xhtml,mathml,NLM,charset=UTF-8,-xtpipes,NoFonts,refcaption,ext=.xhtml -->
<meta name="src" content="sample.tex" />
@michal-h21
michal-h21 / luatex-hyphen.lua
Created November 5, 2015 16:15
this is modified LuaLaTeX language loader with interface to retrieve language ids and names
--
-- This is file `luatex-hyphen.lua',
-- generated with the docstrip utility.
--
-- The original source files were:
--
-- luatex-hyphen.dtx (with options: `lua')
--
-- This is a generated file (source: luatex-hyphen.dtx).
--
@michal-h21
michal-h21 / Makefile
Created November 16, 2015 18:38
Luarock for justeneoughharfbuzz compilation
all: justenoughharfbuzz.so
justenoughharfbuzz.so: justenoughharfbuzz.o
$(CC) $(LIBFLAG) -lharfbuzz $< -o $@
justenoughharfbuzz.o: justenoughharfbuzz.c
$(CC) -c $(CFLAGS) -I$(HARFBUZZ_INCDIR) -I$(FREETYPE_INCDIR) $< -o $@
\documentclass{article}
\usepackage{uninormalize}
\usepackage{fontspec}
% \setmainfont{Linux Libertine O}
\begin{document}
áá
\end{document}
@michal-h21
michal-h21 / biblatex.4ht
Created December 21, 2016 11:48
tex4ht configuration for biblatex
% biblatex.4ht (2016-12-21-00:16), generated from tex4ht-4ht.tex
% Copyright 2007-2009 Eitan M. Gurari
% Copyright 2009-2016 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
% usepackage-fontspec.4ht (2017-05-03-20:34), generated from tex4ht-4ht.tex
% Copyright 2017 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
% of LaTeX version 2005/12/01 or later.
@michal-h21
michal-h21 / gist:ac3e6a4dfbd31d6efafd43d83d27fd9c
Created July 31, 2018 18:49
output from task sync command
c: INFO Server certificate will be verified but hostname ignored.
c: 2 added 5 protocols, 29 ciphersuites, 15 sig algos and 8 groups into priority list
c: 2 Keeping ciphersuite c0.2c (GNUTLS_ECDHE_ECDSA_AES_256_GCM_SHA384)
c: 2 Keeping ciphersuite cc.a9 (GNUTLS_ECDHE_ECDSA_CHACHA20_POLY1305)
c: 2 Keeping ciphersuite c0.ad (GNUTLS_ECDHE_ECDSA_AES_256_CCM)
c: 2 Keeping ciphersuite c0.0a (GNUTLS_ECDHE_ECDSA_AES_256_CBC_SHA1)
c: 2 Keeping ciphersuite c0.2b (GNUTLS_ECDHE_ECDSA_AES_128_GCM_SHA256)
c: 2 Keeping ciphersuite c0.ac (GNUTLS_ECDHE_ECDSA_AES_128_CCM)
c: 2 Keeping ciphersuite c0.09 (GNUTLS_ECDHE_ECDSA_AES_128_CBC_SHA1)
c: 2 Keeping ciphersuite c0.30 (GNUTLS_ECDHE_RSA_AES_256_GCM_SHA384)