我正在写这样的哈希字符串:“1DGooBsCL8eBHRq4UHPwiYbvu2Weiuw837”等等。
我想为哈希字符串添加一些边框或装饰。在 Latex 中可以实现吗?
答案1
是的,当然有很多种。下面仅展示其中几种:
\documentclass[twocolumn]{article}
\usepackage[most]{tcolorbox}
\usepackage{soul}
\tcbuselibrary{skins}
\tcbset{enhanced,colframe=red!50,colback=yellow!25,
nobeforeafter,shrink tight,left skip=1ex, right skip=1ex, extrude by=1.5mm}
\definecolor{shadecolor}{rgb}{.4, .6, .3}
\usepackage{fancybox}
\usepackage{framed}
% \usepackage{xcolor} % loaded already by other packages
% \usepackage{tikz} % loaded already by other packages
\usetikzlibrary{patterns}
\linespread{2}
\begin{document}
\sffamily
\fbox{hash string}
\raisebox{-1ex}{\shadowsize3pt\shadowbox{hash string}}
\fcolorbox{red}{cyan!20}{hash string} % need xcolor
\ovalbox{hash string}
\Ovalbox{hash string}
\doublebox{hash string}
\tcbox{hash string}
\tcbox[drop fuzzy shadow]{hash string}
\hl{hash string}
\begin{tikzpicture}
\node[rectangle, pattern=grid, pattern color=blue!20 ] (m) {hash string};
\draw[dashed] (m.south west) rectangle (m.north east);
\end{tikzpicture}
\begin{tikzpicture}
\node[rectangle, preaction={fill,red!10} ] (m) {hash string};
\draw[dotted] (m.south west) rectangle (m.north east);
\end{tikzpicture}
\end{document}