%
%	gbb60166@gmail.com	https://unilab.gbb60166.jp/prekou/prekou.htm
%
% aspectratio= は 1610, 169, 149, 54, 32 の中から選べる（省略時は 43）
% C:\texlive\2023\texmf-dist\tex\latex\beamer\beamer.cls
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer}
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfstartview={XYZ null null 8.00}},aspectratio=169]{beamer}
\documentclass[20pt,dvipdfmx,usepdftitle=false,aspectratio=169]{beamer}
% pdfの栞の字化けを防ぐ
%\AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}
% テーマ
\usetheme{Copenhagen}
% navi. symbolsは目立たないが，dvipdfmxを使うと機能しないので非表示に
\setbeamertemplate{navigation symbols}{} 
\usepackage{bxdpx-beamer,pxjahyper,minijs}
%\usepackage{graphicx}
%\usepackage{tkokugo,furikana,tsayusen,shiika,sfkanbun,jdkintou,plext}
\usepackage{type1cm}
\usepackage[deluxe]{otf}
%\usepackage{tikzsymbols}
%\usepackage[dvipdfmx]{graphicx}%
\def\pgfsysdriver{pgfsys-dvipdfmx.def}%（graphicxパッケージを使用しない場合はこの行を有効に）
%\def\pgfsysdriver{pgfsys-dvips.def}%デフォルト
%\usepackage[e]{esvect}
\usepackage{tikz}%（これで、pgfとpgfforが読み込まれます。）
%\usepackage{tikz-3dplot}
\usetikzlibrary{patterns,intersections}
%\usetikzlibrary{calc,arrows.meta,angles,backgrounds}
%\usepackage{animate}
%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
%\pgfplotsset{compat=newest, every axis/.append style={line width=1pt}}
%\PassOptionsToPackage{dvipdfmx}{graphicx}
\nofiles

\hypersetup{% Jul 18 2023
	pdftitle={プレ高数学科（LaTeX Beamer で汎用PDFプレゼンを作る）},
	pdfauthor={gbb60166@gmail.com},
	pdfsubject={https://unilab.gbb60166.jp/prekou/prekou.htm}
	}

% フォントはお好みで
%\usepackage{txfonts}

\mathversion{bold}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\seriesdefault}{bx}
\renewcommand{\kanjifamilydefault}{\gtdefault}
\renewcommand{\kanjiseriesdefault}{bx}
\setbeamerfont{title}{size=\normalsize,series=\bfseries}
\setbeamerfont{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{frametitle}[default][center]
\usefonttheme{professionalfonts}

% 参考にしたURL
% http://windom.phys.hirosaki-u.ac.jp/fswiki/wiki.cgi?page=LaTeX+Beamer%A4%C7%A5%D7%A5%EC%A5%BC%A5%F3%A5%C6%A1%BC%A5%B7%A5%E7%A5%F3

\newcommand{\Slash}[1]{\ooalign{\hfil\kern-3pt／\hfil\crcr$#1$}}
\everymath{\displaystyle}

\def\maruwaku#1{\begin{tikzpicture}[scale=0.7, baseline={([yshift=-22pt] current bounding box.north)}]
\filldraw[color=CUDBlue, line width=1pt, rounded corners=2pt] (-0.1,0)--(2.1,0)--(2.1,1.1)--(-0.1,1.1)--cycle;
\draw(1,0.5) node[white]{#1};
\end{tikzpicture}
}

\setbeamersize{text margin left=5mm,text margin right=5mm}
\fboxrule=0.8pt

\makeatletter
\def\hooklen#1#2{\settowidth{\@tempdima}{\(#1\)}
%\advance\@tempdima by.3ex
% ↑ 数式モードで式の前後に入るスペースを制御したかったが、
%    難しいのでやめた。段々難解なコードになっているのでやめた方がよい？
\hbox to\@tempdima{\hfil \(#2\)\hfil}}
%■等号付き不等号 by 美文書作成入門
\newcommand{\myleqq}{\mathrel{\mathpalette\gl@align<}}
\newcommand{\mygeqq}{\mathrel{\mathpalette\gl@align>}}
\newcommand{\gl@align}[2]{\lower.6ex\vbox{\baselineskip\z@skip\lineskip\z@
	\ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
\makeatother

% カラーユニバーサルデザインを調べたつもりだがあまり自信がありません
% http://www.fukushihoken.metro.tokyo.jp/kiban/machizukuri/kanren/color.files/colorudguideline.pdf
% http://jfly.iam.u-tokyo.ac.jp/colorset/

% ■ アクセントカラー小面積を目立たせる高彩度色
\definecolor{CUDRed}{RGB}{255,75,0}
\definecolor{CUDGreen}{RGB}{3,175,122}
\definecolor{CUDBlue}{RGB}{0,90,255}
\definecolor{CUDCyan}{RGB}{77,196,255}
\definecolor{CUDMagenta}{RGB}{153,0,153}
\definecolor{CUDYellow}{RGB}{255,241,0}
\definecolor{CUDBrown}{RGB}{128,64,0}

\definecolor{CUDOrange}{RGB}{246,170,0}

% ■ ベースカラー広い面積の塗り分けに用いる低・中彩度色
\definecolor{CUDPink}{RGB}{255,202,191}
\definecolor{CUDBrightGreen}{RGB}{119,217,168}
\definecolor{CUDLime}{RGB}{216,242,85}
\definecolor{CUDCream}{RGB}{255,255,128}
\definecolor{CUDBrightCyan}{RGB}{191,228,255}
%\definecolor{CUD}{RGB}{}%

\setbeamercolor{CUDBrightGreen}{fg=black,bg=CUDBrightGreen!50}
\setbeamercolor{CUDBrightCyan}{fg=black,bg=CUDBrightCyan}
\setbeamercolor{CUDCream}{fg=black,bg=CUDCream!75}

\newcommand{\myfrac}[2]{\mathchoice%■ 修正 Oct 8,2023
	{%\fontsize{20}{20}\selectfont%	\displaystyle
		\frac{\raisebox{-.6ex}{\(#1\)}}{\raisebox{.4ex}{\(#2\)}}}%
	{\textstyle{\frac{#1}{#2}}}%	\textstyle
	{%\fontsize{13}{13}\selectfont%	\scriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	{%\fontsize{11}{11}\selectfont%	\scriptscriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	}


\begin{document}

\title{プレ高数学科}\author{gbb60166}

%■ 本文と数式モードの間に挿入される空白スペース
%\mathsurround=-1pt
%■ \( \log\log \)でlogとlogの間に挿入される細スペース（省略形は \,）
%\thinmuskip=3mu
%■ \( a+b \)で+の前後に挿入される中スペース（省略形は \>）
%\medmuskip=2mu plus 1mu minus 1mu
\medmuskip=2mu minus 1mu
%■ \( x=5 \)で=の前後に挿入される太スペース（省略形は \;）
%\thickmuskip=5mu plus 5mu
\thickmuskip=3mu minus 2mu
% mu は math units の省略で長さの単位

\newcommand{\ittan}{\begin{tikzpicture}[scale=0.7,
	baseline={([yshift=-21pt] current bounding box.north)}]
\filldraw[very thick,draw=CUDBlue,fill=CUDYellow,rounded corners=1pt]
	(0,0)--++(0.8,0)--++(0,0.8)--++(-0.8,0)--cycle;
\draw(0.4,0.4) node[CUDBlue]
	{\fontsize{7pt}{7pt}\selectfont
		\shortstack{一旦\\[-2pt]停止}};
\end{tikzpicture}
}

%■■■■■■■■■■■■■　テスト領域　■■■■■■■■■■■■■■


%\end{document}
%■■■■■■■■■■■■■　完成品　■■■■■■■■■■■■■■

\begin{frame}[t]
\frametitle{絶対値と不等式}
\setbeamercolor{CUDCream75}{fg=black,bg=CUDCream!75}
\centerline{%
\begin{minipage}{0.3\textwidth}
\Large
\begin{beamercolorbox}[wd=\textwidth,ht=2.2ex,dp=1ex,shadow=true,
	rounded=true, center]{CUDCream75}
\( |x| < \textcolor{CUDRed}{\text{★}} \)
\end{beamercolorbox}
\end{minipage}
\ と\ 
\setbeamercolor{CUDBrightCyan75}{fg=black,bg=CUDBrightCyan!75}
\begin{minipage}{0.5\textwidth}
\Large
\begin{beamercolorbox}[wd=\textwidth,ht=2.2ex,dp=1ex,shadow=true,
	rounded=true, center]{CUDBrightCyan75}
\( \textcolor{CUDRed}{-\text{★}} <x< \textcolor{CUDRed}{\text{★}} \)
\end{beamercolorbox}
\end{minipage}
}

\vskip3ex
\centerline{\LARGE は同じです}
\centerline{（ただし\textcolor{CUDRed}{\text{★}}は定数、
	つまり\textcolor{CUDRed}{\text{★}}は数字）}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{よくある間違いは}
\hskip0.19\textwidth
\( \phantom{-2x<} \bigl| x-7 \bigr|
	< \alt<2->{\colorbox{CUDCream}{\( 2x \)}}
{\kern\fboxsep 2x \kern\fboxsep} \)\qquad を

\bigskip
\hskip0.2\textwidth
\( -2x<x-7<2x \)

\bigskip
と勘違いする人がいるが、\pause
\colorbox{CUDCream}{\( 2x \)}は定数ではないので間違いです。
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\( |x-7|<2x \)を解きなさい}
正しい解き方は次のようになります。

\bigskip
\( x-7 \)の正負の境目は\( x-7=0 \)を解いて\( x=7 \)だから

\centerline{\( \text{\ajKakkoroman{1}}\ x<7 \qquad
	\text{\ajKakkoroman{2}}\ x\mygeqq 7 \)
	}

\bigskip
の\(2\)つの範囲に分けて調べます。
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\( \text{\ajKakkoroman{1}}\ x<7 \)のとき
	\quad\( |x-7|<2x \)}
このとき\( x-7<0 \)なので絶対値を
外すときはマイナスを付けて\( |x-7|=-(x-7)=-x+7 \)とするので
\vskip-5ex
\begin{eqnarray*}
|x-7| &<& 2x \\
-x+7 &<& 2x \\
-3x &<& -7 \\
x &>& \myfrac{\,7\,}{3}\ \ittan
\end{eqnarray*}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\( \text{\ajKakkoroman{1}}\ x<7 \)のとき
	\quad\( |x-7|<2x \)}
\( x> \myfrac{\,7\,}{3} \)と\( \text{\ajKakkoroman{1}}\ x<7 \)の
共通部分を取って

\centerline{%
\begin{tikzpicture}[scale=1,very thick, >=stealth,
	baseline={([yshift=0pt] current bounding box.north)}]
%\draw[help lines](0,-1) grid (9,2.5);
\useasboundingbox(0,-0.5) rectangle (9,2.5);
\draw[->,thick](0,1)--++(9,0);
\fill[pattern color=CUDBlue, pattern=north east lines]
	(2,1) node[below]{\footnotesize\(\myfrac{\,7\,}{3}\)}
		--++(1,1.5)--++(6,0)--++(0,-1.5)--cycle;
\draw[CUDBlue,name path=line1](2,1)--++(1,1.5)--++(6,0);

\fill[pattern color=CUDRed, pattern=north west lines]
	(0,2)--++(5,0)--++(2/3,-1) node[below]{\(7\)}
		--++(-5-2/3,0)--++(0,1)--cycle;
\draw[CUDRed,name path=line2](0,2)--++(5,0)--++(2/3,-1);

%\path[name intersections={of=line1 and line2, by=X}];
\filldraw[fill=white,draw=CUDBlue](2,1) circle(3pt);
\filldraw[fill=white,draw=CUDRed](5+2/3,1) circle(3pt);
\end{tikzpicture}
}

\[ \myfrac{\,7\,}{3}<x<7 \quad\ittan \]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\( \text{\ajKakkoroman{2}}\ x \mygeqq7 \)のとき
	\quad\( |x-7|<2x \)}
\vskip-1ex
\( \text{\ajKakkoroman{2}}\ x\mygeqq7 \)のときは\( x-7\mygeqq0 \)なので
そのまま絶対値を外して
\( |x-7|=x-7 \)とするので
\vskip-3ex
\begin{eqnarray*}
|x-7| &<& 2x \\
x-7 &<& 2x \\
-x &<& 7 \\
x &>& -7\ \ittan
\end{eqnarray*}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\( \text{\ajKakkoroman{2}}\ x \mygeqq7 \)のとき
	\quad\( |x-7|<2x \)}
\( x>-7 \)と\( \text{\ajKakkoroman{2}}\ x \mygeqq7 \)の
共通部分を取って

\centerline{%
\begin{tikzpicture}[scale=1,very thick, >=stealth,
	baseline={([yshift=0pt] current bounding box.north)}]
%\draw[help lines](0,-0.5) grid (9,2.5);
\useasboundingbox(0,-0.5) rectangle (9,2.5);
\draw[->,thick](0,1)--++(9,0);
\fill[pattern color=CUDBlue, pattern=north east lines]
	(2,1) node[below]{\(-7\)}
		--++(1,1.5)--++(6,0)--++(0,-1.5)--cycle;
\draw[CUDBlue,name path=line1](2,1)--++(1,1.5)--++(6,0);

\fill[pattern color=CUDRed, pattern=north west lines]
	(6,1) node[below]{\(7\)}
		--++(0,1)--++(3,0)--++(0,-1)--cycle;
\draw[CUDRed,name path=line2](6,1)--++(0,1)--++(3,0);

%\path[name intersections={of=line1 and line2, by=X}];
\filldraw[fill=white,draw=CUDBlue](2,1) circle(3pt);
\fill[CUDRed](6,1) circle(3pt);
\end{tikzpicture}
}

\[ x \mygeqq7 \quad\ittan \]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{すべてをまとめて}
\( \myfrac{\,7\,}{3}<x<7 \)\quad と\quad\( x\mygeqq7 \)\qquad
を合体させて

\bigskip
\hskip0.35\textwidth
\( x>\myfrac{\,7\,}{3} \quad\text{\□答} \)

\medskip
\qquad
または\qquad
\( \myfrac{\,7\,}{3}<x \quad\text{\□答} \)
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\end{document}
