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.
9
  • 8
    @Werner I wonder what would Freud would have to say about this :D (tex.stackexchange.com/posts/85050/…)
    – doncherry
    Dec 1, 2012 at 4:29
  • 1
    Related question: Letterpress effect through PSTricks or TikZ.
    – Alan Munn
    Dec 1, 2012 at 4:38
  • 4
    The typeface is Hoefler Text (see Site Design Ideas).
    – Alan Munn
    Dec 1, 2012 at 4:40
  • 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 1, 2012 at 5:34
  • 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 1, 2012 at 17:54

5 Answers 5

75
+500

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.

5
  • 9
    +1 I love how much code you've used for something that is essentially 5 characters :)
    – cmhughes
    Dec 7, 2012 at 0:19
  • This looks nicer than the actual logo Dec 7, 2012 at 5:49
  • 1
    @cmhughes You don't know the half of it! You should see the size of the auxiliary files. Dec 8, 2012 at 10:52
  • @LoopSpace using pdflatex this code results ! Package tikz Error: I did not find the tikz library 'shapes.letters'.
    – alhelal
    Nov 5, 2017 at 12:38
  • @alhelal As the answer says, there was a lot of "extra bits and pieces" that went into making this. They can all be obtained from the old TeX-SX launchpad page at bazaar.launchpad.net/~tex-sx/tex-sx/development/files Nov 5, 2017 at 14:35
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

10
  • 2
    the typeface is worng, see this comment: tex.stackexchange.com/questions/85050/…
    – yo'
    Dec 5, 2012 at 10:26
  • 4
    @tohecz It's an improvement nonetheless :)
    – cgnieder
    Dec 5, 2012 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 5, 2012 at 11:21
  • 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 5, 2012 at 13:24
  • 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 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 5, 2012 at 19:41
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

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}
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/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .