Text Formatting ⇒ circle around letters
-
- Posts: 26
- Joined: Wed Sep 30, 2009 7:04 pm
circle around letters
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
circle around letters
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}
-
- Posts: 26
- Joined: Wed Sep 30, 2009 7:04 pm
Re: circle around letters
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
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
circle around letters
Code: Select all
\newcommand*\mycirc[1]{%
\begin{tikzpicture}[baseline=(C.base)]
\node[draw,circle,inner sep=1pt](C) {#1};
\end{tikzpicture}}
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...;-)
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: circle around letters
sorry for the mistake in name, I must have read another posting of Thorsten right before. Now it's corrected above.
Stefan
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
circle around letters
Code: Select all
\newcommand*\circled[1]{%
\tikz[baseline=(C.base)]\node[draw,circle,inner sep=0.5pt](C) {#1};\!
}
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10