Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to create a cover page, where in the middle of the page i use tabularx (tabular could have been just as well) to split the width of the page in to two parts.

I would like to know how could i control the thinness of the line?

I would like to make the line fading at the beginning and at the edges of the line if it is possible.

I have no problem to use tikz or any other solution, just the picture will be at the left side and my text at other side.

EDIT I hope it is now clearer what i wish to do (to create the line in the middle which fades at the ends) Example: Example

Regards

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can use TikZ with a three color fading that you define using \tikzfading{...}. Here's something that looks like the example you posted:

faded line in TikZ

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,fadings}
\tikzfading[name=middle,
    top color=transparent!60,
    bottom color=transparent!60,
    middle color=transparent!0]

\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
\coordinate [yshift=-3cm] (base) at (current page.center);
\node at (base) [
    name=photo,
    inner sep=0pt,
    anchor=south east,
    shift={(-2cm,0pt)}
] {\includegraphics[width=5cm]{photo}};
\fill [black!70,path fading=middle, xshift=0.75pt] (base) ++(-1.5pt,0) rectangle ($(current page.south)!(photo.north)!(current page.north)$);
\node at (base) [xshift=2cm,
    anchor=south west,
    align=left,
    font=\Large
] {\textbf{Dominik Schr\"oder}\\
    Musterallee 21\\
    12345 Mustersen\\[5pt]
    Telefon: 01234/5678\\
    Mobil: 0110/123456\\
    E-Mail: dominik$@$schroeder.de};
\end{tikzpicture} 
\end{document}
share|improve this answer
add comment

The following code might help you for the fading part.

\documentclass{minimal}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}

\begin{document}

\begin{tikzpicture}
\pgfmathsetmacro{\sep}{0.025}

\matrix[matrix of nodes,text width=3cm,column sep=1cm] (m) {
blablabla&\draw (0,0) circle[radius=0.25];\\[3cm]};

\path [scope fading=south] (m.north) rectangle (m.south);

\fill[top color=black,bottom color = white]
    ($(m.north)+\sep*(135:1)$) rectangle ($(m.south)-\sep*(135:1)$);

\fill[even odd rule,top color=black,bottom color = white]
      ($(m.north west)+(135:\sep)$) rectangle ($(m.south east)-(135:\sep)$)
      ($(m.north west)-(135:\sep)$) rectangle ($(m.south east)+(135:\sep)$); 

\end{tikzpicture}

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.