faqts : Computers : Programming : Languages : Tse : Language : Computer : SubML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 1 people (0%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

TSE: SubML: Convert: Latex: PDF: How to get color text in your PDF output?

Mar 29th, 2005 06:50
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 29 March 2005 - 09:55 pm ----------------------

TSE: SubML: Convert: Latex: PDF: How to get color text in your PDF 
output?

---

Use e.g regular following regular expressions to get the desired 
output.

---

Steps: Overview:

 1. -Add to the <book> tag the text

      \userpackage[dvips]{color}

 2. -I created a new tag:

       <color <your color>>

      ---

      e.g.

       <color red>

      ---

      e.g.

       <color blue>

 3. -Use the regular expression for the header:

      LReplace( "\<book1\>", "\\documentclass{report} \ \\usepackage
[dvips,bookmarks,colorlinks=true,plainpages=false,citecolor=green,urlco
lor=blue,filecolor=blue\]{hyperref}", searchOptionS )

      LReplace( "\<book2\>", "\\usepackage{makeidx} \ \\usepackage
[dvips]{graphics} \ \\makeindex \ \\usepackage[dvips]{color} \\begin
{document} \ ", searchOptionS )

 4. -And the color:

      LReplace( "{\<color}{ #}{[a-z]#}{\>}\c", "\\textcolor{\3}{", 
searchOptionS )

      LReplace( "\<\/color\>", "}", searchOptionS )

---
---

Note:

Split the <book> tag in 2 parts
or else the search/replace string
will become larger than 255 characters.

So I use from now on two book tags,
<book1> and <book2>.

---
---

Internet: see also:

---



----------------------------------------------------------------------