tcolorboxで学参編集

tcolorboxで学参編集

- 髙橋 政晴 の投稿
返信数: 60
tcolorboxなるものを知って以下の写真に添付したものを作りたく思い、書き込みをさせていただいています。
やりたいことが2つありまして、
① 「重要例題から指針までの2つのbox」が非常にtcolorboxに似ており、Texで再現したいと思いました。

②2つ目は、解答部分において左側のみに点線があり、その点線の開始地点に「解答」と言う文字を置くということをtikzを併用することで再現したいと思いました。

まだまだ未熟者ですが、お力添えいただきたいです。

(写真:引用 https://www.chart.co.jp/top/chart/img/ko-su-r4.jpg)
添付 参照(本文のリンクより引用).jpeg
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 伊藤 直人 の投稿

たたき台にもならないものかもしれませんが私もこのようなtcolorboxの作成に興味があるのと何かのお役に立てればと思い投稿します。

できたこと(と思うこと)

  • 指針の部分まではそれなりに似せれた
  • 第2引数に★の個数を入力すると★★★★☆などというように表示できた

できなかったこと

  • 指針・解答部分の作成
  • 52| ~の部分にはグラデーションがかかっていると思うがその再現ができていない
  • 重要例題の部分が濃い赤枠中で中央にきていない
  • デザイン再現の詰め
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
こんな未熟な私のためにありがとうございます。
私も力不足ながら次のようなものを作って、添付ファイルのような出力を得ました。
\documentclass{jsarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage{ceo}
\usepackage{tikz,tcolorbox,color}
\tcbuselibrary{skins}
\usetikzlibrary{calc}
\begin{document}
\begin{tcolorbox}[enhanced,empty,left skip=0pt,left=5pt, coltitle=red!70!white,title={\bf \,解答},sharp corners, overlay={
\begin{tcbclipframe}
\fill[red!20!white] (title.south west)--++(1.3,0)--++(0,1)--++(-1.3,0)--cycle;
\draw[red!40!white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{tcolorbox}
\end{document}

点線にする方法と左端からではなくて、真ん中から線を出す方法はわかりませんでした。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 伊藤 直人 の投稿
髙橋 政晴 様

私の技量不足で高橋さんのものをあまり生かせませんでしたが添付のようになりました。
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
知識がなくて申し訳ないのですが、やはり指針の部分の影付きのboxを作るのは難しいのでしょうか?
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
まだ、部品集めの段階ですが ...
今回の件では、 texdoc tcolorbox をみてヒントを探しています。
また、https://tex2e.github.io/blog/latex/tikz-intro なども参考にしています。

影付きの box の件ですが、グラデーションだとすれば、tcolorbox p145 の 8.3 Example: Exercises が参考になるのでは?
ボックスに影をつける方法は tcolorbox のマニュアルにはいくつか例が出ています。

それから、「重要問題」と「指針」の間のグラフィック?に似たものが tcolorbox の p178 にありました。

この2件に関して伊藤さんのサンプルに暫定で組み込みました。
(伊藤さんへ、適当にインデントしておきました&tikz パラメータ情報の設定値を見やすくするよう整形しておきました)

月曜・火曜は、あまりこの件に関わっていられないので、レスポンスは期待しないでください。
和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
ご協力ありがとうございます。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
少し話題からずれて、解答部分の話ですが、
\documentclass{jsarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage{tikz,tcolorbox,color}
\tcbuselibrary{skins}
\usetikzlibrary{calc}
\usepackage{amsmath}
\usepackage{color}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,theorems,skins}
\usetikzlibrary{calc}
\newenvironment{renumerate}{\renewcommand{\labelenumi}{%
(\arabic{enumi})}\begin{enumerate}}{\end{enumerate}}

\newcount\K
\def\ksfor#1{
\K=#1
\ifnum\K=5
\textcolor{ored}{★★★★★}
\fi
\ifnum\K=4
\textcolor{ored}{★★★★☆}
\fi
\ifnum\K=3
\textcolor{ored}{★★★☆☆}
\fi
\ifnum\K=2
\textcolor{ored}{★★☆☆☆}
\fi
\ifnum\K=1
\textcolor{ored}{★☆☆☆☆}
\fi
}

\definecolor{ored}{rgb}{0.5, 0.0, 0.13}
\newcounter{reidai}
\setcounter{reidai}{52}

\newtcolorbox{reidai}[2]{%
fonttitle = \gtfamily\sffamily\bfseries,
colframe = ored,
colback = white,
enhanced,
boxrule = 0.3mm,
top=2pt,
left=2pt,
right=4pt,
bottom=2pt,
arc=0mm,
title = 重要例題,
titlerule = 0mm,
after title=\hspace{4mm}{\AfterText{#1}{#2}},
boxsep=0pt,
right=0pt
}
\newcommand{\AfterText}[2]{%
\tcbox[%
on line,
boxsep=0pt,
colframe = ored!20!white,
colback = ored!20!white,
boxrule=0.3mm,
rightrule=0mm,
top=0mm,bottom=0mm,
left=2pt,
sharp corners,
]
{%
\makebox[.849\textwidth][l]{\bfseries\gtfamily \thereidai\relax\hspace{2pt}| {#1} \hfill \ksfor{#2}\relax\strut}%
}}
\newtcolorbox{kt}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,
borderline west={1pt}{5pt}{red!70!white,densely dashed},
coltitle=red!50!white,
colback=white,
sharp corners,
}
\begin{document}
\begin{reidai}{おき換えの利用}{4}
\begin{renumerate}
\item 関数$y=x^{4}-6x^{2}+10$の最小値を求めよ。
\end{renumerate}
\end{reidai}
\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=red!70!white,title={\bf \,解答},sharp corners, overlay={
\begin{tcbclipframe}
\fill[red!10!white] (title.south west)--++(1,0)--++(0,1)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.3cm}
\begin{kt}
あああああああ
\end{kt}\end{tcolorbox}
\begin{kt}
あああああああ
\end{kt}
\begin{tcolorbox}[
enhanced,
boxrule = 0pt,
boxed title style = { boxrule = 0pt, boxsep = 0pt, sharp corners, },
attach boxed title to top left = { xshift=-2mm },
colback = white,
colbacktitle = red!10!white,
coltitle = red!70!white,
left = 10mm,
left skip = 0pt,
sharp corners,
title = { \textbf{解答} },
borderline west={1pt}{1pt}{red!70!white,densely dashed} ]
ああああ
\end{tcolorbox}

\end{document}
とすることで、問題部分の枠と「解答」の部分の左端を揃えることができました。
以下にその出力結果のpdfを添付しました。
何かの役に立てば幸いです。
和田 勇 への返信

Re: tcolorboxで学参編集

- 伊藤 直人 の投稿
和田様

ご協力いただきありがとうございます。
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
指針部分のグラデーション部分以外はそこそこの出来で作れました

\documentclass{jsarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage{tikz,tcolorbox,color}
\tcbuselibrary{skins}
\usetikzlibrary{calc}
\usepackage{amsmath}
\usepackage{color}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,theorems,skins}
\usetikzlibrary{calc}
\newenvironment{renumerate}{\renewcommand{\labelenumi}{%
(\arabic{enumi})}\begin{enumerate}}{\end{enumerate}}
\newcounter{reidaibangou} %%カウンタの定義
\newtcolorbox{rr}[1][]{enhanced,boxrule=0.5mm,top=8pt,left=15pt,right=4pt,bottom=2pt,arc=0mm,
colback = white,
colframe=ored,
boxrule=1pt,
underlay={
boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
underlay boxed title={
\fill[ored!45!white!50!black] ([yshift=-0.3mm]frame.north west)
-- +(-0.4,0) -- +(0,-0.3) -- cycle;}
\node[inner sep=1pt,white,fill=black!50!gray]at ([xshift=3pt,yshift=-15pt]interior.north west) {\stepcounter{reidaibangou}\bfseries\gtfamily 指針};},
segmentation code={%
\draw[dashed] (segmentation.west)--(segmentation.east);
\node[inner sep=1pt,blue!50!black,fill=blue!10!white] at ([xshift=22pt,yshift=-8pt]segmentation.south west) {\bfseries\gtfamily 解};},
before upper={\setlength{\parindent}{1zw}},
before lower={\setlength{\parindent}{1zw}},
}

\newcount\K
\def\ksfor#1{
\K=#1
\ifnum\K=5
\textcolor{ored}{★★★★★}
\fi
\ifnum\K=4
\textcolor{ored}{★★★★☆}
\fi
\ifnum\K=3
\textcolor{ored}{★★★☆☆}
\fi
\ifnum\K=2
\textcolor{ored}{★★☆☆☆}
\fi
\ifnum\K=1
\textcolor{ored}{★☆☆☆☆}
\fi
}

\definecolor{ored}{rgb}{0.5, 0.0, 0.13}
\newcounter{reidai}
\setcounter{reidai}{52}

\newtcolorbox{reidai}[2]{%
fonttitle = \gtfamily\sffamily\bfseries,
colframe = ored,
colback = white,
enhanced,
boxrule = 0.3mm,
top=2pt,
left=2pt,
right=4pt,
bottom=2pt,
arc=0mm,
title = 重要例題,
titlerule = 0mm,
after title=\hspace{4mm}{\AfterText{#1}{#2}},
boxsep=0pt,
right=0pt
}
\newcommand{\AfterText}[2]{%
\tcbox[%
on line,
boxsep=0pt,
colframe = ored!20!white,
colback = ored!20!white,
boxrule=0.3mm,
rightrule=0mm,
top=0mm,bottom=0mm,
left=2pt,
sharp corners,
]
{%
\makebox[.849\textwidth][l]{\bfseries\gtfamily \thereidai\relax\hspace{2pt}| {#1} \hfill \ksfor{#2}\relax\strut}%
}}
\newtcolorbox{kt}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,
borderline west={1pt}{5pt}{red!70!white,densely dashed},
coltitle=red!50!white,
colback=white,
sharp corners,
}
\begin{document}
\begin{reidai}{おき換えの利用}{4}
\begin{renumerate}
\item 関数$y=x^{4}-6x^{2}+10$の最小値を求めよ。
\end{renumerate}
\end{reidai}

\begin{tcolorbox}[enhanced,empty,left skip=0pt,right=-4.3pt,left=8pt,sharp corners, overlay={
\begin{tcbclipframe}
\fill[white] (title.south west)--++(1.3,0)--++(0,1)--++(-1.3,0)--cycle;
\draw[white,line width=0.3cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-6.3mm}
\begin{rr}
あああああああああああああ
あああああああああああああ
あああああああああああああ
あああああああああああああ
あああああああああああああ
あああああああああああああ
あああああああああああああ
\end{rr}
\end{tcolorbox}
\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=red!70!white,title={\bf \,解答},sharp corners, overlay={
\begin{tcbclipframe}
\fill[red!10!white] (title.south west)--++(1,0)--++(0,1)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.3cm}
\begin{kt}
あああああああ
\end{kt}\end{tcolorbox}

\end{document}
以下に出力結果のpdfを添付します。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 伊藤 直人 の投稿
髙橋 政晴 様

添付いただいたpdfを拝見しました。
かなりの再現度で目標までかなり近づいてきたと感じています。

さて,高橋さんに添付いただいたソースを私の環境(Mac+TeXLive2022)でコンパイルしたところ,例題部分と指針部分に隙間が開いたようになっていました。TeXLive2021でテストしたところ隙間は開かなかったのでVersionによって結果が異なるということをお知らせしたく返信しました。

解決策などではなく,すみません。
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
情報提供ありがとうございます。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
問題を書く場所の空白設定を一応いたしました。
※以下に示したものは私の未熟さ故に整理されておらず、乱雑ですが、一応、コンパイルすることができます。
また、作成予定写真にないものは私がさまざまなサイトを参考にさせていただいて修正して勝手に入れたものです。
残す課題としては「指針部分」のグラデーションのみ(?)です。
解答部分の枠の大きさ等も修正いたしました。
出力結果のpdfは添付いたしました。


\documentclass[dvipdfmx]{jsarticle}
\usepackage{tcolorbox}
\usepackage[top=25truemm,bottom=20truemm,left=20truemm,right=20truemm]{geometry}
\tcbuselibrary{skins}
\newenvironment{myitemize}{%
\begin{description}}{\end{description}}
\usepackage{tikz,tcolorbox,color}
\tcbuselibrary{skins}
\usetikzlibrary{calc}
\tcolorboxenvironment{myitemizet}{blanker,
before skip=6pt,after skip=12pt,
borderline west={1mm}{0pt}{black!50}}
\parindent=0pt\relax % 「Some text.」と「Mor text.」の先頭のインデントを0にする
\usepackage{enumitem}\setlist[description]{labelsep=1zw,leftmargin=2zw}
\definecolor{bluebg}{rgb}{0.5,0.7,0.84}
\definecolor{trianglebg}{rgb}{0.09,0.41,0.69}


\definecolor{brandblue}{rgb}{0.34, 0.7, 1}
\usepackage{lipsum}
\usepackage{microtype}

\usepackage{roboto}

\usepackage{tcolorbox}
\tcbuselibrary{skins}

\newtcolorbox[auto counter, number within=section]{kento}{%
enhanced,
before skip=\bigskipamount, after skip=\bigskipamount,
size=minimal, left=3cm, top=3mm,right=3mm, toprule=3pt,bottom=3mm,
colframe=cyan!50!gray, colbacktitle=cyan!50!gray, colback=white!90!gray,
title={\large 検討},
attach boxed title to top left={yshift=-\tcboxedtitleheight},
center title, minipage boxed title=2.5cm,
fonttitle=\sffamily\robotocondensed\bfseries\small,
boxed title style={
size=minimal, boxsep=4pt, bottom=5mm,
frame code={
\path[fill=tcbcolback]
(frame.north west) -- ([yshift=2mm]frame.south west) --
([xshift=2mm]frame.south west) -- (frame.south east) --
(frame.north east) -- cycle;
\path[fill=white, draw=tcbcolback, line width=1pt]
([xshift=-5mm-0.5pt]frame.south east) circle [radius=5mm]
node [font=\sffamily\large] {\thetcbcounter};
},
interior engine=empty
},
frame code={
\path[fill=tcbcolframe]
(frame.north west) rectangle ([yshift=-3pt]frame.north east);
}
}

\usepackage{enumitem}

\newcommand*{\listnum}{\sffamily\robotoblack\color{cyan}}
\newcommand*{\textlistnum}[1]{%
\begingroup\listnum #1\endgroup
}

\setlist[enumerate,1]{label=\listnum\arabic*}
\setlist[enumerate,2]{label=\listnum\alph*, leftmargin=1.5em}



\usetikzlibrary{arrows.meta}

\usepackage{amssymb}

\usepackage{changepage}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\tikzstyle{dashedboxone}=[dot pattern=on 1pt off .5pt]


\usepackage{amsmath,amssymb}

\usepackage{pifont,times}


\usepackage{tcolorbox}
\tcbuselibrary{breakable,theorems}
%\tcbuselibrary{breakable} %%を読み込んでいます。
\usetikzlibrary{shadows}
\usepackage{varwidth}



\usepackage{blindtext}
\usepackage{fontawesome}
\usepackage{tcolorbox}


\definecolor{lightgreen}{RGB}{247,253,251}
\definecolor{newgreen}{RGB}{7,94,70}
\definecolor{bordergreen}{RGB}{101,223,190}



\newcounter{mycounter}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsfonts,tikz,enumitem}

\definecolor{col1}{RGB}{253, 181, 192}
\definecolor{col2}{RGB}{166, 72, 124}
\definecolor{col3}{RGB}{246, 66, 153}
\usepackage{pgfornament}
\tcbuselibrary{skins,hooks}
\usetikzlibrary{shapes.arrows,calc,decorations.pathmorphing}
\usepackage{eso-pic}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[tikz]{bclogo}%
\definecolor{col}{RGB}{0, 1, 226}




\definecolor{problemblue}{RGB}{100,134,158}
\definecolor{idiomsgreen}{RGB}{0,162,0}
\definecolor{exercisebgblue}{RGB}{192,232,252}



\usepackage{xparse} % seulement nécessaire si format LaTeX < 2020-10-01
\usepackage{bm}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{calc, positioning, shapes.misc}
\usepackage{lipsum} % pour le texte bidon


\newcounter{exo}



\newcommand\resetcounters{
% Reset the counters for subsection, subsubsection and the definition
% all the custom environments.
\setcounter{subsection}{0}
\setcounter{subsubsection}{0}
\setcounter{paragraph}{0}
\setcounter{subparagraph}{0}
}

\usepackage{xifthen}

\usepackage{nicematrix}
\usepackage{scalerel}
\usepackage{stackengine}
\usepackage{tikz}
\usepackage{varwidth}

\definecolor{BrickRed}{RGB}{144,44,30}


\newenvironment{niceMfbox}[3][-2mm]
{
\vspace{#1}%
\begin{center}
\begin{NiceTabular}{@{\hspace{20pt}}V{#2}@{\hspace{20pt}}}
\bfseries \large
\enspace #3\enspace \\
\RowStyle[cell-space-bottom-limit=8pt]{}
}
{
\CodeAfter
\begin{tikzpicture}
\draw [line width=1pt,rounded corners,BrickRed!75!black]
(1-1) -| (last-|2) -- (last-|1) |- (1-1) ;
\end{tikzpicture}
\end{NiceTabular}
\end{center}
\par \vspace{2mm}%
}


% \widetilde{} alternative for formula over the tilde - \SE
\newcommand\reallywidetilde[1]{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle#1$}%
\stackengine{\LMpt}{%
\stretchto{\scaleto{\SavedStyle\mkern.2mu\sim}{.5467\wd0}}{.7\ht0}%
}{$\SavedStyle#1$%
% .2mu is the kern imbalance when clipping white space
% .5467++++ is \ht/[kerned \wd] aspect ratio for \sim glyph
}{O}{c}{F}{T}{S}%
}}

\usepackage {vwcol}
\usepackage{ceo}
\usepackage{setspace}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{varwidth}

\tcbuselibrary{raster} %preamble
% ページ上部の罫線を表示しない
\renewcommand{\headrulewidth}{0pt}

% フッターを中央(center)に表示し、内容は
% \thepageを数式モードで囲った出力とする
\cfoot{\sf\thepage}
\newcounter{reidaibangou} %%カウンタの定義
\newtcolorbox{rr}[1][]{enhanced,boxrule=0.5mm,top=8pt,left=15pt,right=4pt,bottom=2pt,arc=0mm,
colback = white,
colframe=ored,
boxrule=1pt,
underlay={
boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
underlay boxed title={
\fill[ored!45!white!50!black] ([yshift=-0.3mm]frame.north west)
-- +(-0.4,0) -- +(0,-0.3) -- cycle;}
\node[inner sep=1pt,white,fill=black!50!gray]at ([xshift=3pt,yshift=-15pt]interior.north west) {\stepcounter{reidaibangou}\bfseries\gtfamily \,指\,針\,};},
segmentation code={%
\draw[dashed] (segmentation.west)--(segmentation.east);
\node[inner sep=1pt,blue!50!black,fill=blue!10!white] at ([xshift=22pt,yshift=-8pt]segmentation.south west) {\bfseries\gtfamily 解};},
before upper={\setlength{\parindent}{1zw}},
before lower={\setlength{\parindent}{1zw}},
}
\newtcolorbox{kt}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,left=0.8cm,
borderline west={0.7pt}{2pt}{red!70!white,densely dashed},
coltitle=red!50!white,
colback=white,
sharp corners,
}
\newtcolorbox{bk}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,left=0.8cm,
borderline west={0.7pt}{2pt}{purple!70!white,densely dashed},
coltitle=red!50!white,
colback=white,
sharp corners,
}
\newtcolorbox{ti}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,left=0.8cm,
borderline west={0.7pt}{2pt}{orange!70!white,densely dashed},
coltitle=red!50!white,
colback=white,
sharp corners,
}
\newtcolorbox{fm}{
fonttitle=\bfseries,
enhanced,
top=0mm,
boxrule=0pt,frame empty,pad at break=0pt,bottomrule at break=0pt,toprule at break=0pt,left=0.8cm,
borderline west={0.7pt}{2pt}{cyan!70!white,densely dashed},
coltitle=cyan!50!white,
colback=white,
sharp corners,
}
\newenvironment{renumerate}{\renewcommand{\labelenumi}{%
(\arabic{enumi})}\begin{enumerate}}{\end{enumerate}}

\newcount\K
\def\ksfor#1{
\K=#1
\ifnum\K=5
\textcolor{ored}{★★★★★}
\fi
\ifnum\K=4
\textcolor{ored}{★★★★☆}
\fi
\ifnum\K=3
\textcolor{ored}{★★★☆☆}
\fi
\ifnum\K=2
\textcolor{ored}{★★☆☆☆}
\fi
\ifnum\K=1
\textcolor{ored}{★☆☆☆☆}
\fi
}

\newcounter{rens}
\setcounter{rens}{88}
\definecolor{ored}{rgb}{0.5, 0.0, 0.13}
\newcounter{reidai}
\setcounter{reidai}{52}

\newtcolorbox{chart}[2]{%
fonttitle = \gtfamily\sffamily\bfseries,
colframe = ored,
colback = white,
enhanced,
boxrule = 0.3mm,
top=2pt,
left=2pt,
right=4pt,
bottom=2pt,
arc=0mm,
title =\, \, 重要例題,
titlerule = 0mm,
after title=\hspace{4mm}{\AfterText{#1}{#2}},
boxsep=0pt,
right=0pt
}
\newcommand{\AfterText}[2]{%
\tcbox[%
on line,
boxsep=0pt,
colframe = ored!20!white,
colback = ored!20!white,
boxrule=0.3mm,
rightrule=0mm,
top=0mm,bottom=0mm,
left=2pt,
sharp corners,
]
{%
\makebox[.849\textwidth][l]{\bfseries\gtfamily \, \thereidai \relax\hspace{2pt}| {#1} \hfill \ksfor{#2}\relax\strut}%
}}
\usepackage{pxeverysel}
\begin{document}
\begin{chart}{おき換えの利用}{4}
\begin{tcolorbox}[colframe =white,
colback = white]
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{tcolorbox}
\end{chart}
\begin{tcolorbox}[enhanced,empty,left skip=0pt,right=-4.3pt,left=8pt,sharp corners, overlay={
\begin{tcbclipframe}
\fill[white] (title.south west)--++(1.3,0)--++(0,1)--++(-1.3,0)--cycle;
\draw[white,line width=0.3cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-6.3mm}
\begin{rr}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{rr}
\end{tcolorbox}
\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=red!70!white,title={\bf \small\,解\,答},sharp corners, overlay={
\begin{tcbclipframe}
\fill[red!10!white] (title.south west)--++(0.94,0)--++(0,0.48)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.35cm}
\begin{kt}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{kt}\end{tcolorbox}
\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=purple!70!white,title={\bf \small\,別\,解},sharp corners, overlay={
\begin{tcbclipframe}
\fill[purple!10!white] (title.south west)--++(0.94,0)--++(0,0.48)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.35cm}
\begin{bk}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{bk}\end{tcolorbox}
\begin{tcolorbox}[enhanced,empty,left skip=0pt,left=5pt, coltitle=white,title={\bf \,確\,認},sharp corners, overlay={
\begin{tcbclipframe}
\fill[purple] (title.south west)--++(1.3,0)--++(0,1)--++(-1.3,0)--cycle;
\draw[gray,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]
あああああああああああああああああああああ
\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=cyan!70!white,title={\bf \small\,発\,展},sharp corners, overlay={
\begin{tcbclipframe}
\fill[cyan!10!white] (title.south west)--++(0.94,0)--++(0,0.48)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.35cm}
\begin{fm}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{fm}\end{tcolorbox}

\begin{tcolorbox}[enhanced,empty,left skip=-3pt,left=0.5pt,coltitle=orange!70!white,title={\bf \small\,注\,意},sharp corners, overlay={
\begin{tcbclipframe}
\fill[orange!10!white] (title.south west)--++(0.94,0)--++(0,0.48)--++(-1,0)--cycle;
\draw[white,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]\vspace{-0.35cm}
\begin{ti}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{ti}\end{tcolorbox}
\end{tcolorbox}

\begin{niceMfbox}[+1mm]{13cm}{\reallywidetilde{\vphantom{p}Essence\ldots}}%
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{niceMfbox}
\begin{kento}
ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\end{kento}
\begin{tcolorbox}[enhanced,empty,left skip=0pt,left=5pt, coltitle=teal!20!blue!20!black,title={\bf \,練\,習},sharp corners, overlay={
\begin{tcbclipframe}
\fill[teal!20!blue!20!white] (title.south west)--++(1.3,0)--++(0,1)--++(-1.3,0)--cycle;
\draw[teal!20!blue!20!gray,line width=0.2cm](frame.north west)--(frame.south west);
\end{tcbclipframe}}]
ああああああああああああああああああああああああああああああああ
\end{tcolorbox}

\end{document}

髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 伊藤 直人 の投稿
髙橋 政晴 様

指針の部分のグラデーションがうまく作れず,このような形になりましたがいかがでしょうか(個人的には,これはこれでかっこいいかなと思っています)?。妥協的案的な回答ですみません。

https://ja.overleaf.com/read/qfktjdqptnck

P.S.
今回のように長いソースは,直接貼るのではなく,添付ファイルとしていただいた方が見やすくありがたいです。
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
手を貸していただく身として、ソースが見づらくなってしまったことは本当に申し訳ございませんでした。

示していただいた「指針部分」は本当に素晴らしく思います。
ありがとうございました。
伊藤 直人 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿

高橋さんへ エラーが出ています。ログを見ると以下の警告メッセージが表示されています。

 Missing character: There is no b in font nullfont!
 Missing character: There is no o in font nullfont!
 ... 多数 ...

この警告メッセージは「2022-11-27T13:37」の投稿分のソースから少なくとも発生しています。

「rr」の宣言で以下のようにコメントアウトすると表示されなくなります。

    diff --git a/takahashi.tex b/takahashi.tex
    index 6a92cbc..648c99e 100644
    --- a/takahashi.tex
    +++ b/takahashi.tex
    @@ -206,16 +206,16 @@
     \newcounter{reidaibangou} %%カウンタの定義
     \newtcolorbox{rr}[1][]{enhanced,boxrule=0.5mm,top=8pt,left=15pt,right=4pt,bottom=2pt,arc=0mm,
       colback = white,
       colframe=ored,
       boxrule=1pt,
    -  underlay={
    -    boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
    -    underlay boxed title={
    -      \fill[ored!45!white!50!black] ([yshift=-0.3mm]frame.north west)
    -      -- +(-0.4,0) -- +(0,-0.3) -- cycle;}
    -    \node[inner sep=1pt,white,fill=black!50!gray]at ([xshift=3pt,yshift=-15pt]interior.north west) {\stepcounter{reidaibangou}\bfseries\gtfamily \,指\,針\,};},
    +  %%underlay={
    +  %%  boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
    +  %%  underlay boxed title={
    +  %%    \fill[ored!45!white!50!black] ([yshift=-0.3mm]frame.north west)
    +  %%    -- +(-0.4,0) -- +(0,-0.3) -- cycle;}
    +  %%  \node[inner sep=1pt,white,fill=black!50!gray]at ([xshift=3pt,yshift=-15pt]interior.north west) {\stepcounter{reidaibangou}\bfseries\gtfamily \,指\,針\,};},
       segmentation code={%
         \draw[dashed] (segmentation.west)--(segmentation.east);
         \node[inner sep=1pt,blue!50!black,fill=blue!10!white] at ([xshift=22pt,yshift=-8pt]segmentation.south west) {\bfseries\gtfamily 解};},
       before upper={\setlength{\parindent}{1zw}},
       before lower={\setlength{\parindent}{1zw}},

なお11-27 の午後二つの投稿されたもので確認しています。

要件は、「underlay」で「 boxed title style」や「underlay boxed title」は定義されていないようなので 警告メッセージが発生しています。チェックされたし!!

和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
和田様

添付したソースをそのままコンパイルするとpdfが出力されないということでしょうか?
ただいま、「cloud latex」(Tex live 2021)にて確認いたしましたが、コンパイルをするとpdfが生成されることを確認いたしました。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
一応、再度ソースを添付いたします。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
軽微な「警告メッセージ」ですので、pdf は作成されます。
「ログ」ボタンをクリックし、
ログを表示、
検索窓に「missing」 を入力してみてください。


「underlay={...}」の中で「boxed title style ={...}」や「underlay boxed title={...}」を記述されていますが

「underlay」の設定には「boxed title style」や「underlay boxed title」に関するものは登録されていないので
警告メッセージが表示されています。
ですので「underlay={」とその対になる「}」を取り除くか、「underlay」として記述すべきものに書き換える必要があると思います。

私の紹介した tcolorbox の p178 のサンプルから一部をコピペしたものの様ですので、見比べてみてください。

添付 スクリーンショット 2022-11-28 7.45.06.png
和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
確かにそのようなものを発見いたしました。しかし、初心者ですので対処法は分かりません。
すみません。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿

今後も tcolorbox で試みるご予定があれば 問題の部分を整形したものを示しますので、 underlay= のブロックで何をしたいのか、 教えていただけませんか?

    \newtcolorbox{rr}[1][]{enhanced,
        boxrule  = 0.5mm,
        ...  省略 ...
        boxrule  = 1pt,
            %%% 以下で実装しようとしている意図が不明なのでどうすれば良いうか??
        underlay={ %
        boxed title style={empty, arc=0pt, outer arc=0pt, boxrule=0pt},
        underlay boxed title={ %%%% この中カッコの対は ---------------------+` 
            \fill[ored!45!white!50!black] ([yshift=-0.3mm]frame.north west) % |
                -- +(-0.4, 0) -- +(0, -0.3) -- cycle;                                           % |
            } % 
和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
指針部分の表示が正確になるようにしたいと思っています。
すなわち、以前に伊藤様に示していただいた
https://ja.overleaf.com/read/qfktjdqptnck
の通りの出力をしたいと思っております。
tcolorboxに関しては始めたばかりですで手探り状態なものですから、「ここのコードを…にして〜という出力を得たい」などといった具体的なことは何一つ言えません。
曖昧ですみません。
和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
和田様

私にはうまくエラーを回避することができません。
もし、お時間があればエラーを回避することができるようにソースを変更していただき、このフォーラムに示してください。
お願いします。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
コメントアウトで試行錯誤してみました

まず、検討するためにスパゲッティ状態のソースを整形しました。
「{...}」「(...)」や「; セミコロン」「, カンマ」「=」を目安に
塊(ブロック)毎の記述がわかるように適宜インデントなどを調整。

何も修正しないでビルドしたものがとりあえず、現状「正解」だと
想定し underlay= の設定を、コメントアウトで試行錯誤したところ
以下のようにすると現状「正解」と一致する様です。

添付するソースは、分析のために整形したものです。
tikz 関連は、設定項目が多いし、記述するコードも多いので
できるだけ、アルファベット順に並べつつ、ブロック構造が
明確になるようインデントを駆使してコーディングされると
良いと思います。また、ちょっと見で意味がわからないものは、
半年後に見返しても理解できるコメントを書いておくことを
そうすめします。

diff --git a/main 9.tex b/main 9.tex
index 59ef4ad..843209a 100644
--- a/main 9.tex
+++ b/main 9.tex
@@ -23,11 +23,6 @@
right = 4pt,
top = 8pt,
underlay = {
- boxed title style = { empty, arc=0pt, outer arc = 0pt, boxrule = 0pt },
- underlay boxed title = {
- \fill[ored!45!white!50!black]
- ([yshift=-0.3mm]frame.north west) -- +(-0.4,0) -- +(0,-0.3) -- cycle;
- %}
\node[inner sep = 1pt, white, fill = black!50!gray]
at ([xshift = 3pt, yshift = -15pt] interior.north west)
{\stepcounter{reidaibangou}\bfseries\gtfamily 指針};
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
emath で実現してみました。
 リスト:smplBYemath.tex
 PDF : smplBYemath.pdf
をまとめた書庫ファイルを
http://emath.s40.xrea.com/temp/smplBYemath.zip
に置きます。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
PDFを拝見させていただきましが、すごい完成度で驚きました。
今までemathを使っていなかったのですが、今回から使ってみたいと思いました。ホームページにアクセスしてみたのですが、この添付していただいたものをコンパイルするには「丸ごとパック」のみで良いのでしょうか。それとも訂正版、補訂版も必要なのでしょうか?
Cloud Latexにてコンパイルさせていただくとエラーとなりました。
添付 エラーの出力.jpeg
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> コンパイルするには「丸ごとパック」のみで良いのでしょうか。
> それとも訂正版、補訂版も必要なのでしょうか?

訂正版,補訂版ともに必要です。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
いただいたものでさらにceo.styを併用したいのですが、どうしたら良いでしょうか。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> ceo.styを併用したいのですが、どうしたら良いでしょうか。

ソースリストの
  \usepackage[notMy]{emath}
という行を
  \usepackage[ceo,notMy]{emath}
と修正してみてください。
( \usepackage{ceo} は不要です)

P.S. emath のサポートサイト
http://emath.s40.xrea.com/
  の目次から
   emathWiki
    [一覧]
      C
        ceo-LO
  と辿ったページをお読みいただけると幸いです。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
tegaki.styとの併用はどのようにすれば良いのですか。
何度も何度もすみません。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> tegaki.styとの併用はどのようにすれば良いのですか。

当方,tegaki.sty を使用したことがないので.....
とりあえず,無料版で実行してみたところ
  \Re, \Im
がぶつかるようですから,
\usepackage{tegaki}
の直前に

\let\Re\undefined
\let\Im\undefined

の2行を付加するとどうでしょう。
それでうまくいくようなら,

\usepackage[tegaki]{emath}

と,ロードオプションを新設する方向で.....
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
どうやらうまくいかないようなのですが、大熊様の環境ではコンパイルできるのですか?
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
提示していただいた2行を書いても
\Re, \Imがすでに定義済みである
とエラーが返ってきます。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
下のリストはタイプセットできますか?

\documentclass[dvipdfmx]{jarticle}
\usepackage{graphicx,color}
\usepackage[notMy]{emath}
\let\Re\undefined
\let\Im\undefined
\let\degree\undefined
\usepackage{tegaki}%
\begin{document}
簡単な数式
\[
\int e^x\cos x\;dx=\bd{\dfrac{1}{2}e^x(\cos x+\sin x)+C}
\]

\end{document}
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
不可解ですね。
タイプセットした対象である .tex ファイルを拝見したいですね。
長いといけないので,プリアンブルだけ見せていただけますか
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
合わせて、ビルドされたきのログも添付していただいた方が良いと思います。

ちなみに、 tegaki-font の設定に苦労はしましたが、大熊さんの提示されたものでビルドはできました。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
先ほどいただいた、短いソースの
\documentclass[dvipdfmx]{jarticle}

\documentclass[dvipdfmx,uplatex]{jarticle}
にしてコンパイルしました。
もちろんコンパイラーはplatexからuplatexへ変更しました。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> \documentclass[dvipdfmx]{jarticle}
> を
> \documentclass[dvipdfmx,uplatex]{jarticle}
> にしてコンパイルしました。

それじゃダメですよね。
  jarticle ---> ujarticle
としないとね。

しきりなおし:下のリストを
extegaki.tex
というファイル名で作ります。(念のため,改変不可)
それを uplatex でタイプセットして,エラーが出たら
  extegaki.tex
extegaki.log
を zip圧縮した .zip ファイルを添付してください。

%%% extegaki.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[uplatex,dvipdfmx]{ujarticle}
\usepackage{graphicx,color}
\usepackage[notMy]{emath}
\let\Re\undefined
\let\Im\undefined
\let\degree\undefined
\usepackage{tegaki}%
\begin{document}
簡単な数式
\[
\int e^x\cos x\;dx=\bd{\dfrac{1}{2}e^x(\cos x+\sin x)+C}
\]

\end{document}
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
本当にお恥ずかしいことに、\let\lm\undefinedとするべきところを\let\im\undefinedとしてしまい、lmのスペルを間違っておりました。
お騒がせしました。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
あと、boxの編集をしていて思ったのですが、boxの色を変える際に
(以下は大熊様に最初に添付していただいたzipファイルにあったtexファイルの抜粋です。)
\begin{document}
\setlength\tyuuhaba{12zw}
\tyuumark{{\color{chocolate}$\blacktriangleleft$}~}
\begin{rectbox}[hvsep=0pt,framethickness=.8pt]
\dilutecolor{maroon}{.75}{atmpcolor}%
\dilutecolor{maroon}{.25}{btmpcolor}%
\begin{EMpsrectbox}[hvsep=0pt,framethickness=0pt,%
gradbegin=atmpcolor,gradend=btmpcolor,gradN=100]
\EMfbox{{%
\large\color{white}\EMvphantom*[2pt][2pt]{\textgt{~重 要 例 題~}}}%
}~\large\textbf{52}~\textbar~\textgt{おき替えの利用}\hfill\lvliv ~\null
\end{EMpsrectbox}
…………
におけるgradbegin=atmpcolorの部分を
\definecolor{ored}{rgb}{0.5, 0.0, 0.13}
で設定した「ored」に指定することはできないのでしょうか?もし無理であればどのように混色をemath内で行えるのですか?
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
今後のことも考えて、emath内とtcolorbox内で同じ定義で色の設定をできいればいいと思いました。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> 今後のことも考えて、
> emath内とtcolorbox内で同じ定義で
> 色の設定をできいればいいと思いました。

\definecolor の機能を拡張し,
emath の ps.... 環境でも
効果を持つようにしました。

例文 emath221130.tex (uplatex)
タイプセット結果 emath221130.pdf
をまとめた書庫ファイル emath221130.zip

http://emath.s40.xrea.com/temp/emath221130.zip
に置きました。ただし,
emath パッケージの補訂版 emathc221106+4(221130)
の使用を前提とします。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> どのように混色をemath内で行えるのですか?

emathPs では,色名の定義に \defineEMpscolor コマンドを用います。

例文です。
uplatex をお使いのようですし,ここは奥村先生のサイトですから,
\documentclass[uplatex,dvipdfmx]{jsarticle}
としておきましょう。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[uplatex,dvipdfmx]{jsarticle}
\usepackage{graphicx,color}
\usepackage[notMy]{emath}
\usepackage{EMfbox}
\usepackage{emathPsb}

\begin{document}
\textsf{emathPs}では,色名の定義に \verb+\defineEMpscolor+ コマンドを用います。
すなわち\\
  \verb+\definecolor{ored}{rgb}{0.5, 0.0, 0.13}+\\
に替えて\\
  \verb+\defineEMpscolor{ored}{0.5}{0}{0.13}+\\
とします。以下,この定義が実行されているとして
\defineEMpscolor{ored}{0.5}{0}{0.13}%
\bigskip

\begin{rectbox}[hvsep=0pt,framethickness=.8pt]
\begin{EMpsrectbox}[hvsep=0pt,framethickness=0pt,%
gradbegin=ored,gradend=white,gradN=100]
\EMfbox{{%
\large\color{white}\EMvphantom*[2pt][2pt]{\textgt{~重 要 例 題~}}}%
}~\large\textbf{52}~\textbar~\textgt{おき替えの利用}\hfill~\null
\end{EMpsrectbox}
\repeatstr{あ}{40}\par
\verb+\defineEMpscolor+で定義された色名は,
\verb+\color+ コマンドの引数としても使用できます。
\color{ored}\repeatstr{い}{40}
\end{rectbox}
\end{document}
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 奥村 晴彦 の投稿
> ここは奥村先生のサイトですから,

いえお気遣いなく(^^)
奥村 晴彦 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
>> ここは奥村先生のサイトですから,
>

>いえお気遣いなく(^^)

口が滑りました。チャック。
ご迷惑・お手数をおかけして申し訳ありませんでした。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
emath内で色を
blue!30!teal!black
と言ったらコマンドで色を指定できるのでしょうか。
また、できないとしてもどうにか工夫して使う方法はございますでしょうか?
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
> emath内で色を
> blue!30!teal!black
> と言ったらコマンドで色を指定できるのでしょうか。
> また、できないとしてもどうにか工夫して使う方法はございますでしょうか?



> blue!30!teal!black
は何を意味するのでしょうか。
このスレッドは,TikZ で始まったから,その流儀なのかな?
当方,TikZ は触ったことがないので.....

emath では
  減色をするには \EMdilutecolor
  混色をするには \EMmixcolor
を用意していますが,あまり使ったことがない.....。
一応サンプル
減色.tex, 減色.pdf
混色/tex. 混色.pdf

http://emath.s40.xrea.com/temp/reQA3474p21249.zip
に置きます

# ご質問の意味を取り違えていたら,ごめんなさい。
大熊 一弘 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
すみません。説明不足でした。
ですが、混色のやり方を尋ねようとしていたので、解決いたしました。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
問題(または指針)部分を複数ページにわたって書く(1ページに収まらない)ことになった場合(←英語長文教材などを想定。)、ページまたぎをしても枠が継続されるようにしたいのですが、どうしたら良いですか?
現状では添付写真のように、フッター部分にまで進出し、2ページ目には続きが出力されない状態です。
添付 ページまたぎ.jpeg
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
ソースを添付していただいた方が良いと思います。
和田 勇 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
これまた説明不足で申し訳ありません。
以前に大熊様がアップされた
http://emath.s40.xrea.com/temp/smplBYemath.zip
を解凍して得られるtexファイルです。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 和田 勇 の投稿
今回の事象はある程度推測はできますが、
以前にも質問者側と回答者側でのソースの違いがあった件もあり、
お願いですから、お試しのソースをアップロードしてください。

想定しいるのは、ページをまた月ことのできないブロックを
配置しているため、クリッピング結果ではみ出たイメージが
表示できなくなっているのでと思います。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 大熊 一弘 の投稿
"emath" という語が登場しているので割り込み,失礼します。

> 問題(または指針)部分を複数ページにわたって書く(1ページに収まらない)
> ことになった場合(←英語長文教材などを想定。)、
> ページまたぎをしても枠が継続されるようにしたいのですが、
> どうしたら良いですか?

> http://emath.s40.xrea.com/temp/smplBYemath.zip
> を解凍して得られるtexファイルです。


emath で用意している「囲み枠」には
  ページをまたがないことを前提としているもの
  ページをまたげるもの
がありますが,smplBYemath.tex では,
  ページをまたがない rectbox環境
を用いています。これを
  breakrectbox環境
とすれば,ページをまたぐことができます。例文です:
  smplBYemath2.tex
  smplBYemath2.pdf
をまとめた smplBYemath2.zip を
http://emath.s40.xrea.com/temp/smplBYemath2.zip
に置きます。

なお,emath で用意している囲み枠については
emath サポートサイト http://emath.s40.xrea.com の目次から
  emathWiki
  左の索引から
     五十音順
      か
       囲み枠
と辿ったページをご覧ください。
髙橋 政晴 への返信

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿

以前の自分で立てたものですが, 私が投稿した内容が今後の役に立たないようなものばかりなので, tcolorboxでのやり方について, 載せさせていただきます。


\documentclass[dvipdfmx,uplatex]{jlreq} \usepackage{tcolorbox} \tcbuselibrary{xparse,breakable,theorems,skins, raster} \usepackage{tikz} \usetikzlibrary{intersections,calc,arrows.meta,patterns} \definecolor{ored}{rgb}{0.5, 0.0, 0.13} \newcommand{\snandogo}{★★★★★} \newcommand{\snandoyon}{★★★★☆} \newcommand{\snandosan}{★★★☆☆} \newcommand{\snandoni}{★★☆☆☆} \newcommand{\snandoichi}{★☆☆☆☆} \DeclareTColorBox{akazyuuyoureidai}{ o m O{.5} O{} o}{enhanced,colback=white,colframe=white,boxrule=0.2mm,top=8mm,sharp corners,breakable, underlay={ \path[draw,ored](frame.north west)--(frame.north east)--(frame.south east)--(frame.south west)--cycle; \path[fill,ored!30](frame.north west)--(frame.north east)-- ++(0mm,-6mm)--([yshift=-6mm]frame.north west); \path[fill,ored](frame.north west)-- ++(20mm,0mm)-- ++(0mm,-6mm)-- ++(-20mm,0mm); \path[draw]([xshift=30mm,yshift=-1mm]frame.north west)--([xshift=30mm,yshift=-5mm]frame.north west); \path[draw]([xshift=10mm,yshift=-3mm]frame.north west)node{\sffamily\textcolor{white}{#1}}; \path[draw]([xshift=25mm,yshift=-3mm]frame.north west)node{\sffamily #2}; \path[draw]([xshift=33mm,yshift=-3mm]frame.north west)node[right]{\sffamily #3}; \path[draw]([xshift=-10mm,yshift=-3mm]frame.north east)node{\textcolor{ored}{#4}}; }} \DeclareTColorBox{akashishin}{o}{enhanced,colback=white,colframe=white,boxrule=0.2mm,top=3mm,left=8mm,sharp corners,breakable,enlarge top by=-2.9mm, underlay={ \path[draw,ored]([xshift=1.5mm]frame.north west)--([xshift=1.5mm]frame.south west)--(frame.south east); \path[fill,ored](frame.north west)-- ++(1.5mm,0mm)-- ++(0mm,-1mm); \path[shade,left color=ored!30, right color=ored!10]([xshift=1.55mm]frame.north west)-- ++(4mm,0mm)--([xshift=5.5mm,yshift=0.05mm]frame.south west)--([xshift=1.55mm,yshift=0.05mm]frame.south west); \path[fill,black!70]([yshift=-3.7mm]frame.north west)-- ++(8mm,0mm)-- ++(0mm,-4mm)-- ++(-8mm,0mm); \path[draw]([xshift=4mm,yshift=-5.6mm]frame.north west)node{\sffamily\small\textcolor{white}{#1}}; }} \begin{document} \begin{akazyuuyoureidai}[重要例題]{52}[置き換えの利用][\snandosan] あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお \end{akazyuuyoureidai} \begin{akashishin}[指\,針] あいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえおあいうえお \end{akashishin} あいうえお \end{document}