平均能量损失

平均能量损失

我的问题非常类似重新着色文本,以便浮动和脚注能够正确受到影响,但我使用的是透明文本而不是彩色文本。(我不会简单地使用灰色文本,因为我使用了许多彩色hyperref链接,它们在透明模式下也应该改变颜色。)

\documentclass{article}
\usepackage[paperwidth=9cm,paperheight=3.3cm,scale=0.9]{geometry}
\usepackage{transparent}
\usepackage{xcolor}

\begin{document}

This text is black.
\footnote{\transparent{1}I can easily control the transparency of footnotes.}

\begingroup
\transparent{0.2}
This text is transparent%
\footnote{\transparent{0.5}I can always control the transparency of footnotes.},
but the line below that separates the text from the footnote and the footnote-numbers should be black, but they transparent and I don't know how to control their transparency  
\clearpage
This text is still transparent.
\footnote{\transparent{0.1}I can still easily control the transparency of footnotes.}
\endgroup

This text is correctly black again.
\vfill
The line (and numbers) below is correctly black again
\end{document}

在此处输入图片描述

我怎样才能将分隔线和数字改为黑色?(在现实世界的例子中,我使用正常的自动分页符\clearpage,当然不是)

答案1

您可以重新定义\normalcolor以重置透明度,然后行为与您链接的问题相同。

将此添加到您的序言中:

\makeatletter
\def\normalcolor{\let\current@color\default@color\set@color\transparent{1}}
\makeatother

平均能量损失

\documentclass{article}
\usepackage[paperwidth=9cm,paperheight=3.3cm,scale=0.9]{geometry}
\usepackage{transparent}
\usepackage{xcolor}

\makeatletter
\def\normalcolor{\let\current@color\default@color\set@color\transparent{1}}
\makeatother

\begin{document}

This text is black.
\footnote{\transparent{1}I can easily control the transparency of footnotes.}

\begingroup
\transparent{0.2}
This text is transparent%
\footnote{\transparent{0.5}I can always control the transparency of footnotes.},
but the line below that separates the text from the footnote and the footnote-numbers should be black, but they transparent and I don't know how to control their transparency  
\clearpage
This text is still transparent.
\footnote{\transparent{0.1}I can still easily control the transparency of footnotes.}
\endgroup

This text is correctly black again.
\vfill
The line (and numbers) below is correctly black again
\end{document}

第 1 页

MWE 输出第 1 页

第2页

MWE 输出第 2 页

相关内容