如何使 Fontawesome 中的内部图标变为实体

如何使 Fontawesome 中的内部图标变为实体

我正在使用fontawesome 5框架环境。如何使内部图标变为实心,以便不显示背景颜色? 在此处输入图片描述

这是我的代码:

\documentclass{article}

\usepackage[framemethod=tikz]{mdframed} 
\usepackage{fontawesome5}

\definecolor{darkpastelgreen}{rgb}{0.01, 0.75, 0.24}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

%----------------------------------------------------------------------------------------
%   SUMMARY ENVIRONMENT
%----------------------------------------------------------------------------------------

% Usage:
% \begin{summary}[optional title, defaults to "Summary:"]
%   contents
%   \end{summary}

\mdfdefinestyle{summary}{%
    topline=false, bottomline=false,
    leftline=false, rightline=false,
    nobreak,
    backgroundcolor=darkpastelgreen!10,
    singleextra={%
        \node at(P-|O){\color{darkpastelgreen}\faInfoCircle};
        \draw[very thick, darkpastelgreen](P-|O)++(0,-0.3em)--(O);%--(O-|P);
        }       
}

% Define a custom environment for summary
\newenvironment{summary}[1][Summary:]{ 
    \medskip
    \begin{mdframed}[style=summary]
        \noindent{\textbf{#1}}
}{
    \end{mdframed}
}

\begin{document}

\begin{summary} % Information block
    This summary will be covering some very interesting information.  As of now, I will just blabber on on and blabber on and blabber.
\end{summary}

\end{document}

答案1

我刚刚在 后面放置了一个白色实心圆圈\faInfoCircle

\documentclass{article}

\usepackage[framemethod=tikz]{mdframed} 
\usepackage{fontawesome5}

\definecolor{darkpastelgreen}{rgb}{0.01, 0.75, 0.24}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

%----------------------------------------------------------------------------------------
%   SUMMARY ENVIRONMENT
%----------------------------------------------------------------------------------------

% Usage:
% \begin{info}[optional title, defaults to "Info:"]
%   contents
%   \end{info}

\mdfdefinestyle{summary}{%
    topline=false, bottomline=false,
    leftline=false, rightline=false,
    nobreak,
    backgroundcolor=darkpastelgreen!10,
    singleextra={%
        \coordinate (TL) at (P-|O);
        \node[shape=circle, fill, color=white] at (TL) {};
        \node at(TL){\color{darkpastelgreen}\faInfoCircle};
        \draw[very thick, darkpastelgreen](P-|O)++(0,-0.3em)--(O);%--(O-|P);
        }       
}

% Define a custom environment for summary
\newenvironment{summary}[1][Summary:]{ 
    \medskip
    \begin{mdframed}[style=summary]
        \noindent{\textbf{#1}}
}{
    \end{mdframed}
}

\begin{document}

\begin{summary} % Information block
    This summary will be covering some very interesting information.  As of now, I will just blabber on on and blabber on and blabber.
\end{summary}

\end{document}

在此处输入图片描述

相关内容