This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
# Lazy AutoLayout CSS Checker | |
# Copyright 2016 Kenshi Muto | |
# MIT License | |
lno = 0 | |
ARGF.each do |l| | |
lno += 1 | |
l.chomp! | |
if l =~ /-@-[^\s]+/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'rexml/document' | |
include REXML | |
doc = Document.new(ARGF) | |
doc.context[:attribute_quote] = :quote | |
# 親spanを追加するには%w()内に空白区切りで指定 | |
%w(bold).each do |style| | |
doc.each_element("//span[@class='#{style}']") do |e| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% jlreqクラスのテスト | |
% https://github.com/abenori/jlreq/blob/master/README-ja.md | |
% https://www.w3.org/TR/jlreq/ja/ | |
\documentclass[book,% chapterを使用するbook環境 | |
twoside,% 書籍のような見開きデザイン | |
paper=a5,% 紙サイズ(a0〜a10、b0〜b10(JIS寸法)、c2〜c8)。変型を示すためにpaper={幅mm,高さmm}で指定することも可能 | |
fontsize=12Q,% 欧文基本書体Q数(pt指定も可能) | |
jafontsize=12Q,% 和文基本書体Q数(pt指定も可能) | |
baselineskip=21.6Q,% 行送り。普通は和文の1.5〜1.8倍くらい | |
line_length=36zw,% (横書きにおいて)版面の横方向全角文字数。市販書を参考にするとよい |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newcommand*\includefullpagegraphics[2][]{% | |
\clearpage | |
\thispagestyle{empty}% | |
\vbox to \textheight{% | |
% \vskip-\review@head | |
\vbox to \paperheight{\vss | |
\hbox to \textwidth{% | |
\ifodd\c@page | |
\hskip-\dimexpr\oddsidemargin + 1in\relax | |
\else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# …既存の設定… | |
pdfmaker: | |
cover: cover.tex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# InDesign、TeXのB5変/A5のトンボ版をSONY DPT-RP1向けに実寸調整する | |
# Copyright 2018 Kenshi Muto | |
# | |
# TeXのトンボ値はGreenCherry社由来のトンボ設定に依存しており、別のトンボ実装の場合は異なる値になる可能性がある | |
# | |
# pdflatex、pdfinfo(Poppler)が利用できるようにしておく | |
require 'yaml' | |
require 'tmpdir' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\renewcommand\frontmatter{% | |
\if@openright | |
\cleardoublepage | |
\else | |
\clearpage | |
\fi | |
\@mainmatterfalse | |
\setcounter{page}{3} | |
% \pagenumbering{roman}} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ReVIEW | |
module LATEXBuilderOverride | |
def th(s) | |
macro('reviewth', s.gsub("\\\\\n", '\\newline{}')) | |
end | |
def td(s) | |
s.gsub("\\\\\n", '\\newline{}') | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ReVIEW | |
module LATEXBuilderOverride | |
def inline_tt(s) | |
super(s).gsub("'", '\textquotesingle ').sub(/(textquotesingle) }$/, '\1}') | |
end | |
def inline_code(s) | |
super(s).gsub("'", '\textquotesingle ').sub(/(textquotesingle) }$/, '\1}') | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 空白を~に置き換えることでseqsplitで空白が消えないようにするハックを入れたreview-ext.rb | |
# Re:VIEW 3.0〜Re:VIEW 3.1向け (Re:VIEW 3.2では不要) | |
# プロジェクトにこのファイルを配置し、techbooster-doujin-base.styの「tt/codeでの折り返しの許容」のロジックの「\iffalse」を「\iftrue」に置き換える | |
module ReVIEW | |
module LATEXBuilderOverride | |
def inline_tt(s) | |
escape_space(super(s)) | |
end |
OlderNewer