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 would like to write some tutorials about HTML, and I would like to do it efficiently without using too many screenshots.

What I would like to obtain is a frame which looks like a web browser, such as this.

frame

(Image from here.)

share|improve this question
    
I suggest using TikZ and with some nodes. I’ll create an example this evening … –  Tobi Dec 9 '12 at 14:16
1  
How about trying to put up an MWE? –  hpesoj626 Dec 9 '12 at 14:47
1  
@IanThompson my guess would be because the question looks a lot like “Please do it for me”. –  cgnieder Dec 9 '12 at 15:09
2  
Why not inserting the screenshot (as in the question) and add text in front of it? –  topskip Dec 9 '12 at 15:10
9  
Please don't downvote below -1 for questions that aren't spam or abusive. If you feel that the question needs more work, leave a comment explaining this. Also, if you downvote, please don't forget to come back and revert your downvote once the question has been improved. –  Jake Dec 9 '12 at 15:17

1 Answer 1

up vote 23 down vote accepted

Perhaps something like this?

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc}

\definecolor{tab}{RGB}{223,223,223}
\definecolor{ugray}{RGB}{230,230,230}
\definecolor{bgray}{RGB}{151,151,151}
\definecolor{redball}{RGB}{238,93,86}
\definecolor{yellowball}{RGB}{254,184,75}
\definecolor{greenball}{RGB}{152,204,122}

\begin{document}

\begin{tikzpicture}
\node[draw,
  minimum width=0.8\textwidth,
  minimum height=8cm,
  rounded corners=2pt
]  (rect) {};
\shade[draw,
  rounded corners=2pt,
  top color=ugray,
  bottom color=bgray
] (rect.north west) -- 
  (rect.north east) --
  ( $ (rect.north east) + (0,-1.3) $ ) --
  ( $ (rect.north west) + (0,-1.3) $ ) --
  cycle;
\draw[rounded corners=1pt,fill=tab] 
  (rect.149) --  
  ++(2,0) --  
  coordinate (a) ++(0.3,0.7) -- 
  ++(4,0) --  
  coordinate (b) ++(0.3,-0.7) --
  (rect.31) --
  ++(0,-1) --
  ++(\the\dimexpr-0.8\textwidth-\pgflinewidth\relax,0) --
  cycle;
\node[draw=gray,
  rounded corners=1pt,
  fill=white,
  minimum width=0.7\textwidth,
  minimum height=16pt,yshift=68.5pt
] (write) {};
\shadedraw[draw=gray,shading=ball,ball color=redball] 
  ([xshift=15pt,yshift=-17pt]rect.north west) circle (4.5pt);
\shadedraw[draw=gray,shading=ball,ball color=yellowball] 
  ([xshift=30pt,yshift=-17pt]rect.north west) circle (4.5pt);
\shadedraw[draw=gray,shading=ball,ball color=greenball] 
  ([xshift=45pt,yshift=-17pt]rect.north west) circle (4.5pt);
\draw[gray,ultra thick]
  ([xshift=-10pt,yshift=-4pt]b) -- 
  ([xshift=-5pt,yshift=1pt]b);
\draw[gray,ultra thick]
  ([xshift=-10pt,yshift=1pt]b) -- 
  ([xshift=-5pt,yshift=-4pt]b);
\node[xshift=11pt,yshift=-1pt] at (a) 
  {\includegraphics[width=10pt]{globe}};
\node[xshift=11pt] at (write.west) 
  {\includegraphics[width=10pt]{globe}};
\end{tikzpicture}

\end{document}

enter image description here

The globe image used was taken from findicons.com.

share|improve this answer
    
This question (tex.stackexchange.com/questions/47537/…) shows how one could turn this into a frame using mdframed –  Tobi Dec 9 '12 at 16:04
    
Probably a command that allows for the title of the webpage, url and possible frame like a minipage to able to fill the space of the browser would be good as well? Just saying :) –  azetina Dec 9 '12 at 16:07
    
The hardest has been done. Great ! –  projetmbc Dec 9 '12 at 18:50

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.