Установить поля печати в Textmate?

475
jww

Я использую OS X 10.8.5 с TextMate 2.0-beta.6. Я хочу напечатать текстовый документ, но кажется, что полей нет (или поля слишком малы, на мой вкус):

Textmate default margins

Я посетил страницу параметров Textmate, но она не отображает настройки, связанные с полями:

Textmate page setup

Как установить поля печати на 0,5 или 1 дюйм?

0

1 ответ на вопрос

1
DavidPostill

Reference 18 Printing would suggest it can't be done...

To the amusement of some and the frustration of others, TextMate currently features only limited printing capabilities.

That means you can only use the document font with no syntax highlighting and no options except the standard printing options plus header and footer fields as shown below.

However, it can be done when printing to PDF.

TextMate Tricks: An Automation to Produce PDFs

I made it possible to configure things like margins and fonts for the PDF with a YAML file. It doesn’t exist yet and the code will run fine without it, but let’s add one more shortcut for that. This time, we don’t need any code and we can just build a snippet. A snippet is a chunk of boilerplate code we can customize to our needs.

Click on that plus in the lower left of the Bundle Editor one more time and choose New Snippet this time. Give it a name like Configure PDF Builder and replace the examples with this code:

# Set margins below. These are in PDF points (72 per inch). top_margin: $ left_margin: $ right_margin: $ bottom_margin: $ # Set font, size, and line spacing below. font: $ font_size: $ spacing: $ 

Read the complete article for full instructions.

Удивительный коммерческий редактор не может печатать должным образом ... И его не ограничивается TextMate - TextWrangler, похоже, постигла та же участь. Я действительно поражен ..... jww 9 лет назад 0