Skip to content

Instantly share code, notes, and snippets.

View wtsnjp's full-sized avatar

Takuto Asakura wtsnjp

View GitHub Profile
@wtsnjp
wtsnjp / wtref-showkeys-amsmath.tex
Created December 24, 2023 10:03
This doesn't work well
%#!xelatex
\tracingmacros=1
\documentclass{article}
\usepackage[right=15cm]{geometry}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage[color]{showkeys}
\definecolor{refkey}{gray}{.6}
@wtsnjp
wtsnjp / latex_bot.py
Created December 15, 2023 09:51
LaTeX. Not LaTex.
#
# usage: python latex_bot.py
#
import os
import re
import twitter
import logging
from logging.handlers import RotatingFileHandler

Keybase proof

I hereby claim:

  • I am wtsnjp on github.
  • I am wtsnjp (https://keybase.io/wtsnjp) on keybase.
  • I have a public key whose fingerprint is 7D45 D966 7541 A27F 4E9F 33AB A86A 25E0 5DCC 52FF

To claim this, I am signing this object:

@wtsnjp
wtsnjp / nabeazz.web
Created December 21, 2022 11:52
NabeAzz in WEB
% nabeazz.web
\centerline{\bf A NabeAzz Program}
\centerline{\sl by wtsnjp}
\vskip .5cm
This is my first program to write with the \.{WEB} system. This program is a
solution of the NabeAzz problem, which is a well-known problem in Japanese
{\TeX} community as the counterpart to the FizzBuzz problem
(see \.{https://zrbabbler.hatenablog.com/entry/20110815/1313398638}).
@ First of all, decide how many numbers to print.
#!/usr/bin/env texlua
--
-- This is file 'wtspingif.lua'.
--
-- Copyright 2020 Takuto ASAKURA (wtsnjp)
-- GitHub: https://github.com/wtsnjp
-- Twitter: @wtsnjp
--
-- This package is distributed under the MIT License.
% +++
% latex = "pdflatex"
% sequence = ["latex", "pdf2png", "png2gif"]
%
% [programs.pdf2png]
% command = "magick"
% opts = [
% "%B.pdf",
% "-background white",
% "-alpha remove",
%%
%% 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.
%%
%#!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",