Text FormattingWhy do I get bold text after finishing \bf and \it

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ravishon
Posts: 2
Joined: Fri Mar 20, 2009 7:13 pm

Why do I get bold text after finishing \bf and \it

Post by ravishon »

Hi,

I am trying to create a HTML to Latex parser in C#.

One of the problems I am having is converting something like
Hello there mate, you ok?
I generate the following LateX

Code: Select all

hello \bf{\it{there}} mate, you \underline{ok?}
which gives me everything from the word 'there' in bold.

I tried LyX to see its LaTeX output and I got all Bold.

The LyX code was

Code: Select all

\emph{hello} \textbf{\emph{there}} mate, you \underbar{ok?}
Am i using the wrong version? is my LaTeX code wrong?

Please Help!!

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Why do I get bold text after finishing \bf and \it

Post by localghost »

ravishon wrote:[...] Am i using the wrong version? is my LaTeX code wrong? [...]
Indeed you are using the wrong syntax. It is from the old LaTeX2.09 days and is actually TeX notation. This notation should not be used because it can't be nested like the LaTeX2e syntax.


Best regards and welcome to the board
Thorsten¹
ravishon
Posts: 2
Joined: Fri Mar 20, 2009 7:13 pm

Re: Formatting.

Post by ravishon »

ok.

So the version of LaTex (or miktex) i have installed is correct and i am using the wrong latex code right?

What should the correct latex code be for the line I want to convert?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Why do I get bold text after finishing \bf and \it

Post by localghost »

ravishon wrote:[...] What should the correct latex code be for the line I want to convert?
It goes without saying that it is the sample code given by LyX. The \underline command can be kept. Do some basic reading and take the introductory documents from our beginners list [1]. These documents will explain how to use switches between families, series and shapes of fonts.

[1] LaTeX Resources for Beginners
Post Reply