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
## | |
## A Snowman for everyone! | |
## | |
$the_cow = <<EOC; | |
$thoughts | |
$thoughts _[_]_ | |
(") | |
>-( : )-< | |
(__:__) | |
EOC |
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
% plain TeX | |
\catcode`@=11 | |
\def\x@cmd(#1){\edef\x@tmp{#1}\ifx\x@tmp\empty | |
o\expandafter\x@cmd\else\x@fin #1\fi}\def\x@fin'#1'{#1} | |
\catcode`g=13\chardef\x@s=`g\defg{\char\x@s\x@cmd} | |
\catcode`@=12 | |
% tests | |
\noindent | |
g('al')\break |
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{article} | |
\usepackage{expl3} | |
\ExplSyntaxOn | |
% \my_ack:nn { <m> } { <n> } | |
\cs_new:Npn \my_ack:nn #1#2 | |
{ | |
\int_compare:nNnTF { #1 } = { \c_zero_int } | |
{ % m = 0 | |
\int_eval:n { #2 + 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{article} | |
\newcommand{\inlineTag}{% | |
\refstepcounter{equation}% | |
\bgroup\normalfont\normalcolor (\theequation)\egroup} | |
\begin{document} | |
This is a sample inline math: $x\;\inlineTag\label{math:x}$. | |
Look at Equation (\ref{math:x})! |
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
% plain TeX | |
\catcode`@=11 | |
\def\EvenOrOdd#1{\x@even@or@odd\empty #1\@nil} | |
\def\x@even@or@odd#1#2{% | |
\ifx#2\@nil | |
\x@hop@else\x@@even@or@odd #11\relax | |
\else | |
\x@hop@fi\x@even@or@odd{#1-}% | |
\fi} | |
\def\x@@even@or@odd#1\relax{\ifnum#1>\z@\expandafter E\else\expandafter O\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
%#!lualatex | |
\documentclass{article} | |
\usepackage{expl3} | |
\begin{document} | |
\ExplSyntaxOn | |
\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx } | |
\cs_new:Npn \my_test:n #1 { | |
\int_eval:n { #1 * 3 } | | |
} |
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
#compdef texdoc | |
# | |
# This is file '_texdoc' a zsh completion script for texdoc. | |
# | |
# Copyright (c) 2018 Takuto ASAKURA (wtsnjp) | |
# GitHub: https://github.com/wtsnjp | |
# Twitter: @wtsnjp | |
# | |
# This script is distributed under the MIT License. |
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
# | |
# This is file 'ltxpkg-install.zsh'. | |
# | |
# Copyright (c) 2018 Takuto ASAKURA (wtsnjp) | |
# GitHub: https://github.com/wtsnjp | |
# Twitter: @wtsnjp | |
# | |
# This package is distributed under the MIT License. | |
# |
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{article} | |
\usepackage{textcomp} | |
\makeatletter | |
\let\orgtexttt\texttt | |
\edef\x@store{\the\catcode`\'} | |
\catcode`\'=\active | |
\def\texttt{% | |
\bgroup | |
\catcode`\'=\active |
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
%#!lualatex | |
\documentclass[12pt]{beamer} | |
\usepackage{arev} | |
\usepackage[T1]{fontenc} | |
\usepackage{graphicx} | |
% hack | |
\IfFileExists{self.pdf}{% | |
\directlua{os.rename("self.pdf", "self2.pdf")} |