tcolorboxで学参編集

Re: tcolorboxで学参編集

- 髙橋 政晴 の投稿
返信数: 0

以前の自分で立てたものですが, 私が投稿した内容が今後の役に立たないようなものばかりなので, 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}