Skip to content

Instantly share code, notes, and snippets.

Yusuke Terada doraTeX

Block or report user

Report or block doraTeX

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@doraTeX
doraTeX / saizeriyaKnapsackDP.tex
Last active May 20, 2019
「サイゼリヤで1000円あれば最大何kcal摂れるのか」をTeX言語で計算する ~TeX言語で動的計画法(DP)~ https://doratex.hatenablog.jp/entry/20190520/1558323856
View saizeriyaKnapsackDP.tex
%#!(u)platex
\documentclass[dvipdfmx,autodetect-engine]{jsarticle}
\usepackage{pgffor}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
\tcbset{enhanced jigsaw,colback=red!5!white,colframe=red!75!black,breakable,fonttitle=\gtfamily,before upper=\setlength\parindent{1zw}}
\makeatletter
@doraTeX
doraTeX / uuid.sty
Created Apr 30, 2019
A LaTeX package for generating UUID Version 4
View uuid.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{uuid}[2019/04/30 v0.1]
\newif\ifuuid@lowercase
\uuid@lowercasefalse
\DeclareOption{lowercase}{\uuid@lowercasetrue}
\ProcessOptions\relax
@doraTeX
doraTeX / randomshuffle.sty
Last active Jan 18, 2019
A LaTeX package for random shuffling
View randomshuffle.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{randomshuffle}[2019/01/18 v0.2]
\RequirePackage{keyval}
\ifdefined\pdfuniformdeviate
\let\randomshuffle@uniformdeviate\pdfuniformdeviate
\let\randomshuffle@setrandomseed\pdfsetrandomseed
\else\ifdefined\uniformdeviate
\let\randomshuffle@uniformdeviate\uniformdeviate
\let\randomshuffle@setrandomseed\setrandomseed
@doraTeX
doraTeX / currentpage.tex
Last active May 15, 2019
jsarticle + mag + gentombow + pdfbox + pxpgfmark の両立実験
View currentpage.tex
% (u)pLaTeX + dvipdfmx
\documentclass[8pt,b6paper,dvipdfmx,autodetect-engine,tombo]{jsarticle}
\usepackage[pdfbox]{gentombow}
\usepackage{tikz}
\usepackage{pxpgfmark}
\def\test{%
\begin{tikzpicture}[remember picture, overlay]
\coordinate (NE) at (current page.north east);
@doraTeX
doraTeX / generateQRcode.swift
Last active Feb 15, 2019
QR Code Generator written in Swift 4
View generateQRcode.swift
import Quartz
extension CGImage {
class func qrCodeImage(from string: String, scale: CGFloat = 1) -> CGImage? {
let stringData = string.data(using: .utf8)
let transform = CGAffineTransform(scaleX: scale, y: scale)
guard let filter = CIFilter(name: "CIQRCodeGenerator") else {
return nil
}
View Sierra-FontList.txt
32 /System/Library/Fonts/Apple Braille Outline 6 Dot.ttf
36 /System/Library/Fonts/Apple Braille Outline 8 Dot.ttf
24 /System/Library/Fonts/Apple Braille Pinpoint 6 Dot.ttf
24 /System/Library/Fonts/Apple Braille Pinpoint 8 Dot.ttf
16 /System/Library/Fonts/Apple Braille.ttf
88304 /System/Library/Fonts/Apple Color Emoji.ttc
532 /System/Library/Fonts/Apple Symbols.ttf
17096 /System/Library/Fonts/AppleSDGothicNeo.ttc
12980 /System/Library/Fonts/AquaKana.ttc
64 /System/Library/Fonts/ArialHB.ttc
View HighSierra-fcquery.txt
File: /Library/Fonts/AppleGothic.ttf
id 0
Name: AppleGothic
Format: TrueType
Lang: de|fj|ho|ia|ig|ie|io|ko|nds|nr|om|so|ss|st|sw|ts|uz|vo|xh|yap|zu|kj|kwm|lg|ms|ng|rn|rw|sn|za
File: /Library/Fonts/AppleMyungjo.ttf
id 0
Name: AppleMyungjo
View HighSierra-FontList.txt
196 /System/Library/Fonts/SFCompactDisplay-Heavy.otf
200 /System/Library/Fonts/SFCompactText-Medium.otf
212 /System/Library/Fonts/SFCompactRounded-Bold.otf
152 /System/Library/Fonts/SFNSTextCondensed-Bold.otf
17420 /System/Library/Fonts/AppleSDGothicNeo.ttc
472 /System/Library/Fonts/SFNSDisplay.ttf
972 /System/Library/Fonts/Menlo.ttc
32772 /System/Library/Fonts/STHeiti Medium.ttc
212 /System/Library/Fonts/SFCompactRounded-Medium.otf
136 /System/Library/Fonts/SFNSTextCondensed-Medium.otf
@doraTeX
doraTeX / chemfig_hiragino.tex
Created May 3, 2017
chemfig の原子出力にヒラギノ従属欧文を使う例 (LuaLaTeX)
View chemfig_hiragino.tex
%! lualatex
\documentclass{ltjsarticle}
\usepackage{chemfig}
\usepackage[hiragino-pron]{luatexja-preset}
\usepackage{unicode-math}
\setmathfontface\chemrm{HiraginoSans-W3.ttc} %% ヒラギノ角ゴシック W3 で数式の文字を出す命令 \chemrm を定義
\def\printatom#1{\ensuremath{\chemrm{#1}}} %% chemfig の原子出力命令を \chemrm に変更
\begin{document}
@doraTeX
doraTeX / Sierra-CK-ttcinfo.txt
Created Dec 13, 2016
Sierraの中韓TTCフォントの詳細情報
View Sierra-CK-ttcinfo.txt
$ texlua ttcinfo.lua /Library/Fonts/Songti.ttc
ttcinfo: tag: ttcf
ttcinfo: version: 131072
ttcinfo: #fonts: 8
ttcinfo: offset: {56,276,528,780,1032,1284,1536,1788}
ttcinfo: Font #1: Songti_1.ttf
ttcinfo: Font #2: Songti_2.ttf
ttcinfo: Font #3: Songti_3.ttf
ttcinfo: Font #4: Songti_4.ttf
You can’t perform that action at this time.