win10 linux lyx,windows下面设置lyx指南

%%%%%%%%%%%%%%%%%%

\usepackage[cm-default]{fontspec}

\usepackage[slantfont, boldfont]{xeCJK}

\usepackage{xunicode}

\usepackage{xltxtra}

\usepackage{zhspacing}

\zhspacing

%\setmainfont{Times New Roman}

\setCJKmainfont{SimSun}

\setCJKfamilyfont{song}{SimSun}

\setsansfont{AR PL UKai CN}

\setmainfont[BoldFont=SimHei,ItalicFont=楷体_GB2312]{SimSun}

%\setmainfont[Mapping=tex-text]{文泉驿等宽微米黑} %这里是字体名

%中文断行

\XeTeXlinebreaklocale "zh"

\XeTeXlinebreakskip = 0pt plus 1pt

% 页边距设置

\usepackage[top=1.2in,bottom=1.2in,left=1.2in,right=1in]{geometry}

% 页眉页脚设置

\usepackage{fancyhdr}

\pagestyle{fancy}

\fancyhf{} % 清空页眉页脚

\fancyhead[LE,RO]{\thepage} % 偶数页左,奇数页右

\fancyhead[RE]{\leftmark} % 偶数页右

\fancyhead[LO]{\rightmark} % 奇数页左

\fancypagestyle{plain}{

\fancyhf{} % 重定义plain页面样式

\renewcommand{\headrulewidth}{0pt}

}

\renewcommand\chaptermark[1]{\markboth{\chaptername~ #1}{}}

\renewcommand\sectionmark[1]{\markright{\thesection~ #1}}

\renewcommand{\baselinestretch}{1.25} % 正文行距

% 章节格式设置

\usepackage{titlesec}

\titleformat{\chapter}{\centering\huge}{第\thechapter{}章}{1em}{\textbf}

\titleformat{\part}{\centering\huge}{第\thepart{}部分}{1em}{\textbf}

\renewcommand{\contentsname}{目~录}

\renewcommand{\indexname}{索引}

\renewcommand{\listfigurename}{插图目录}

\renewcommand{\listtablename}{表格目录}

\renewcommand{\figurename}{图}

\renewcommand{\tablename}{表}

\renewcommand{\appendixname}{附录}

%\renewcommand{\appendixpagename}{附录}

%\renewcommand{\appendixtocname}{附录}

%\renewcommand\refname{参考文献}

\usepackage{listings}

\usepackage{color}

\definecolor{hellgelb}{rgb}{1,1,0.85}

\definecolor{colKeys}{rgb}{0,0,1}

\definecolor{colIdentifier}{rgb}{0,0,0}

\definecolor{colComments}{rgb}{1,0,0}

\definecolor{colString}{rgb}{0,0.5,0}

\lstset{%

language=Matlab,%

float=hbp,%

basicstyle=\footnotesize\ttfamily,%

identifierstyle=\color{colIdentifier},%

keywordstyle=\color{colKeys},%

stringstyle=\color{colString},%

commentstyle=\itshape\color{colComments},%

columns=fixed,

tabsize=4,%

frame=single,%

framerule=1pt,

extendedchars=false,%这一条命令可以解决代码跨页时,章节标题,页眉等汉字不显示的问题

showspaces=false,%

showstringspaces=false,%

numbers=left,%

numberstyle=\tiny\ttfamily,%

numbersep=1em,%

breaklines=true,%

breakindent=10pt,%

backgroundcolor=\color{hellgelb},%

breakautoindent=true,%

captionpos=t,%

xleftmargin=1em,%

xrightmargin=\fboxsep,

escapechar=`

}

%%%%%%%%%%%%%%%%%%%%%%%

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值