LyX ⇒ writing a book - more styles
-
- Posts: 2
- Joined: Wed Nov 19, 2014 4:22 pm
writing a book - more styles
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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
writing a book - more styles
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.