首页 > 其他分享 >在mac上使用不同的latex中文字体并修改字号

在mac上使用不同的latex中文字体并修改字号

时间:2023-06-14 11:03:45浏览次数:52  
标签:latex mac newcommand 中文字体 fontsize baselineskip 字体 selectfont 1.25

参考:Mac中使用LaTeX的中文字体出现Package fontspec Error: The font “宋体“ cannot be found.解决方案

修改全文字体:

\setCJKmainfont{STSong}%衬线字体 
\setCJKsansfont{STHeitiSC-Light}%serif是有衬线字体sans serif无衬线字体。 # 试下来好像只有这个有效
\setCJKmonofont{STFangsong}%中文等宽字体

在文中修改部分字体:

{\songti 你好世界!}
{\lishu 你好世界!}
{\heiti 你好世界!}

字号修改:

\newcommand{\chuhao}{\fontsize{42pt}{1.25\baselineskip}\selectfont}     %初号
\newcommand{\xiaochuhao}{\fontsize{36pt}{1.25\baselineskip}\selectfont} %小初号
\newcommand{\yihao}{\fontsize{28pt}{1.25\baselineskip}\selectfont}      %一号
\newcommand{\erhao}{\fontsize{21pt}{1.25\baselineskip}\selectfont}      %二号
\newcommand{\xiaoerhao}{\fontsize{18pt}{1.25\baselineskip}\selectfont}  %小二号
\newcommand{\sanhao}{\fontsize{15.75pt}{1.25\baselineskip}\selectfont}  %三号
\newcommand{\sihao}{\fontsize{14pt}{1.25\baselineskip}\selectfont}%     四号
\newcommand{\xiaosihao}{\fontsize{12pt}{1.25\baselineskip}\selectfont}  %小四号
\newcommand{\wuhao}{\fontsize{10.5pt}{1.25\baselineskip}\selectfont}    %五号
\newcommand{\xiaowuhao}{\fontsize{9pt}{1.25\baselineskip}\selectfont}   %小五号
\newcommand{\liuhao}{\fontsize{7.875pt}{1.25\baselineskip}\selectfont}  %六号
\newcommand{\qihao}{\fontsize{5.25pt}{1.25\baselineskip}\selectfont}    %七号

调整示例:
{\lishu\erhao 这里写上标题}

标签:latex,mac,newcommand,中文字体,fontsize,baselineskip,字体,selectfont,1.25
From: https://www.cnblogs.com/mercurysun/p/17479609.html

相关文章

  • 为 papermod 主题添加 Latex 支持
    stepstofollow在themes/PaperMod/layouts/partials目录下创建math.html文件,文件内容如下<linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"integrity="sha384-bYdxxUwYipFNohQlHt0bjN/LCpueqWz13HufFEV1SUatK......
  • mac下安装memcached
     mac下安装memcached 更多memcached信息可以参考http://www.ibm.com/developerworks/cn/java/j-memcached1/ memcached是由DangaInteractive开发并使用BSD许可的一种通用的分布式内存缓存系统。DangaInteractive开发memcached的目的是创建一个内存缓存系统来处理其......
  • mac下nginx+tomcat+memcached集群配置和共享session
     mac下nginx+tomcat+memcached集群配置和共享session  首先分别安装nginx(版本1.5.8)、tomcat(版本7.0)、memcached(版本1.4.17),具体安装说明请分别参考下面的文章。 nginx安装说明 http://stephen830.iteye.com/blog/2002195tomcat安装说明http://stephen830.iteye.com/blog/2001......
  • IINA-Mac免费视频播放器
    IINA是一款Mac免费的视频播放器,支持播放Flash。在iOS中是一款非常受欢迎的播放器,同时也可以使用IINA播放Flash和音频,也可以播放其他格式的音视频。IINA支持Flash、ASF、SVG、AVI、MKV、DAT等格式。IINA支持多种音轨,比如Flash,ASF,SVG和AVI,音频播放方面有SRS空间......
  • mac 改变默认终端主题
    oh-my-zshsh-c"$(curl-fsSLhttps://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"修改背景颜色打开终端右键背景-》检查显示器-》双击喜欢的背景-》设置默认......
  • Mac的IDEA配置Junit单元测试
    Junit使用步骤1.定义一个测试类(测试用例)规范建议:测试类命名:功能名称或者类名+Test包命名:xxx.xxx.xxx.test2.定义测试方法规范建议:方法名:test+被测试的方法名返回值:void参数列表:空参3.给方法加上注解@Test4.添加Junit的依赖环境添加Junit依赖环境前,输入@Test......
  • macOS系统adb logcat grep 过滤多个关键字
    macOS系统adblogcatgrep过滤多个关键字: 1、过滤单个关键字:adblogcat|grep"error" 2、过滤多个关键字:adblogcat|grep-e"error"-e"warning"-e"fatal" 把日志保存到本地:adblogcat|grep-e"error"-e"warning"......
  • mac 下利用 xdebug生成性能报告
    1、安装xdebug[xdebug]zend_extension=xdebug.soxdebug.remote_enable=1xdebug.remote_handler=dbgpxdebug.remote_mode=reqxdebug.remote_connect_back=0xdebug.remote_host=0.0.0.0xdebug.remote_port=9001xdebug.idekey=PHPSTORMxdebug.remote_autostart=0xdebug.p......
  • window下正常的springboot到mac下运行却报错
    Errorcreatingbeanwithname'defaultValidator'definedinclasspathresource[org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]:Invocationofinitmethodfailed;nestedexceptionisjava.lang.NoClassDefFoun......
  • mac 下Golang 安装Protobuf
    1、安装protobufbrewinstallprotobuf2、检查安装结果protoc--version3、安装golangforprotobuf插件gogetgithub.com/golang/protobuf/protoc-gen-gogoget-u-vgithub.com/golang/protobuf/protoc-gen-gogoget=gitclone+goinstall这里会慢的要死所以我这里采取......