我在 LaTeX 中搜索但没有找到“水杯”符号。我怎样才能像附图一样绘制这个符号?谢谢
\documentclass[a4paper,11pt]{article}
\usepackage[a4paper,left=2cm,right=2cm,top=1cm,bottom=1cm]{geometry}
\usepackage{amsmath,amssymb,scalerel}
\usepackage{lmodern}
\usepackage[most]{tcolorbox}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage[utf8]{vietnam}
%\usepackage[utf8]{english}
\usepackage[english]{babel}
\usepackage{MnSymbol,wasysym}
\usepackage{tikzsymbols}
\usepackage[format=plain,
labelfont={bf,it},
textfont=it]{caption}
%\usepackage{adjustbox}
\usepackage{bbding}
\usepackage{pifont}
\input{insbox}
\usepackage{enumitem}
\makeatletter
\tcbset{
myvbox/.style 2 args={%
enhanced,
colback=white,
colframe=blue!30!black,
left=8mm,
overlay={
\node[rotate=90, anchor=north west, inner sep=2mm, text=white] (title@aux) at (frame.south west) {#2};
\path[fill=tcbcol@frame] ([email protected] west)--([email protected] east)
to[out=90, in=270] ([yshift=5mm][email protected])--
([email protected]|-frame.north)
[rounded corners=\kvtcb@arc] -|
(frame.west) |- ([email protected])[sharp corners] -- cycle;
\node[rotate=90, inner sep=2mm, text=white] at (title@aux) {#2};
},
#1
},
}
\makeatother
\newtcolorbox{myvbox}[2][]{%
myvbox={#1}{#2}
}
\begin{document}
\begin{tcbposter}[
poster = {columns=1, rows=1, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]
\posterbox[height=3cm,width =10cm, myvbox={colframe=blue!80!black}{Water cup}]{column=1, row=1, xshift=0cm, yshift=1cm}{
\vspace*{0.5cm}
\hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm}
\\
\hspace*{0.2cm}
$\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm} $\bigcup$ \hspace*{0.2cm}
}
\end{tcbposter}
\end{document}
答案1
您可以tikz
自己绘制符号。
首先给你一些信息:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,1.2) -- (0.2,0) -- (0.6,0) -- (0.8,1.2);
\draw[blue] (0.05,1) -- (0.1,1.1) -- (0.2,1) -- (0.3,1.1) -- (0.4,1)-- (0.5,1.1) -- (0.6,1) -- (0.7,1.1) -- (0.75,1);
\end{tikzpicture}
\end{document}
或者更有创意的方法可能是使用ducksay
包:
\documentclass{article}
\usepackage{ducksay}
\AddAnimal{cup}
{
\ /
\~~~~~~~~~~/
\ /
\ /
\____/
}
\begin{document}
\ducksay[animal=cup]{}
\end{document}
如果水杯可以有不同的形状:
\documentclass{standalone}
\usepackage{tikzducks}
\begin{document}
\begin{tikzpicture}
\duck[invisible,wine=blue]
\end{tikzpicture}
\end{document}
您可以使用上面的任意一个图像定义一个新命令,以便于重复使用:
\documentclass{article}
\usepackage[most]{tcolorbox}
\makeatletter
\tcbset{
myvbox/.style 2 args={%
enhanced,
colback=white,
colframe=blue!30!black,
left=8mm,
overlay={
\node[rotate=90, anchor=north west, inner sep=2mm, text=white] (title@aux) at (frame.south west) {#2};
\path[fill=tcbcol@frame] ([email protected] west)--([email protected] east)
to[out=90, in=270] ([yshift=5mm][email protected])--
([email protected]|-frame.north)
[rounded corners=\kvtcb@arc] -|
(frame.west) |- ([email protected])[sharp corners] -- cycle;
\node[rotate=90, inner sep=2mm, text=white] at (title@aux) {#2};
},
#1
},
}
\makeatother
\newcommand{\mycup}{%
\begin{tikzpicture}
\draw (0,1.2) -- (0.2,0) -- (0.6,0) -- (0.8,1.2);
\draw[blue] (0.05,1) -- (0.1,1.1) -- (0.2,1) -- (0.3,1.1) -- (0.4,1)-- (0.5,1.1) -- (0.6,1) -- (0.7,1.1) -- (0.75,1);
\end{tikzpicture}%
\hspace{1em}%
}
\begin{document}
\begin{tcbposter}[poster = {columns=1, rows=1, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]
\posterbox[height=3cm,width =10cm, myvbox={colframe=blue!80!black}{Water cup}]{column=1, row=1, xshift=0cm, yshift=1cm}{%
\mycup\mycup\mycup\mycup\mycup\\
\mycup\mycup\mycup\mycup\mycup
}
\end{tcbposter}
\end{document}