47

It is free to use TikZ or PSTricks to answer my question. I want to recreate our TeX.SX logo. But my attempt is far from perfect. Please help me to make it more similar to the original one.

enter image description here

\documentclass[pstricks,border=0pt]{standalone}
\begin{document}
\begin{pspicture}(8,3)
\rput(4,1.5){\psscalebox{8}{\textcolor{gray}{\{}\textcolor{red}{\TeX}\textcolor{gray}{\}}}}
\end{pspicture}
\end{document}

The aspects I want to improve:

  1. Font type.
  2. Font color and its shading.
cmhughes
  • 100,947
  • Definitely too localized in its current form. Are there single aspects of the logo you're not content with and wondering how to achieve? (One per question, of course.) – doncherry Dec 01 '12 at 04:27
  • 8
    @Werner I wonder what would Freud would have to say about this :D (http://tex.stackexchange.com/posts/85050/revisions#revb93e0073-d552-415a-99b6-e3b6d17ec1b4) – doncherry Dec 01 '12 at 04:29
  • 1
  • 4
    The typeface is Hoefler Text (see Site Design Ideas). – Alan Munn Dec 01 '12 at 04:40
  • The colour is RGB [192 72 72]. – Alan Munn Dec 01 '12 at 04:44
  • Maybe more appropriate for Meta, but nice question. – alfC Dec 01 '12 at 05:21
  • 2
    @alfC I don't think that'd be a good fit for meta; this is a regular question about TeX, whose subject happens to be related to the site. Meta questions should be about the site itself, typically without any TeX involvement at all. – doncherry Dec 01 '12 at 05:34
  • @doncherry: who is Freud? – kiss my armpit Dec 01 '12 at 13:55
  • 6
    @GarbageCollector Sigmund Freud was an Austrian psychologist in the 19th century, who is still very popular in literary analyses and the like. He is the founding father of psychoanalysis. Some of his influential theories deal with interpretation of dreams and the subconcious. A Freudian slip, as which I jokingly interpreted your typos, happens when you inadvertently utter something in a way that is incorrect, but reveals something about your inner, repressed desires. Roughly speaking. – doncherry Dec 01 '12 at 17:54

5 Answers5

75

There a few antialiasing artefacts that I don't know how to get rid of, and it uses some experimental code (what else?!). The font used is Hoefler (according to my Mac). The code itself won't work without some extra bits and pieces (one of which is the conversion of the Hoefler font to PGF paths - does anyone know the licence for Hoefler?). I also don't think that the braces are Hoefler.

The logo in TikZ

For what it's worth, here's the code:

\documentclass{standalone}
%\url{http://tex.stackexchange.com/q/85050/86}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes.letters,shadows.blur}

\pgfkeys{
  /pgf/letter/.cd,
  load font={hoefler}{normal},
  size=4,
  load encoding=name,
}

\definecolor{logoBack}{HTML}{F8F8F2}
\definecolor{brace}{HTML}{F6F6EF}
\definecolor{letter}{HTML}{C04848}

\makeatletter
\tikzset{
  use letter path/.code={%
    \pgfscope
    \pgftransformscale{\letter@size}%
    \letter@path{\letter@encode{#1}}%
    \endpgfscope
  }
}
\makeatother
\begin{document}
\begin{tikzpicture}[every shadow/.style={
    shadow blur invert,
    shadow xshift=-1pt,
    shadow yshift=-3pt
}]
\coordinate (bleft) at (-2,0);
\coordinate (T) at (0,0);
\coordinate (E) at (2.3cm,-.65cm);
\coordinate (X) at (4.35cm,0);
\coordinate (bright) at (8.6,0);
\begin{scope}
\begin{scope}[shift={(bleft)}]
\fill[color=brace,use letter path=braceleft];
\clip[use letter path=braceleft];
\path[blur shadow,shadow xshift=2pt, shadow yshift=0pt,use letter path=braceleft];
\path[blur shadow,shadow xshift=-1pt, shadow yshift=0pt,use letter path=braceleft];
\end{scope}
\begin{scope}[shift={(T)}]
\fill[color=letter,use letter path=T];
\clip[use letter path=T];
\path[blur shadow,use letter path=T];
\end{scope}
\begin{scope}[shift={(E)}]
\fill[color=letter,use letter path=E];
\clip[use letter path=E];
\path[blur shadow,use letter path=E];
\end{scope}
\begin{scope}[shift={(X)}]
\fill[color=letter,use letter path=X];
\clip[use letter path=X];
\path[blur shadow,use letter path=X];
\end{scope}
\begin{scope}[shift={(bright)}]
\fill[color=brace,use letter path=braceright];
\clip[use letter path=braceright];
\path[blur shadow,shadow xshift=2pt, shadow yshift=0pt,use letter path=braceright];
\path[blur shadow,shadow xshift=-1pt, shadow yshift=0pt,use letter path=braceright];
\end{scope}
\path (current bounding box.north west) ++(-1,1)  (current bounding box.south east) ++(1,-1);
\clip[shift={(T)},use letter path=T] (current bounding box.north west) rectangle (current bounding box.south east);
\clip[shift={(bleft)},use letter path=braceleft] (current bounding box.north west) rectangle (current bounding box.south east);
\clip[shift={(E)},use letter path=E] (current bounding box.north west) rectangle (current bounding box.south east);
\clip[shift={(X)},use letter path=X] (current bounding box.north west) rectangle (current bounding box.south east);
\clip[shift={(bright)},use letter path=braceright] (current bounding box.north west) rectangle (current bounding box.south east);
\fill[logoBack,rounded corners] (current bounding box.north west) rectangle (current bounding box.south east);
\end{scope}
\end{tikzpicture}
\end{document}

As well as needing the letter shapes from Hoefler and the code to make use of it, in doing this I spotted an issue with the pgf-blur library now needing unique fading names. So it really isn't compilable with "off the shelf" code! Modulo a few updates, most of it is on the TeX-SX launchpad - Hoefler being the key exception.

Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751
21

The closest how I can get now is:

\documentclass[]{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[outline]{contour}
\usepackage{libertine}
\begin{document}
\bfseries
\Huge{
\contourlength{.4pt}
\textsc{
\textcolor{white}{\contour{gray}{\textbraceleft}}
\contourlength{.3pt}
\hspace{-15pt}
\textcolor{BrickRed}{\contour{black}{\TeX}}
\hspace{-15pt}
\contourlength{.4pt}
\textcolor{white}{\contour{gray}{\textbraceright}}
}
\end{document}

enter image description here

Arun Debray
  • 7,126
  • 2
  • 30
  • 54
boucekv
  • 605
  • I am working on shading and shape. – boucekv Dec 05 '12 at 10:13
  • 2
    the typeface is worng, see this comment: http://tex.stackexchange.com/questions/85050/please-improve-my-logo-to-resemble-our-tex-sx-logo#comment182925_85050 – yo' Dec 05 '12 at 10:26
  • 4
    @tohecz It's an improvement nonetheless :) – cgnieder Dec 05 '12 at 10:54
  • 7
    Linux Libertine used instead of Hoefler Text (too poor to buy, too honest to steal, too lazy to find and instal XeTeX). LL on Wiki – boucekv Dec 05 '12 at 11:21
  • 1
    Hoefler Text is among the fonts that are provided automatically on every Mac Computer System. Maybe a reason (or excuse?!) to finally buy that Mac computer you've been longing to own? :-) – Mico Dec 05 '12 at 11:46
  • 2
    I have a brand new Macbook Pro with Hoefler Text, but am having the strangest experience here. If I take your code, add \usepackage{fontspec} and \setmainfont{Hoefler Text}, xelatex throws a bunch of warnings and refuses to draw the contour, while lualatex says fontspec can't find the font at all. – GTK Dec 05 '12 at 13:24
  • I really like that it's toned down the colours alot but I would make the brackets closer to the text, maybe? - actually maybe just the bracket on the right. – Magpie Dec 05 '12 at 17:37
  • 2
    @GTK: Ah, you've "rediscovered" the very same bug I happened to stumble across, about three months ago, and about which I posted a question to TeX.SE. See http://tex.stackexchange.com/a/71113/5001 for a solution: edit (i.e., either comment out or delete entirely much of the contents of) the file /usr/local/texlive/2012/texmf-dist/tex/luatex/luaotfload/otfl-blacklist.cnf. The only font that should be left on the "Blacklist" is the very first one, LastResort.ttf. – Mico Dec 05 '12 at 19:41
  • @Mico thanks! That's extremely helpful. I've learned a lot from this question :-) – GTK Dec 06 '12 at 04:04
15

This is an attempt, not nearly as complete or elegant as Andrew Stacey's or Herbert's, but without requiring any non-standard or beta packages. It combines Mico's and boucekv's approaches. Interestingly, it produces the output in lualatex, but not using xelatex.

 \documentclass  {article}
 \pagestyle {empty}
 \usepackage[usenames,dvipsnames]{xcolor}
 \usepackage[centering,margin=1mm]{geometry}
 \geometry{papersize={1.5in,0.4in}}
 \usepackage[outline]{contour}
  \usepackage{metalogo}
    \makeatletter
    \def\xl@drop@TeX@e{0.39ex} % default value: 0.5ex
    \makeatother
 \usepackage {fontspec}
 \setmainfont {Hoefler Text}
 \begin{document}
 \centering
 \Huge{
 \contourlength{0.01em}
 \textcolor{gray!10}{\contour{gray}{\{}}
 \textcolor{BrickRed}{\contour{black}{\TeX}}
 \textcolor{gray!10}{\contour{gray}{\}}}
 }
 \end{document}

enter image description here

GTK
  • 1,510
11

Here's how one might recreate the logo using LuaLaTeX (and the font Hoefler Text); XeLaTeX will work too, of course.

enter image description here

% !TEX TS-program = lualatex
\documentclass{standalone}
\usepackage{fontspec}
  \setmainfont{Hoefler Text}
\usepackage{metalogo}
  \makeatletter
  \def\xl@drop@TeX@e{0.38ex} % default value: 0.5ex
  \makeatother
\usepackage{xcolor}
\definecolor{TeXSEred}{rgb}{0.75,0.28125,0.28125}
 % many thanks to Alan Munn for stating the precise color :-)
\begin{document}
\textcolor{gray}{\{}\space 
\textcolor{TeXSEred}{\TeX}
\textcolor{gray}{\}}
\end{document}
Mico
  • 506,678
9
\documentclass{article}

\usepackage{pst-grad,pst-light3d,pstricks-add}
\DeclareFixedFont{\Rmb}{T1}{ptm}{m}{n}{4cm}
\begin{document}
\begin{pspicture}(0,-4)(8,4)
\psset{linewidth=0.5pt}
\psBrace[braceWidth=4mm,fillstyle=gradient,gradbegin=black,gradend=white,
  gradangle=0,gradmidpoint=0](0.5,2)(0.5,-2)
\rput(4,0){\PstLightThreeDText[fillstyle=solid,fillcolor=red!100!black!70,
LightThreeDAngle=60,LightThreeDYLength=0.1]{\Rmb\TeX}}
\psBrace[braceWidth=4mm,fillstyle=gradient,gradbegin=white,gradend=black,
  gradangle=0,gradmidpoint=0](7.5,-2)(7.5,2)
\end{pspicture}

\end{document}

enter image description here

needs latest pstricks-add from http://texnik.dante.de/tex/genric/pstricks-add/