Text FormattingProblem with ifthenelse or ifmmode

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Problem with ifthenelse or ifmmode

Post by artemff »

Why such simple example generate error?

Code: Select all

\documentclass [a4paper, 12pt, oneside]{scrartcl}
\usepackage [cp1251] {inputenc}
\usepackage [english, russian] {babel}
\usepackage{indentfirst}
\usepackage{misccorr}
\usepackage{amsmath}
\usepackage{ifthen}
\begin{document}
$\ifthenelse{\ifmmode}{\text{В}}{В}$
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Re: Problem with ifthenelse or ifmmode

Post by artemff »

I have solved problem.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Problem with ifthenelse or ifmmode

Post by localghost »

Then please be so kind and post this solution here.


Best regards
Thorsten
Post Reply