[TxMt] Re: html pretty print
Juan Falgueras
jfalgueras at uma.es
Thu May 24 09:40:36 UTC 2007
> De: Jacob Rus <jacobolus at gmail.com>
>
>
> Juan Falgueras wrote:
>
>> ....but, why it doesn't colour when you give it selections? ehmmm
>> I usually need to cut functions, etc...
>> but anyway the Brad Choate solution is much much better than the
>> enscript one. Thanks
>> Is there some trick for make B. Choate script to colour portions
>> of text?
>>
>
> You're going to have to explain what you're having trouble with. I
> have no trouble turning selections to html with that command...
>
Yes. If you select a slice of your source code like...
-------
int main(){
TpNumero numero;
if (LeerCadena(numero)){
cout << "La cadena es correcta: " << numero << endl;
ImprimeDisplay(numero);
}
return 0;
}
--------
you get:
---------
<pre class="textmate-source"><span class="source source_c++">
<span class="storage storage_type
......
</span></pre>
--------
without the definitions of styles.. and the the rendering of this
html is uncoloured...
You need to select ALL the source text to get the full html with
colour styles, etc.
If you do so, the generated html starts with all the necessary styles:
-------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>displayNum.cpp</title>
<style type="text/css">
/* Stylesheet generated from TextMate theme
*
* VERDE
*
*
*/
/* Mostly to improve view within the TextMate HTML viewer */
body {
margin: 0;
padding: 0;
}
pre.textmate-source {
margin: 0;
padding: 0 0 0 2px;
font-family: ProFont, monospace;
........
---------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070524/7441e2a2/attachment.html>
More information about the textmate
mailing list