【问题标题】:Textmate 2 scope: Increase font size for section in latex documentTextmate 2范围:增加乳胶文档中部分的字体大小
【发布时间】:2012-10-11 07:35:28
【问题描述】:

问:在 Textmate 2 中编辑 .tex 文件时:如何以更大的字体打印 Latex 部分?

我在 Latex 包中添加了以下语法:

{   patterns = (
    {   begin = 'section\{';
        end = '\}';
        name = 'markup.heading.1.latex';
    },
);
}

此外,我还添加了以下应用于新定义的 markup.heading.1.latex 范围的设置:

{   fontName = 'Baskerville';
fontSize = '2.25em';
}

问题:它只匹配没有前导的部分:

...当我将范围定义更改为以下内容时(在“部分”前面添加 \\):

{   patterns = (
    {   begin = '\\section\{';
        end = '\}';
        name = 'markup.heading.1.latex';
    },
);
}

.. 范围不适用。

有什么想法吗?

【问题讨论】:

标签: scope textmate textmatebundles


【解决方案1】:

您的问题的答案是编辑主题包。

在 Texmate 2 中更改部分外观的过程如下:

在 Bundle 编辑器菜单中,选择 Edit bundles ....

然后选择捆绑包主题。

从菜单文件中选择新建,并在出现提示时选择设置

为设置命名。

在 Scope Selector 字段中使用 meta.function.section.latex

然后你可以编辑设置,例如:

{   
    fontName = 'Courier';
    fontSize = 36;
}

然后保存(以通常的方式,例如,command-s)。

您可以重复其他切片命令(要识别范围,将光标移动到适当的位置,然后使用以下组合键 control-shift-P)

answer taken from here请注明原作者。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-04
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    相关资源
    最近更新 更多