Skip to content

Instantly share code, notes, and snippets.

@kmuto kmuto/review-ext.rb
Created Mar 15, 2019

Embed
What would you like to do?
# 空白を~に置き換えることで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
def inline_code(s)
escape_space(super(s))
end
def inline_tti(s)
escape_space(super(s))
end
def inline_ttb(s)
escape_space(super(s))
end
def escape_space(s)
s.gsub(' ', '~') # 空白を~に置き換える
end
end
class LATEXBuilder
prepend LATEXBuilderOverride
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.