von esdd » Mi 13. Jun 2012, 16:36
Hallo,
ganz ausgeschlossen ist es nicht. Leider kommt aber mit dem Ergebnis des folgenden Codes nicht jeder pdfViewer klar.
\documentclass[a4paper, 12pt]{scrreprt}
\usepackage{amssymb} % für \smallfrown
\usepackage{lipsum}
\usepackage{tikz}
\newlength\mydepth
\newcommand\Farbverlauf[4][baseline=(O.base)]{%
\settodepth\mydepth{#4}%
\pgfdeclarefading{myfading}{\color{white}#4}%
\begin{tikzpicture}[#1]%
\node[inner sep=0pt,outer sep=0pt](O){\phantom{#4}};
\path[use as bounding box] (O.south west) rectangle (O.north east);
\pgfsetfading{myfading}{\pgftransformshift{\pgfpoint{0cm}{-\mydepth}}}%
\shade[left color=#2,right color=#3] (O.south west) rectangle (O.north east);%
\end{tikzpicture}%
}
\begin{document}
\begin{tikzpicture}
\path(-0.3,0)node[text=black!90,inner sep=0pt, outer sep=0pt]{$\smallfrown$}--%
(0,0)node[inner sep=0pt,outer sep=0pt]{\Farbverlauf{black!100}{black!0}{$\smallfrown$}}--%
(0.3,0)node[text=black!10,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\end{tikzpicture}
\tikz\node[text=black!90,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\Farbverlauf[]{black!100}{black!0}{$\smallfrown$}%
\tikz\node[text=black!10,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\Farbverlauf{yellow}{red}{$\pi$}
Ein Satz zum Testen der Ausgabe: \Farbverlauf{green!80}{yellow!80!black}{Ein Satz zum Testen der Ausgabe.}
\Farbverlauf{blue}{red}{\parbox{0.9\linewidth}{\lipsum[1]}}
\end{document}
Wenn es nur um Grautöne geht, hilft vielleicht auch das Folgende:
\documentclass[a4paper, 12pt]{scrreprt}
\usepackage{amssymb} % für \smallfrown
\usepackage{tikz}
\usetikzlibrary{fadings}
\tikzfading[name=myfade,left color=transparent!0,right color=transparent!100]
\begin{document}
\tikz\node[opacity=0.9,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\tikz\node[scope fading=myfade,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\tikz\node[opacity=0.1,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\end{document}
Gruß
Elke
Hallo,
ganz ausgeschlossen ist es nicht. Leider kommt aber mit dem Ergebnis des folgenden Codes nicht jeder pdfViewer klar.
[code]
\documentclass[a4paper, 12pt]{scrreprt}
\usepackage{amssymb} % für \smallfrown
\usepackage{lipsum}
\usepackage{tikz}
\newlength\mydepth
\newcommand\Farbverlauf[4][baseline=(O.base)]{%
\settodepth\mydepth{#4}%
\pgfdeclarefading{myfading}{\color{white}#4}%
\begin{tikzpicture}[#1]%
\node[inner sep=0pt,outer sep=0pt](O){\phantom{#4}};
\path[use as bounding box] (O.south west) rectangle (O.north east);
\pgfsetfading{myfading}{\pgftransformshift{\pgfpoint{0cm}{-\mydepth}}}%
\shade[left color=#2,right color=#3] (O.south west) rectangle (O.north east);%
\end{tikzpicture}%
}
\begin{document}
\begin{tikzpicture}
\path(-0.3,0)node[text=black!90,inner sep=0pt, outer sep=0pt]{$\smallfrown$}--%
(0,0)node[inner sep=0pt,outer sep=0pt]{\Farbverlauf{black!100}{black!0}{$\smallfrown$}}--%
(0.3,0)node[text=black!10,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\end{tikzpicture}
\tikz\node[text=black!90,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\Farbverlauf[]{black!100}{black!0}{$\smallfrown$}%
\tikz\node[text=black!10,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\Farbverlauf{yellow}{red}{$\pi$}
Ein Satz zum Testen der Ausgabe: \Farbverlauf{green!80}{yellow!80!black}{Ein Satz zum Testen der Ausgabe.}
\Farbverlauf{blue}{red}{\parbox{0.9\linewidth}{\lipsum[1]}}
\end{document}
[/code]
Wenn es nur um Grautöne geht, hilft vielleicht auch das Folgende:
[code]
\documentclass[a4paper, 12pt]{scrreprt}
\usepackage{amssymb} % für \smallfrown
\usepackage{tikz}
\usetikzlibrary{fadings}
\tikzfading[name=myfade,left color=transparent!0,right color=transparent!100]
\begin{document}
\tikz\node[opacity=0.9,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\tikz\node[scope fading=myfade,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\tikz\node[opacity=0.1,inner sep=0pt, outer sep=0pt]{$\smallfrown$};%
\end{document}
[/code]
Gruß
Elke