Hi,
I have switched to lyx few days ago from MS word. I have no background in Latex programming. I am writing a technical book on a programming language. When I write names of functions, I wish them to be connected to a certain style which will be defined as bold with some color. I need it to be a style (or what ever it is called) so I can change the definition of this style in the future as I find fit. For now I didn't find any solution, so I just each time select the words I want, right mouse click and bold them. Can anyone help how to solve this ?
Thanks,
Dan
LyX ⇒ writing a book - more styles
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
writing a book - more styles
Hi and welcome,
LaTeX is a macro language, you can always define new macros like
You can use it inside LyX using ERT-Boxes. But since you are familiar with programming languages, i think using LaTeX-code directly will be more comfortable for you.
Packages like listings can help you in formatting program code.
LaTeX is a macro language, you can always define new macros like
Code: Select all
\usepackage{xcolor}
\colorlet{function}{blue!50!white}
\newcommand{\function}[1]{{\color{function}\bfseries#1}
Packages like listings can help you in formatting program code.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.