This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% draw fireworks on pages using http://hanno-rein.de/archives/349 method. | |
\usepackage{eso-pic} | |
\usepackage{pstricks} | |
\newcommand\fireworksPS[1]{ | |
\psset{xunit=#1,yunit=#1,runit=#1} | |
\begin{pspicture}(744.09448242,1052.36218262) | |
{ | |
\newrgbcolor{curcolor}{1.0 0.25 0.75} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Arrows, FlexibleContexts #-} | |
module Main where | |
import Text.XML.HXT.Core | |
import Text.XML.HXT.Arrow.XmlArrow | |
import Control.Arrow | |
import qualified Text.XML.HXT.DOM.XmlNode as XN | |
import Data.List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% replace all tokens; | |
%%% space -> +, leftbrace -> (, rightbrace -> ), others -> *, | |
%%% provided that the argument doesn' have ! and \end. | |
\def\length#1{\spaces{#1!}\notspaces{#1!}} | |
\def\notspaces#1{\beforegroup#1\iffalse{}\fi} | |
\def\beforegroup#1#{\recur#1!\futurelength} | |
\def\recur#1{% | |
\ifx!#1\else*\expandafter\recur\fi} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\def\lst@Init#1{% | |
\begingroup | |
\ifx\lst@float\relax\else | |
\edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}% | |
\expandafter\@tempa | |
\fi | |
\ifx\lst@multicols\@empty\else | |
\edef\lst@next{\noexpand\multicols{\lst@multicols}} | |
\expandafter\lst@next | |
\fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module CssA where | |
import Data.Text hiding (concat, map) | |
import Text.XML.HXT.Core hiding (trace) | |
cssA :: (ArrowList a) => (Text, Text) -> a String String | |
cssA ("font-family", "serif") = arr $ ("\\textsf{"++) . (++"}") | |
cssA ("font-size", v) = arr $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE Arrows, FlexibleContexts #-} | |
import Text.XML.HXT.Core | |
import Text.XML.HXT.Arrow.XmlArrow | |
main :: IO [String] | |
main = do | |
runX (readString [ ] "<html><head>foo</head><body><p>bar</p></body></html>" | |
>>> | |
processBottomUp | |
(processBottomUp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newtoks\mytok | |
\def\torikae#1{\global\mytok\expandafter{#1}\futurelet\cs\dotorikae} | |
\def\dotorikae{\ifx\cs{\iffalse}\fi | |
\let\next\getoptional | |
\else | |
\let\next\relax | |
\the\mytok | |
\fi | |
\next} | |
\def\getoptional#1{% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[dvipdfmx]{jsarticle} | |
\usepackage{xcolor} | |
\usepackage[noalphabet]{pxchfon} | |
\setminchofont{Oradano.ttf} | |
\usepackage[first=1, last=3]{lcg} | |
\makeatletter | |
\newcount\LastFive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%! | |
<< /PageSize [520 520] >> setpagedevice | |
/setrandcolor { | |
/m exch .1 add def | |
/r1 {rand 5 mod 1 div m add} def | |
/r2 {rand 3 mod 3 div m add} def | |
/r3 {rand 3 mod 3 div m add} def | |
r1 r2 r3 setrgbcolor | |
} def |
OlderNewer