楼主: oliyiyi
923 3

Fast font changes in AUCTeX [推广有奖]

版主

泰斗

0%

还不是VIP/贵宾

-

TA的文库  其他...

计量文库

威望
7
论坛币
271951 个
通用积分
31269.3519
学术水平
1435 点
热心指数
1554 点
信用等级
1345 点
经验
383775 点
帖子
9598
精华
66
在线时间
5468 小时
注册时间
2007-5-21
最后登录
2024-4-18

初级学术勋章 初级热心勋章 初级信用勋章 中级信用勋章 中级学术勋章 中级热心勋章 高级热心勋章 高级学术勋章 高级信用勋章 特级热心勋章 特级学术勋章 特级信用勋章

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
This is a really simple tip, but it saves a lot of dull work. In AUCTeX, you can mark some text and press C-c C-f C-e to put an \emph around it. Type C-c C-f C-h to see other options, divided into text and math modes.

But wait, there’s more! If you precede it with an argument (i.e., C-u), instead of marking up the region, AUCTeX replaces the most nested font command around the point with the given one (disregarding the region). This means that (if the point is marked with -!-), this:

  1. Hello \textit{wor-!-ld!}
复制代码

becomes this:

  1. Hello \emph{wor-!-ld!}
复制代码

after pressing C-c C-f C-e. Also, you can press C-u C-c C-f C-d and the nearest (again, in the sense of nesting) font command disappears altogether. Very handy, and I have to admit that I miss that a lot in Org-mode (even though Org’s markup wrt fonts is much lighter).

If you have your own font changing commands, like, say, \defterm (for the defined term, possibly defined by

  1. \newcommand{\defterm}[1]{\emph{#1}}
复制代码

or something similar), you can add it to LaTeX-font-list and enjoy your own font-changing command on the C-c C-f ,,prefix’’. (It’s not really a prefix, since it just runs the TeX-font command, but that doesn’t matter now.)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:changes change CHAN fast font command instead simple around nested

缺少币币的网友请访问有奖回帖集合
https://bbs.pinggu.org/thread-3990750-1-1.html
沙发
janyiyi 发表于 2016-10-17 15:01:09 |只看作者 |坛友微信交流群
沙发···········

使用道具

藤椅
janyiyi 发表于 2016-10-17 15:07:36 |只看作者 |坛友微信交流群
谢谢分享~~~~

使用道具

板凳
Kamize 学生认证  发表于 2016-10-17 21:08:31 来自手机 |只看作者 |坛友微信交流群
oliyiyi 发表于 2016-10-17 10:58
This is a really simple tip, but it saves a lot of dull work. In AUCTeX, you can mark some text and  ...
谢谢楼主分享的资料不错哦!

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-19 17:30