General ⇒ C++
C++
It is so nice to pretend, someone will answer! I just found this forum, lets see, what happen...
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
C++
Code: Select all
C{\large ++}
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
C++
Code: Select all
C\raisebox{1pt}{\small ++}
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
C++
Code: Select all
\documentclass{article}
\DeclareRobustCommand{\Cp}
{C\protect\raisebox{0.2ex}{\small ++}}
\begin{document}
C++
\Cp
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
C++
The solution provided by gmedina depends on the current font size and therefore is more universal hence preferable.mansniks wrote:Ok, that goes good as a quick solution, but it would be nice, that number for raisebox would be relative...
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
C++
here's a similar solution, perhaps you want to try it too at different sizes, shapes and font families:
Code: Select all
\usepackage{relsize}
\def\C++{%
\ifdim\fontdimen3\font=0pt C++%
\else C\kern-.16em\raise.35ex\hbox{\relsize{-2}{++}}\fi}