Skip to content

Instantly share code, notes, and snippets.

@kmaed
Created August 7, 2012 17:47
Show Gist options
  • Save kmaed/3287738 to your computer and use it in GitHub Desktop.
Save kmaed/3287738 to your computer and use it in GitHub Desktop.
ascmac.sty with LuaTeX-ja
Display the source blob
Display the rendered blob
Raw
\documentclass{ltjsarticle}
\usepackage{color}
\usepackage{ascmac}
\newdimen\tbaselineshift
\begin{document}
% 例は http://www.biwako.shiga-u.ac.jp/sensei/kumazawa/tex/ascmac.html から
\begin{boxnote}
\textbf{今日の一言}
\begin{itemize}
\item 早寝。
\item 早起き。
\end{itemize}
\end{boxnote}
{\color{blue}%
\begin{boxnote}
{\normalcolor \textbf{今日の一言}}
\begin{itemize}
\normalcolor
\item 早寝。
\item 早起き。
\end{itemize}
\end{boxnote}
}
\begin{screen}
\begin{verbatim}
c:> dir /w
\end{verbatim}
\end{screen}
{\color{blue}%
\begin{screen}
\normalcolor
\begin{verbatim}
c:> dir /w
\end{verbatim}
\end{screen}
}
\begin{itembox}[l]{はじめに}
挨拶 \\
一同礼
\end{itembox}
\begin{itembox}[c]{途中に}
挨拶 \\
一同礼
\end{itembox}
\begin{itembox}[r]{最後に}
挨拶 \\
一同礼
\end{itembox}
\begin{itembox}[r]{\keytop{本当に最後}}
挨拶 \\
一同礼
\end{itembox}
{\color{red}%
\begin{itembox}[r]{\keytop{\normalcolor 本当に最後}}
\normalcolor
挨拶 \\
一同礼
\end{itembox}
}
\keytop{$\tilde{}$}
\keytop{!}
\keytop{@}
\keytop{\#}
\keytop{\$}
\keytop{\%}
\keytop{$\land$}
\keytop{\&}
\keytop{*}
\keytop{(}
\keytop{)}
\keytop{$\underline{ }$}
\keytop{+}
\yen{\color{red}\yen}
\return{\color{red}\return}
\def\iroh{色は匂へど散りぬるを我が世誰ぞつねならむ
有為の奥山今日越えて浅き夢見じ酔ひもせず}
\def\bs{\texttt{\symbol{'134}}}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
A \mask{ }{A} & B \mask{ }{B} & C \mask{ }{C} & D \mask{ }{D} & E \mask{ }{E} & F \mask{ }{F} \\
\hline
G \mask{ }{G} & H \mask{ }{H} & I \mask{ }{I} & J \mask{ }{J} & K \mask{ }{K} & \\
\hline
\hline
A \color{red}\mask{ }{A} & B \color{blue}\mask{ }{B} & C \color{red}\mask{ }{C} & D \color{blue}\mask{ }{D} & E \color{red}\mask{ }{E} & F \color{blue}\mask{ }{F} \\
\hline
G \color{blue}\mask{ }{G} & H \color{red}\mask{ }{H} & I \color{blue}\mask{ }{I} & J \color{red}\mask{ }{J} & K \color{blue}\mask{ }{K} & \\
\hline
\end{tabular}
\end{center}
\iroh
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{A\}です。
}}{A}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{B\}です。
}}{B}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{C\}です。
}}{C}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{D\}です。
}}{D}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{E\}です。
}}{E}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{F\}です。
}}{F}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{G\}です。
}}{G}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{H\}です。
}}{H}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{I\}です。
}}{I}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{J\}です。
}}{J}
\hspace{-12pt}\mask{\vbox{\hsize \linewidth
\iroh \bs\texttt{mask}\{ \}\{K\}です。
}}{K}
\vskip 5pt
\maskbox{10cm}{1cm}{I}{c}{cの網掛けで10cm}
\vskip 5pt
{\color{red}\maskbox{10cm}{1cm}{I}{c}{cの網掛けで10cm}}
\vskip 5pt
{\color{blue}\Maskbox{10cm}{1cm}{I}{c}{1pt}{cの網掛けで10cm}}
\vskip 5pt
\Maskbox{10cm}{1cm}{I}{c}{1pt}{cの網掛けで10cm}
\vskip 5pt
\maskbox{10cm}{2cm}{I}{c}{\vbox{\hsize 95mm
\iroh
}}
\vskip 5pt
\Maskbox{10cm}{2cm}{I}{c}{0.4pt}{\vbox{\hsize 95mm \iroh }}
\begin{shadebox}
影のない日なた
\end{shadebox}
{\color{red}\begin{shadebox}
影のない日なた
\end{shadebox}}
{\color{red}\begin{shadebox}
\normalcolor
影のない日なた
\end{shadebox}}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment