Skip to content

Instantly share code, notes, and snippets.

@trueroad
trueroad / Makefile
Last active August 29, 2015 14:16
Unicode Filename Support for MinGW.org / MinGW-w64 Platform Software (__wgetmainargs)
CXX = x86_64-w64-mingw32-g++
testmain: testmain.cc mingw-utf8-commandline.cc mingw-utf8-filename.cc
$(CXX) -static -o testmain \
testmain.cc mingw-utf8-commandline.cc mingw-utf8-filename.cc
clean:
-rm -fr *~
@trueroad
trueroad / Readme.txt
Last active February 15, 2016 16:40
Unicode PDF outline strings sample for plain LuaTeX
% -*- coding:utf-8 -*-
Unicode PDF outline strings sample for plain LuaTeX
Copyright(C) Masamichi Hosoda 2016
下記の 2 環境で動作しました。
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/Cygwin) (rev 5238) (format=luatex 2015.10.17)
This is LuaTeX, Version beta-0.89.1 (TeX Live 2016/W32TeX/dev) (format=luatex 2016.2.11)
@trueroad
trueroad / Makefile
Last active April 30, 2016 13:14
Enumerate the elements of n-th order tensor (C++ class, closure)
CXX = g++
tensor_enum_sample: sample_main.cc tensor_enum.cc tensor_enum.hh
$(CXX) -std=c++11 -o tensor_enum_sample sample_main.cc tensor_enum.cc
clean:
-rm -fr *~
@trueroad
trueroad / Makefile
Last active April 30, 2016 13:14
Enumerate the elements of n-th order tensor (C++ class, CRTP)
CXX = g++
tensor_enum_sample: sample_main.cc tensor_enum.hh
$(CXX) -std=c++11 -o tensor_enum_sample sample_main.cc
clean:
-rm -fr *~
@trueroad
trueroad / Makefile
Last active April 30, 2016 13:16
Enumerate the elements of n-th order tensor (C++ class, virtual function)
CXX = g++
tensor_enum_sample: sample_main.cc tensor_enum.cc tensor_enum.hh
$(CXX) -std=c++11 -o tensor_enum_sample sample_main.cc tensor_enum.cc
clean:
-rm -fr *~
@trueroad
trueroad / Makefile
Last active May 10, 2016 14:59
n-th order tensor storage class
CXX = g++
tensor_stor_sample: sample_main.cc tensor_stor.hh
$(CXX) -std=c++11 -o tensor_stor_sample sample_main.cc
clean:
-rm -fr *~
@trueroad
trueroad / gist:80630e95df5af0234e36270b019e6458
Created April 12, 2018 10:50 — forked from yuw/gist:48764995abf8ed7ab3525fb34fec107f
参考文献の行長を字幅の整数倍にする
\documentclass[twocolumn]{jlreq}
\makeatletter
\renewenvironment{thebibliography}[1]{%
\jlreq@oldfontcommand@enable
\section*{\refname}%
\@mkboth{\refname}{\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\@tempdima\linewidth
@trueroad
trueroad / Makefile
Last active June 5, 2018 00:33
Unicode Filename Support for MinGW-w64 Platform Software (-municode)
CXX = x86_64-w64-mingw32-g++
testmain: testmain.cc mingw-utf8-commandline.cc mingw-utf8-filename.cc
$(CXX) -municode -static -o testmain \
testmain.cc mingw-utf8-commandline.cc mingw-utf8-filename.cc
clean:
-rm -fr *~
@trueroad
trueroad / Makefile
Last active February 17, 2019 13:16
upTeX 用 morisawa パッケージ互換 tfm, vf セット
#
# upTeX 用 morisawa パッケージ互換 tfm, vf セット
# https://gist.github.com/trueroad/f71db83ff0781e677af674172f609266
#
# pLaTeX 用の morisawa パッケージに入っている tfm, vf と
# メトリック互換の upTeX 用 tfm, vf を作ってみました。
#
# 無保証です。これを使った結果何が起きても責任は取りません。
#
# あらかじめ「upTeX 用 jis 互換メトリックセット」を
@trueroad
trueroad / Makefile
Last active February 17, 2019 13:17
源ノ明朝・源ノ角ゴシック otf 版を TeX (dvipdfmx) から見えるところに置く
#
# 源ノ明朝・源ノ角ゴシック otf 版を TeX (dvipdfmx) から見えるところに置く
# https://gist.github.com/trueroad/51c0d3b5bbf3ad1fe25352858e4e2cff
#
# 源ノ明朝・源ノ角ゴシック otf 版のフォントファイルを
# TeX (dvipdfmx) から見えるところに置きます。
# (シンボリックリンクを張ります。)
#
# 無保証です。これを使った結果何が起きても責任は取りません。
#