19

When you typeset an email address, you can put a "@" or a letter symbol in front of it. In the same fashion, what symbol can be used in front of a URL?

raphink
  • 31,894

5 Answers5

22

There is the \Mundus command from the marvosym package. It inserts a world globe.

EDIT: Better example!

\documentclass{article}

\usepackage{marvosym}
\usepackage{url}

\begin{document}

\Mundus~\url{http://tex.stackexchange.com}

\end{document}

EDIT: A screenshot! =P

Globe

I think it suits the occasion. =)

UPDATE: Here's an update based on Martin Scharrer's idea. I got this globe from The Noun Project and converted to a PDF file named globe.pdf (also available here). Then:

\documentclass{article}

\usepackage{marvosym}
\usepackage{graphicx}
\usepackage{url}

\newcommand*\myglobe{%
% as suggested by Martin ;-)
\includegraphics[height=1.6ex]{globe.pdf}}

\begin{document}

\Mundus~\url{http://tex.stackexchange.com}

\myglobe~\url{http://tex.stackexchange.com}

\end{document}

The new output:

Output

Paulo Cereda
  • 44,220
  • I had found this one already, it's indeed a good one :-) – raphink Jul 07 '11 at 14:48
  • 1
    Examples are also here in LaTeX Coolness @The Telarah Times post: \Mundus PDF. Personally I don't like it, as it is too filled, which makes it a bit vague. – przemoc Jul 07 '11 at 14:49
  • @przemoc: I noticed that. =( When used on a tiny font, this symbol almost looks like a black dot. – Paulo Cereda Jul 07 '11 at 15:00
  • 1
    @Raphink: Paulo and me recently had a look on http://thenounproject.com after Seamus talked about it. It has a lot of icons like that, see e.g. http://thenounproject.com/en-us/category/tech-communication/. They are SVG graphics which can be converted to PDF (e.g. inkscape --export-pdf file.pdf file.svg) and included as images. We are working on a package providing this symbols. – Martin Scharrer Jul 07 '11 at 15:06
  • 1
    Maybe: http://thenounproject.com/site_media/svg/116.svg – Martin Scharrer Jul 07 '11 at 15:10
  • @Martin: Awesome idea! – Paulo Cereda Jul 07 '11 at 15:14
  • 1
    I would simply use height=1.6ex (or similar value in ex) so that the icons scales with the font size. – Martin Scharrer Jul 07 '11 at 15:56
  • @Martin: Thanks for the improvement, Martin! – Paulo Cereda Jul 07 '11 at 16:03
  • I've tried the world symbol, and it's true that it doesn't look very serious in a "dead serious publication" ;-) Maybe I should stick to just the URL in books, and use this more like in my CV ;-) – raphink Jul 07 '11 at 19:25
  • 1
    The globe looks quite good. But you should be aware that it shows a specific part of the world (in this case africa, europe, asia) and has specific center. Depending on the context where you use such a globe it can be viewed as a political statement which part of the world is more important to you. I wouldn't e.g. use it in a job application for a job in amerika or as a logo for a global organisation. – Ulrike Fischer Jul 08 '11 at 08:41
  • @Ulrike: Hm now that you mentioned, the globe has really an specific center. To avoid such political or geographical interpretations, I'd probably stick with the second globe, with is stylized and has no margins for comments. =) – Paulo Cereda Jul 08 '11 at 10:12
  • It would be nice though when the icon itself would be clickable and when the icon would be appended automatically by a macro, too. – Paglia Orba Feb 06 '13 at 14:49
  • @Martin: May I ask, is the package containing the symbols from the Noun Project completed, or at least still underway? – Zev Chonoles Jun 17 '13 at 23:27
12

I use the external link icon from fontawesome.

enter image description here

There is a LaTeX package for LuaTeX/XeTeX to use fontawesome and an non-official version for PDFTeX. An example of its usage can be found in the PDF version of the new German FAQ:

enter image description here

I like it because IMO it's not obtrusive, compared to the "world" icons.

topskip
  • 37,020
7

Here is my try at bringing more readable globe to LaTeX. It is quite inaccurate, but IMO it's acceptable for non utterly dead serious publications. :)

\documentclass[12pt]{article}
\usepackage[a5paper,landscape,margin=1mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,setspace,url}
\usepackage{tikz}
\pagestyle{empty}
\parindent=0pt
\doublespacing
\newcommand\globe{%
\hspace{0.25em}%
\tikz
%% Work based on the:
%% Globe icon from Brightmix iconset
%% by Brightmix licensed under WTFPL
%% http://www.iconfinder.com/browse/iconset/brightmix/
%% http://cdn1.iconfinder.com/data/icons/brightmix/128/monotone_earth_world_transparent.png
%%
%% Traced and simplified in Inkscape, exported using inkscape2tikz.
%% Simplification and adjustment in Vim by Przemoc.
\path [y=0.009ex,x=0.009ex,yscale=-1,inner sep=0pt,outer sep=0pt,fill]
    (90,90) circle (90)%
    (99,167) .. controls (128,164) and (155,142) ..
    (164,114) .. controls (166,107) and (170,96) ..
    (166,90) .. controls (160,91) and (159,109) ..
    (156,97) .. controls (155,87) and (142,82) ..
    (133,81) .. controls (131,89) and (146,83) ..
    (141,91) .. controls (136,97) and (125,103) ..
    (123,91) .. controls (123,87) and (115,80) ..
    (120,88) .. controls (121,94) and (124,107) ..
    (132,101) .. controls (137,110) and (120,115) ..
    (123,125) .. controls (119,133) and (112,141) ..
    (104,145) .. controls (92,148) and (91,132) ..
    (91,124) .. controls (91,115) and (87,106) ..
    (78,110) .. controls (72,112) and (67,111) ..
    (64,106) .. controls (60,103) and (58,99) ..
    (59,93) .. controls (58,83) and (67,77) ..
    (71,70) .. controls (63,68) and (69,57) ..
    (75,60) .. controls (70,51) and (83,49) ..
    (88,44) .. controls (95,46) and (108,42) ..
    (101,34) .. controls (97,26) and (100,47) ..
    (92,41) .. controls (88,39) and (80,37) ..
    (87,32) .. controls (93,26) and (103,29) ..
    (111,29) .. controls (118,28) and (132,30) ..
    (134,27) .. controls (127,19) and (116,16) ..
    (105,13) .. controls (91,10) and (76,11) ..
    (62,17) .. controls (55,20) and (43,22) ..
    (44,31) .. controls (47,38) and (37,50) ..
    (33,49) .. controls (32,43) and (28,38) ..
    (25,46) .. controls (18,54) and (31,66) ..
    (20,72) .. controls (10,78) and (10,91) ..
    (12,101) .. controls (14,112) and (26,115) ..
    (30,125) .. controls (37,130) and (47,134) ..
    (39,143) .. controls (32,149) and (47,154) ..
    (51,158) .. controls (65,165) and (83,170) ..
    (99,167) --
    cycle
    (124,138) .. controls (119,132) and (136,122) ..
    (129,133) .. controls (128,134) and (128,139) ..
    (124,138) --
    cycle
    (73,42) .. controls (63,39) and (81,27) ..
    (80,39) .. controls (80,41) and (75,44) ..
    (73,42) --
    cycle
    (100,77) .. controls (105,74) and (121,81) ..
    (115,72) .. controls (111,71) and (106,63) .. 
    (103,69) .. controls (99,66) and (98,56) .. 
    (93,60) .. controls (97,61) and (98,70) .. 
    (93,64) .. controls (90,52) and (70,71) .. 
    (81,70) .. controls (91,64) and (93,82) ..
    (100,77) --
    cycle
    (136,67) .. controls (138,62) and (133,52) ..
    (129,61) .. controls (131,63) and (133,77) ..
    (136,67) --
    cycle
    (123,63) .. controls (122,55) and (104,57) ..
    (112,64) .. controls (116,65) and (120,66) ..
    (123,63) --
    cycle;%
\hspace{0.25em}%
}
\newcommand\texsxurl{URL \globe\url{http://tex.stackexchange.com/}}
\begin{document}
\par\tiny\texsxurl
\par\scriptsize\texsxurl
\par\footnotesize\texsxurl
\par\small\texsxurl
\par\normalsize\texsxurl
\par\large\texsxurl
\par\Large\texsxurl
\par\LARGE\texsxurl
\par\huge\texsxurl
\par\Huge\texsxurl
\par\fontsize{32}{36}\selectfont\texsxurl
\end{document}

enter image description here

przemoc
  • 2,142
2

As Paulo Cereda mentions, you can use Mundus.

I would like to add that you can use \href to display text, instead of the url, like a placholder. Like this:

\Mundus~\href{http://tex.stackexchange.com}{stackexchange}

So full usable code:

\documentclass{article}
\usepackage{marvosym}
\usepackage{hyperref}
\begin{document}
\Mundus~\href{http://tex.stackexchange.com}{stackexchange}
\end{document}
  • 1
    Welcome to TeX.SX!. Just a few tips: you can mark up code by indenting it with 4 spaces, or by selecting it and clicking {}, or by hitting Ctr+K. Also, to use \href you need the hyperref package, not only url. And finally, the OP asked for the "symbol", not the link, and the symbol was, as you mentioned, covered by Paulo Cereda, so your answer is more fit to a comment, in this case. But since you don't have the reputation (yet :) to leave a comment, I think it's fine +1 :) – Phelype Oleinik Mar 13 '18 at 12:25
2

I was looking for something and found this super helpful list of LaTeX symbols online. Here's something from the fontawesome package that you may find relevant for links: link_latex