Skip to content

Instantly share code, notes, and snippets.

@h20y6m
h20y6m / jfont-in-encoding.tex
Last active March 8, 2023 14:30
新しい upLaTeX で min10 してみるやつ
View jfont-in-encoding.tex
%#!uplatex
%% upLaTeX で min10 してみる
%% TeX Live 2023 以降の uplatex が必要
% ----------------------------------------------------------------------
% どうして uplatex じゃないの?
\ifnum\jis"2121="3000 \else
\typeout{Why not run `uplatex'?}
@h20y6m
h20y6m / tate-tcolorbox-dvipdfmx.tex
Created January 20, 2023 12:28
LaTeX: (u)pLaTeX + dvipdfmxで縦組みでtcolorboxを使ってみる。
View tate-tcolorbox-dvipdfmx.tex
%#! ptex2pdf -u -l
%
% (u)pLaTeX + dvipdfmxで縦組みでtcolorboxを使ってみる。
%
% 【警告】
% 下記のコードはtcolorboxではなくTikZ/PGFのsystemlayerに変更を加えます!
% 最悪TikZ/PGF関連のすべてが壊れます!
% 「わかっている人」以外は使わないように!
%
% 【注意】
@h20y6m
h20y6m / zenkaku.sty
Created June 4, 2022 13:58
LaTeX: 全角にする
View zenkaku.sty
%%
%% This is file 'zenkaku.sty'.
%%
%% Copyright (c) 2022 Yukimasa Morimi (h20y6m)
%% GitHub: https://github.com/h20y6m
%%
%% This package is distributed under the MIT License.
%%
\NeedsTeXFormat{LaTeX2e}
@h20y6m
h20y6m / platex-lab.sty
Last active May 31, 2022 14:20
(u)pLaTeX で latex-lab するためのなにか
View platex-lab.sty
\ExplSyntaxOn
% (u)pLaTeXでなければ何もしない
\bool_lazy_or:nnF
{ \sys_if_engine_ptex_p: }
{ \sys_if_engine_uptex_p: }
{
\ExplSyntaxOff
\file_input_stop:
}
@h20y6m
h20y6m / l3str-ptex-utf8.tex
Last active May 6, 2022 11:56
l3str-convert with (u)pLaTeX
View l3str-ptex-utf8.tex
%#!platex -no-guess-input-enc -kanji=utf8
% -*- coding: utf-8 -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% l3names
%
\ExplSyntaxOn
% \tex_toucs:D already part of expl3 <2022-04-10>
%\tex_global:D \tex_let:D \tex_toucs:D \toucs
\ExplSyntaxOff
@h20y6m
h20y6m / texadvent2021_2.md
Last active December 30, 2021 07:04
(u)pLaTeXでPDF出力?
View texadvent2021_2.md

(u)pLaTeXでPDF出力?

これは「TeX & LaTeX Advent Calendar 2021」の4日目の記事です。 (3日目は CareleSmith9 さん、5日目は doraTeX さんです。)

この記事はカレンダーが埋まらなさそうなとき用に用意したくだらないネタです。

まだまだ空きがあるので皆さん登録しましょう!!

はじめに

@h20y6m
h20y6m / texadvent2021.md
Last active December 30, 2021 03:46
独自TeX Liveリポジトリを作ってみる話
View texadvent2021.md

独自TeX Liveリポジトリを作ってみる話

これは「TeX & LaTeX Advent Calendar 2021」の2日目の記事です。 (1日目は zr_tex8r さん、3日目は CareleSmith9 さんです。)

この記事ではpTeXの開発版バイナリを独自リポジトリからTeX Live Managerを使用してインストールする方法を紹介します。

実際に作成したものは以下にあります。

@h20y6m
h20y6m / adjust-shipout-hook-origin.tex
Created August 28, 2021 08:19
LaTeX: shipout/background, shipout/foreground フックの原点を補正する。
View adjust-shipout-hook-origin.tex
%% shipout/background, shipout/foreground フックの原点を補正する。
%\documentclass[dvipdfmx,a4j,12pt]{jarticle}
%\usepackage{bounddvi}
%\documentclass[dvipdfmx,a4j,12pt,tombow]{jarticle}
%\usepackage{bounddvi}
%\documentclass[dvipdfmx,a4j,12pt,tombow]{jarticle}
@h20y6m
h20y6m / texadvent2020.md
Last active January 7, 2021 04:57
(u)pLaTeXでもjlreqクラスで多書体化したい
View texadvent2020.md

(u)pLaTeXでもjlreqクラスで多書体化したい

これはTeX & LaTeX Advent Calendar 2020の3日目の記事です。2日目はbd_gfngfnさんでした。4日目はwtsnjpさんです。

この記事では(u)pLaTeX上のjlreqクラスで多書体化する方法と、拙作のjlreq-deluxeパッケージの紹介をします。

otfパッケージで多書体化する方法

(u)pLaTeXで多書体化と言えば真っ先に思いつくのはotfパッケージのdeluxeオプションでしょう。

@h20y6m
h20y6m / onlyequation.tex
Created October 10, 2020 05:37
別行立て数式環境のみのタイプセット
View onlyequation.tex
%#!platex
%
% 別行立て数式環境のみのタイプセット
% https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2952
%
\documentclass[dvipdfmx]{jsreport}
%%%%%%%%%%%%%%%%%%%% BEGIN CODE %%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOn