\documentclass[11pt,b4j,landscape,twocolumn,papersize]{jsarticle}

% furikana.sty	http://xymtex.com/fujitas2/texlatex/index.html#tategumi
\usepackage{ascmac,bm,amssymb}
\usepackage[deluxe]{otf}
\usepackage[dvipdfmx]{graphicx,color}
%\usepackage[dvipdfmx,pdfpagemode=FullScreen,setpagesize=false]{hyperref}
%\usepackage[dvipdfmx,pdfstartview={XYZ null null 1.75},setpagesize=false]{hyperref}
\usepackage{tikz}
%\usetikzlibrary{calc}
%\usetikzlibrary{intersections,patterns,angles,backgrounds,positioning}

%\AtBeginDvi{\special{pdf:pagesize width 364mm height 257mm}}
\textwidth=330truemm \textheight=226truemm \columnseprule=0pt
\topmargin=-24truemm \oddsidemargin=-8truemm

\newenvironment{nidan}{\begin{minipage}[t]{.225\textwidth}}{\end{minipage}}
\def\nidangumi#1#2{\begin{nidan}{#1}\end{nidan}\quad%
\begin{nidan}{#2}\end{nidan}}

% ■■■ 0より大きいときはdvipdfmxで印刷用PDFを作ることを想定（答えはプリント
% 下部に出力される）
%        0 のときはdvipdfmxでデジタル教材用PDFを作ることを想定（答えは問題の
% すぐ横に赤で出力され、後でOneNoteで黒く塗りつぶし）
\def\make_pdf_with_insatsu{1}

\everymath{\displaystyle}
\parindent=0zw \columnsep=3zw
\lineskiplimit=1ex \normallineskiplimit=\lineskiplimit 
\lineskip=\lineskiplimit \normallineskip=\lineskiplimit

\newcounter{toi} \newcounter{subtoi}[toi]
\newcounter{subsubtoi}[subtoi]

\def\toi{\refstepcounter{toi}\par          % 問
  \makebox[2zw][r]{\Large\ajKaku{\value{toi}}\hspace{0.5zw}}%
  \hangindent=2zw}

\newcounter{subtoihyoji}
\def\subtoi{\refstepcounter{subtoi}\par    % 小問
  \setcounter{subtoihyoji}{\value{subtoi}}
	\ifnum\thesubtoi>20
		\addtocounter{subtoihyoji}{9873}
	\else
		\addtocounter{subtoihyoji}{8070}
	\fi
  \makebox[3.4zw][r]{\CID{\thesubtoihyoji}\hspace{1zw}}%
  \hangindent=3.4zw}

\newcounter{subsubtoihyoji}
\def\subsubtoi{\refstepcounter{subsubtoi}\par    % 小小問
  \setcounter{subsubtoihyoji}{\value{subsubtoi}}
  \addtocounter{subsubtoihyoji}{7554}
  \makebox[4.2zw][r]{\CID{\thesubsubtoihyoji}\hspace{1zw}}%
  \hangindent=4.2zw}

\ifnum\make_pdf_with_insatsu>0
	\def\kotae#1{\relax}
\else
	\def\kotae#1{\hfill \textcolor{red}{\footnotesize\gtfamily\bfseries\(\boldsymbol{#1} \)}}
\fi

\makeatletter
\def\hooklen#1#2{\settowidth{\@tempdima}{\(#1\)}
%\advance\@tempdima by.3ex
% ↑ 数式モードで式の前後に入るスペースを制御したかったが、
%    難しいのでやめた。段々難解なコードになっているのでやめた方がよい？
\hbox to\@tempdima{\hfil \(#2\)\hfil}}
\makeatother

\newcommand{\Slash}[1]{\ooalign{\hfil\kern-2pt／\hfil\crcr$#1$}}
\pagestyle{empty}

\begin{document}
%
%  ===========================以下本文===============================
%
\def\namae{%
{\Large\gtfamily\bfseries 数学I\kern-2pt I \quad
	改訂版プリント\# 6（改）}\hfill
年\hskip8ex 組\hskip8ex 号 \hskip5ex

\hfill 
\underline{氏名\rule[-2ex]{0cm}{6ex}\hskip30ex}}

\namae

\vskip-2ex
{\large\gtfamily\bfseries ■ 分数式の計算}

\smallskip

\toi 次の分数式を約分しなさい。

\nidangumi{\subtoi \( {x\over x(x-1)} \)\kotae{{1\over x-1}}}
	{\subtoi \( {x-1\over x^2-x} \)\kotae{{\,1\,\over x}}}\vfill

\nidangumi{\subtoi \( {x^2+x\over x^2-1} \)\kotae{{x \over x-1}}}
	{\subtoi \( {x^2+3x+2\over 2(x+2)} \)\kotae{{x+1\over 2}}}\vfill


\nidangumi{\subtoi \( {x^2-6x+9\over x^2-2x-3} \)\kotae{{x-3 \over x+1}}}{}\vfill

\ifnum\make_pdf_with_insatsu=0 \newpage \fi
%%%%%%%%%%%%%%%%%%%%%%%


\toi 次の計算をしなさい。{\gtfamily\bfseries \ajRecycle{10} 分数式の
かけ算・わり算}

\nidangumi{\subtoi \( {x+3\over x-1}\times{x-3\over x+3} \)
		\kotae{{x-3\over x-1}}}
	{\subtoi \( {x\over x+3}\times{x+3\over x-2} \)
		\kotae{{x\over x-2}}}
\vfill

\nidangumi{\subtoi \( {x+2\over x-3}\div{x+7\over x-3} \)
		\kotae{{x+2\over x+7}}}
	{\subtoi \( {x+2\over x}\div{x^2+5x+6\over x^2+3x} \)
		\kotae{1}}
\vfill


\toi 次の計算をしなさい。{\gtfamily\bfseries \ajRecycle{10}
	分数式の計算/通分/かけ算/わり算}

\nidangumi{\subtoi \( {x \over x+3}+{x-5 \over x+3} \)
		\kotae{{2x-5 \over x+3}}}
	{\subtoi \( {3x+4 \over x-2}-{x-5 \over x-2} \)
		\kotae{{2x+9 \over x-2}}}
\vfill


\ifnum\make_pdf_with_insatsu>0
	\rotatebox{180}{\scriptsize{
		\gtfamily\bfseries 改訂版プリント\# 6（改）}
	{\normalsize\ajKaku{3}} 
%	\ajKakko{1}~\( {2x-5 \over x+3} \)\ 
%	\ajKakko{2}~\( {2x+9 \over x-2} \)\ 
%	\ajKakko{3}~\( {4x-1 \over x+1} \)\ 
%	\ajKakko{4}~\( 2 \)\ 
%	\ajKakko{5}~\( {3x \over (x+2)(x-1)} \)\ 
%	\ajKakko{6}~\( {5 \over (x-3)(x+2)} \)\ 
%	\ajKakko{7}~\( {4x \over (x+1)(x-3)} \)\ 
%	\ajKakko{8}~\( {x-7 \over (x+1)(x-1)} \)\ 
	\ajKakko{9}~\( {x-5 \over (x+2)(3x-1)} \)\ 
	\ajKakko{10}~\( {x+3 \over x-3} \)\ 
	\ajKakko{11}~\( {x \over 2x+1} \)\ 
	\ajKakko{12}~\( {x-2 \over x+7} \)\ 
	\ajKakko{13}~\( {4x+3 \over (x+2)(2x-1)} \)\ 
	\ajKakko{14}~\( {2 \over x+1} \)
	}
\fi


%\ifnum\make_pdf_with_insatsu>0 \newpage \fi
%%%%%%%%%%%%%%%%%%%%%%%



\newpage
%%%%%%



\nidangumi{\subtoi \( {2 \over x+1}+{4x-3 \over x+1} \)
		\kotae{{4x-1 \over x+1}}}
	{\subtoi \( {6x+3 \over x+5}-{4x-7 \over x+5} \)
		\kotae{2}}
\vfill


\nidangumi{\subtoi \( {2 \over x+2}+{1 \over x-1} \)
		\kotae{{3x \over (x+2)(x-1)}}}
	{\subtoi \( {1 \over x-3}-{1 \over x+2} \)
		\kotae{{5 \over (x-3)(x+2)}}}
\vfill

\nidangumi{\subtoi \( {1 \over x+1}+{3 \over x-3} \)
		\kotae{{4x \over (x+1)(x-3)}}}
	{\subtoi \( {4 \over x+1}-{3 \over x-1} \)
		\kotae{{x-7 \over (x+1)(x-1)}}}
\vfill


\newpage
%%%%%%%%%%%%%%%

\nidangumi{\subtoi \( {1 \over x+2}-{2 \over 3x-1} \)
		\kotae{{x-5 \over (x+2)(3x-1)}}}
	{\subtoi \( {x^2+3x+2 \over x^2-x-6}\times{x+3 \over x+1} \)
		\kotae{{x+3 \over x-3}}}
\vfill


\nidangumi{\subtoi \( {x^2-2x \over x^2+2x-8}\div{2x+1 \over x+4} \)
		\kotae{{x \over 2x+1}}}
	{\subtoi \( {x+2 \over x-5}\div{x^2+9x+14 \over x^2-7x+10} \)
		\kotae{{x-2 \over x+7}}}
\vfill

\nidangumi{\subtoi \( {1 \over x+2}+{2 \over 2x-1} \)
		\kotae{{4x+3 \over (x+2)(2x-1)}}}
	{\subtoi \( {2x \over x^2-1}-{2 \over x^2-1} \)
		\kotae{{2 \over x+1}}}
\vfill

\ifnum\make_pdf_with_insatsu>0
	\rotatebox{180}{\scriptsize{
		\gtfamily\bfseries 授業プリント\# 6（改）}
	{\normalsize\ajKaku{1}} \ajKakko{1}~\( {1\over x-1} \)\ 
	\ajKakko{2}~\( {\,1\,\over x} \)\ 
	\ajKakko{3}~\( {x \over x-1} \)\ 
	\ajKakko{4}~\( {x+1\over 2} \)\ 
	\ajKakko{5}~\( {x-3 \over x+1} \)\ 
	{\normalsize\ajKaku{2}} \ajKakko{1}~\( {x-3\over x-1} \)\ 
	\ajKakko{2}~\( {x\over x-2} \)\ 
	\ajKakko{3}~\( {x+2\over x+7} \)\ 
	\ajKakko{4}~\( 1 \)\ 
	{\normalsize\ajKaku{3}}
	\ajKakko{1}~\( {2x-5 \over x+3} \)\ 
	\ajKakko{2}~\( {2x+9 \over x-2} \)\ 
	\ajKakko{3}~\( {4x-1 \over x+1} \)\ 
	\ajKakko{4}~\( 2 \)\ 
	\ajKakko{5}~\( {3x \over (x+2)(x-1)} \)\ 
	\ajKakko{6}~\( {5 \over (x-3)(x+2)} \)\ 
	\ajKakko{7}~\( {4x \over (x+1)(x-3)} \)\ 
	\ajKakko{8}~\( {x-7 \over (x+1)(x-1)} \)\ 
	}
\fi


\end{document}
