[TxMt] Re: How to publish highlighted code with line numbers?

Walter Lee Davis waltd at wdstudio.com
Fri Apr 15 16:42:24 UTC 2011


Maybe just take screenshots as PDF or PNG, and put those into Word...  
You can grab a sub-page selection with Shift-Command-4 (drag  
crosshairs to select and grab). If you also hold the Control key down  
at the same time, the clip goes to your clipboard rather than the  
Desktop. And then you can simply paste into Word.

Walter

On Apr 15, 2011, at 12:36 PM, Thomas Krajacic wrote:

> AFAIK Textwrangler is just a text editor and hence can also not deal  
> with RTF text. It would have to have an
> "export as RTF with line numbers" function to do what I want, which  
> I highly doubt.
> And I don't think that any text editor tops Textmate in  
> extensibility by means of scripting ;)
>
> On 15 Apr 2011, at 18:28, plastichairdoo wrote:
>
>> perhaps this is a bit uncool - but have you tried using  
>> TextWrangler to do this? it's free. I don't care for it as a IDE  
>> but there are some text manipulations that are far easier to do (as  
>> one off's) in TextWrangler...
>>
>>
>> On Apr 15, 2011, at 9:19 AM, Thomas Krajacic wrote:
>>
>>> I am sure it was asked before, but a search in the archives didn't  
>>> turn up a solution.
>>> I am writing my master's thesis and I need to include C-code in my  
>>> document.
>>> I would like it to be colored and have line numbers.
>>>
>>> There is a nice Copy as RTF command in Textmate that would do  
>>> everything I need, except it doesn't
>>> work, if I add line numbers manually because this obviously breaks  
>>> the code structure and highlighting
>>> breaks. So the line numbering will have to be done after the code  
>>> is colorized.
>>>
>>> I would like to have RTF text since I want to paste it into Word  
>>> later. (Maybe I shouldn't use Word O_o )
>>>
>>> I am sure some of you have had the same problem and maybe someone  
>>> has a working solution.
>>> I also couldn't find any commandline tool that would read and  
>>> write rtf line by line, which would
>>> be a simple post-processing step then to add the numbering.
>>> It might be possible to change the original Copy as RTF Bundle,  
>>> but having a quick look inside it was
>>> a bit tricky to find where to add the necessary code.
>>>
>>> Help is greatly appreciated.
>>>
>>> Thomas
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate at lists.macromates.com
>>> http://lists.macromates.com/listinfo/textmate
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list