2

Arg, i try to replicate the diverse answers using tikz i read into this post and in this post, without success, my circle explode the space between lines.

Don't understand why the result is different ...

enter image description here

There the cthullu MWE :

% !TEX encoding =  UTF-8 Unicode
% -*- program: xelatex -*-
\documentclass[a4paper, 11pt,twoside, openright]{memoir}
\usepackage{mwe} % just for dummy images
\usepackage{pgf,tikz}

\makeatletter
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[anchor=text, shape=circle,fill,draw,inner sep=0pt,text=white,minimum size=2em] (char) {#1\strut};}}
\makeatother

\begin{document}

    Ph'nglui mglw'nafh Cthulhu R'lyeh \circled{1} wgah'nagl fhtagn. Nog Chaugnar Faugn ooboshu 'fhalma ron, uln syha'h zhro lloig 'fhalma ph'hlirgh ep sgn'wahl ph'kn'a, hai kadishtu shagg kn'a stell'bsna naflmnahn' gotha 'fhalma uaaah. Gof'nnog \circled{3} shagg hrii 'ai uaaah ngthrod geboth h'ep ooboshu syha'h, gof'nn epyar sgn'wahl nilgh'ri orr'e Yoggothoth ep wgah'n. Gof'nnagl athg Azathothagl k'yarnak \circled{2} gof'nn Dagon, uln 'fhalma throd phlegeth wgah'nog 'fhalma, nnnHastur uh'e chtenff r'luh. Stell'bsna hlirgh Shub-Niggurath orr'e lw'nafh R'lyeh, lw'nafh ep grah'n li'hee, r'luh gof'nn nw 'fhalma. H'gof'nn ng'fhalma ngehye h'shtunggli Dagon orr'e k'yarnak geb athg ee R'lyeh orr'e, 'aior nnnDagon Shub-Niggurath y-Tsathoggua hrii nog Chaugnar Faugn Nyarlathotepnyth lw'nafh nashagg stell'bsna, fm'latgh zhro nallll ee Nyarlathotep n'ghft ehye nglui naron sgn'wahl. 

\end{document}
3

The height of the \tikz in the definition of \circled is responsible for the added line spacing. One can treat the height of an object as zero with the \smash{} macro. So here, I \smash{\tikz[...]{...}}.

Of course, this now makes overlap a possibility. In an effort to combat this, I reduced the minimum size of the circle to 1.4em.

% !TEX encoding =  UTF-8 Unicode
% -*- program: xelatex -*-
\documentclass[a4paper, 11pt,twoside, openright]{memoir}
\usepackage{mwe} % just for dummy images
\usepackage{pgf,tikz}

\makeatletter
\newcommand*\circled[1]{\smash{\tikz[baseline=(char.base)]{
            \node[anchor=text, shape=circle,fill,draw,inner sep=0pt,text=white,minimum size=1.4em] (char) {#1\strut};}}}
\makeatother

\begin{document}
\sloppy
    Ph'nglui mglw'nafh Cthulhu R'lyeh \circled{1} wgah'nagl fhtagn. Nog Chaugnar Faugn ooboshu 'fhalma ron, uln syha'h zhro lloig 'fhalma ph'hlirgh ep sgn'wahl ph'kn'a, hai kadishtu shagg kn'a stell'bsna naflmnahn' gotha 'fhalma uaaah. Gof'nnog \circled{3} shagg hrii 'ai uaaah ngthrod geboth h'ep ooboshu syha'h, gof'nn epyar sgn'wahl nilgh'ri orr'e Yoggothoth ep wgah'n. Gof'nnagl athg Azathothagl k'yarnak \circled{2} gof'nn Dagon, uln 'fhalma throd phlegeth wgah'nog 'fhalma, nnnHastur uh'e chtenff r'luh. Stell'bsna hlirgh Shub-Niggurath orr'e lw'nafh R'lyeh, lw'nafh ep grah'n li'hee, r'luh gof'nn nw 'fhalma. H'gof'nn ng'fhalma ngehye h'shtunggli Dagon orr'e k'yarnak geb athg ee R'lyeh orr'e, 'aior nnnDagon Shub-Niggurath y-Tsathoggua hrii nog Chaugnar Faugn Nyarlathotepnyth lw'nafh nashagg stell'bsna, fm'latgh zhro nallll ee Nyarlathotep n'ghft ehye nglui naron sgn'wahl. 

\end{document}

enter image description here

|improve this answer|||||
  • Thanks ! Is there a way to also reduce the size of the circle ? – reyman64 Apr 7 '15 at 17:00
  • @reyman64 Please see revision. – Steven B. Segletes Apr 7 '15 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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