Hello,
I want to make a small circle around the letter "N" and "F". These encircled letters will appear in the text. I have tried the command \textcircled{} and it works fine for some letters, but for others the letter is not centered inside the circle. How do I get around this problem ?
Thank you.
Text Formatting ⇒ circle around letters
circle around letters
Hi,
in the following code I used the PGF/TikZ package to define a \mycirc command that can be used to enclose its argument in a circle:
Feel free to adapt my example according to your needs.
in the following code I used the PGF/TikZ package to define a \mycirc command that can be used to enclose its argument in a circle:
Code: Select all
\documentclass{article}
\usepackage{tikz}
\newcommand*\mycirc[1]{%
\begin{tikzpicture}
\node[draw,circle,inner sep=1pt] {#1};
\end{tikzpicture}}
\begin{document}
\mycirc{N}
\mycirc{F}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 26
- Joined: Wed Sep 30, 2009 7:04 pm
Re: circle around letters
Hello,
Thank you for your assistance. One questions. How did you get to be so good at latex??
Thank you for your assistance. One questions. How did you get to be so good at latex??
-
- Posts: 26
- Joined: Wed Sep 30, 2009 7:04 pm
Re: circle around letters
Hey,
I tried you command and it worked. I would like the encircled letters to appear in line with the rest of the text. Any suggestions?
Thanks.
I tried you command and it worked. I would like the encircled letters to appear in line with the rest of the text. Any suggestions?
Thanks.
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
circle around letters
This is also no problem with TikZ. Here's gmedinas Macro with a modification:
Stefan
Code: Select all
\newcommand*\mycirc[1]{%
\begin{tikzpicture}[baseline=(C.base)]
\node[draw,circle,inner sep=1pt](C) {#1};
\end{tikzpicture}}
LaTeX.org admin
circle around letters
You are welcome!abu aasiyah wrote:...Thank you for your assistance...
At least four factors are involved: a good book (The LaTeX Companion, for example), the information contained in CTAN, this board (and CQF.info which regretfully not longer exists) and my love for beautiful texts.abu aasiyah wrote:...One questions. How did you get to be so good at latex??
Thanks Juanjo.Stefan_K wrote:...Here's Thorstens Macro with a modification...
Just kidding...;-)
1,1,2,3,5,8,13,21,34,55,89,144,233,...
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
Re: circle around letters
Hi gmedina,
sorry for the mistake in name, I must have read another posting of Thorsten right before. Now it's corrected above.
Stefan
sorry for the mistake in name, I must have read another posting of Thorsten right before. Now it's corrected above.
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
circle around letters
Another short version of Stefan's idea.
Best regards
Thorsten
Code: Select all
\newcommand*\circled[1]{%
\tikz[baseline=(C.base)]\node[draw,circle,inner sep=0.5pt](C) {#1};\!
}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10