Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: bold color text and export to file

by pvaldes (Chaplain)
on Sep 22, 2014 at 20:10 UTC ( [id://1101565]=note: print w/replies, xml ) Need Help??


in reply to bold color text and export to file

color output was difficult to save in text file

You can do it. It depends of the desired output format... want a yummy pdf?

my $dna = "AAAAAACAAACAAACCCAATATATATATACGACATATATTATATATTATACCCCGGG"; my $preciouss = substr $dna, 15, 28; open (my $output, '>', "latex_file.tex"); print $output "\\documentclass{article}\n\\usepackage{color}\n"; print $output "\\begin{document}\n"; print $output "THIS IS MY BORING GENE: \\textcolor{red}{", $preciouss, + "}\\\\\\textcolor{blue}{OKAY, OKAY... \\textit{NOT SO BORING}, {\\bf + IS RED!}}"; print $output "\n\\end{document}"; close $output; system("pdflatex latex_file.tex"); system("xpdf latex_file.pdf &");

You will need to have installed a decent tex distro and xpdf. See texlive. You can also translate to html, dvi or postscript easily from here, as you will

Update: typo fixed in textit and new link

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1101565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found