Skip to content

Instantly share code, notes, and snippets.

@kmuto
Created March 15, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmuto/4446c219a12d1ac676dd95c9da4b9e65 to your computer and use it in GitHub Desktop.
Save kmuto/4446c219a12d1ac676dd95c9da4b9e65 to your computer and use it in GitHub Desktop.
# 空白を~に置き換えることで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