このスプリプトはshuyo/concatAozora.pyのforkです。
AozoraEpub3を使うと良い。 こんな感じに設定しておくと、目次も良い感じに生成される(細かいところは好みで)。
\documentclass[a4paper,xelatex,ja=standard]{bxjsarticle} | |
\setCJKmainfont{Source Han Serif} | |
\setCJKsansfont{Source Han Sans} | |
\begin{document} | |
あいうえお直雲辞間 | |
明朝\textbf{明朝ボールド}\textsf{ゴシック}\textbf{\textsf{ボールドゴシック}} | |
\end{document} |
\documentclass{ltjsarticle} | |
\usepackage[no-math]{luatexja-fontspec} | |
\setmainjfont[BoldFont=Source Han Serif Bold]{Source Han Serif} | |
\setsansjfont[BoldFont=Source Han Sans Bold]{Source Han Sans} | |
%\setmainjfont[BoldFont=file:SourceHanSerif-Bold.ttc(0)]{file:SourceHanSerif-Regular.ttc(0)} | |
%\setsansjfont[BoldFont=file:SourceHanSans-Bold.ttc(0)]{SourceHanSans-Regular.ttc(0)} | |
\begin{document} | |
あいうえお直雲辞間 |
\documentclass[uplatex]{jsarticle} | |
\usepackage[deluxe]{otf} | |
\usepackage[directunicode*, noalphabet]{pxchfon}[2017/04/08] | |
\setminchofont[0]{SourceHanSerif-Regular.ttc} | |
\setboldminchofont[0]{SourceHanSerif-Bold.ttc} | |
\setgothicfont[0]{SourceHanSans-Regular.ttc} | |
\setboldgothicfont[0]{SourceHanSans-Bold.ttc} |
% エラーが出る場合はフォントをTeX側から見える位置に置くか, | |
% export OSFONTDIR=/usr/shar/fonts とする. | |
% http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1904 | |
\documentclass[a4paper, ja=standard, uplatex, dvipdfmx]{bxjsarticle} | |
\title{title} | |
\author{author} | |
\usepackage[deluxe]{otf} |
# phi関数の乗法性を用いる | |
# n!を素因数分解して、各素因数についてphi(p^e)を求めて掛け合わせる | |
# 階乗の素因数分解は良い求め方がある | |
# http://qiita.com/HirotoKagotani/items/87234e4104cb2b7fb8ff | |
# | |
# 累乗もmodで求めた方がいいかと思ったが、大丈夫だった | |
modulus = 1000003 | |
# nまでの素数を配列に入れて返す |
(* 累乗関数 *) | |
(* 数でも行列でも使える *) | |
let rec pow a n op un = (* opが演算子、unがunit *) | |
if n == 0 then un | |
else | |
let b = pow a (n/2) op un in | |
if n mod 2 == 0 then op b b | |
else op b (op b a);; | |
let m = pow 10 6 ( * ) 1;; | |
(* mod mでの計算の演算子 *) |
# 全ての点を通るので、 | |
# w, hに対して、距離は (w + 1)(h + 1) - 1 = wh + w + h になる | |
# 片方を固定して数え上げ | |
import math | |
n = int(input()) | |
s = 0 | |
i = 1 |
import sys | |
import os | |
import datetime | |
import subprocess | |
from keyhac import * | |
def configure(keymap): |
︠ef71f22d-2e92-4007-b961-4e8fd2cc5023s︠ | |
class MyRSCode: | |
def __init__(self, n, k, F, a, Fx, x): | |
self.n = n | |
self.k = k | |
self.field = F | |
self.field_generator = a | |
self.polynomial_ring = Fx | |
self.x = x | |
self.gen_poly = generate_gen_poly(self.n - k + 1, F, a, Fx, x) |