Skip to content

Instantly share code, notes, and snippets.

View wtsnjp's full-sized avatar

Takuto Asakura wtsnjp

View GitHub Profile
%%
%% This is file 'scbxjaholiday.sty'.
%%
%% Copyright 2020 Takuto ASAKURA (wtsnjp)
%% GitHub: https://github.com/wtsnjp
%% Twitter: @wtsnjp
%%
%% This package is distributed under the MIT License.
%%
/*
*
* compile: gcc quicksort.c
* test: ./a.out
*
*/
#include <stdio.h>
enum { SIZE = 9 };
%#!platex
\documentclass[a4paper,dvipdfmx]{jsarticle}
\usepackage{bxjalipsum}
% \enabletoc するまで何も目次に表示させない
\setcounter{tocdepth}{-2}
% 目次記載を始めたい位置で \enabletoc を宣言する
\newcommand{\enabletoc}{%
% tocdepth カウンタの値はお好きなように
%#!platex
\documentclass[a4paper,dvipdfmx]{jsarticle}
\usepackage{bxjalipsum}
% 目次を開始したいページ数を設定
\def\tocStartPage{2}
% TeX 言語ハック
\makeatletter
\let\@ori@contentsline\contentsline
% +++
% clean_files = ["%B.aux", "%B.log", "data.csv"]
% clobber_files = ["%B.pdf", "%B.png", "%B-2.png"]
% sequence = ["tex2img"]
%
% [programs.tex2img]
% command = "tex2img"
% opts = [
% '--latex "lualatex -shell-escape"',
% "--no-transparent",
@wtsnjp
wtsnjp / clsopts.sty
Created December 12, 2019 10:33
LaTeX: local class options
%%
%% This is file 'clsopts.sty'.
%%
%% Copyright 2019 Takuto ASAKURA (wtsnjp)
%% GitHub: https://github.com/wtsnjp
%% Twitter: @wtsnjp
%%
%% This package is distributed under the MIT License.
%%
GS1: Typeset EAN barcodes using TeX rules, only
acro: Typeset acronyms
algobox: Typeset Algobox programs
aligned-overset: Fix alignment at \overset or \underset
beuron: The script of the Beuronese art school
breqn: Automatic line breaking of displayed equations
bxjaholiday: Support for Japanese holidays
cascade: Constructions with braces to present mathematical demonstrations
cellprops: Accept CSS-like selectors in tabular, array, ...
chemformula: Command for typesetting chemical formulas and reactions
\catcode`\@=11
\def\esum#1{\x@esum{\z@}{#1}}
\def\x@hop#1\fi{\fi #1}
\def\x@esum#1#2{%
\ifnum#2<\tw@\number#1\else
\x@hop\expanded{%
\noexpand\x@esum{\the\numexpr #1+#2-\tw@}{\the\numexpr#2-\tw@}%
}\fi}
\esum{90000}\bye
\catcode`\@=11
\def\esum#1{\the\numexpr\x@esum{#1}\relax}
\def\x@esum#1{%
\ifnum#1<\tw@\z@\else
\expandafter\x@esum\expandafter{\numexpr#1-\tw@\relax}+#1\fi}
\esum{100}\bye
@wtsnjp
wtsnjp / bibstalin.bst
Created August 8, 2019 03:05
A BibTeX style for stalin sort
% Joke BibTeX bibliography style `bibstalin'
% Version 0.1 (2019-08-08) for BibTeX versions 0.99a or later.
% Copyright 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
% Copyright 2019 Takuto Asakura (wtsnjp)
% Unlimited copying and redistribution of this file are permitted as long as
% it is unmodified. Modifications (and redistribution of modified versions)
% are also permitted, but only if the resulting file is renamed to something
% besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
% The file btxbst.doc has the documentation for this style.