Created
March 17, 2012 07:00
-
-
Save zr-tex8r/2055915 to your computer and use it in GitHub Desktop.
Treatment of space characters in 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
% 文字コードはUTF-8 | |
% 全角の〈S〉を空白、〈T〉をタブに置換してから | |
% (pdf)latex で組版してください | |
\documentclass[a4paper]{article} | |
\usepackage[T1]{fontenc} | |
\usepackage{lmodern} | |
\begin{document} | |
\begingroup | |
% 空白・タブ・改行を通常文字にする | |
\catcode32=12\relax% 空白 | |
\catcode9=12\relax% タブ | |
\catcode13=12\relax% 改行 | |
SP=[S];HT=[T];CR=[ | |
]\par% コメントにすると改行は無力化される | |
STSATSTBSSTT | |
\par% | |
SSTATSSBTTSS | |
\par% | |
SSSASSS | |
\par% | |
TTTATTT | |
\par% | |
SSSSS | |
\par% | |
TTTTT | |
\par% | |
\endgroup\relax | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment