-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
56 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
" Vim script file | ||
" FileType: TeX (common file) | ||
" Author: lilydjwg | ||
" Maintainer: lilydjwg | ||
" Last Change: 2011年2月9日 | ||
|
||
function texcommon#tex2pdf(cmd) | ||
redir @"> | ||
w | ||
lcd %:p:h | ||
exe '!' . a:cmd . ' %' | ||
redir END | ||
endfunction | ||
|
||
function texcommon#view() | ||
silent !setsid evince %:r.pdf& | ||
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
" Vim script file | ||
" FileType: ConteXt | ||
" Author: lilydjwg <[email protected]> | ||
" Last Change: 2010年6月5日 | ||
|
||
" Last Change: 2011年2月9日 | ||
" --------------------------------------------------------------------- | ||
if $PATH !~ 'context' | ||
echohl WarningMsg | ||
echo "没有载入 ConTeXt 初始化脚本!" | ||
echohl None | ||
endif | ||
runtime ftplugin/texcommon.vim | ||
|
||
nmap <buffer> <C-CR> :call Lilydjwg_tex_pdf('texexec')<CR> | ||
nmap <buffer> <C-F5> :call texcommon#tex2pdf('context')<CR> | ||
" --------------------------------------------------------------------- | ||
" Vim Modeline: | ||
" vim:fdm=expr:fde=getline(v\:lnum-1)=~'\\v"\\s*-{20,}'?'>1'\:1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
" Vim script file | ||
" FileType: XeTeX (common file) | ||
" Author: lilydjwg | ||
" Maintainer: lilydjwg | ||
" Last Change: 2009年12月30日 | ||
" | ||
function! Lilydjwg_tex_pdf(cmd) | ||
redir @"> | ||
w | ||
lcd %:p:h | ||
" 目录中不要脚注 | ||
" !fixlatex.py %:r.toc | ||
" !pdflatex % | ||
exe '!' . a:cmd . ' %' | ||
silent !setsid evince %:r.pdf& | ||
redir END | ||
endfunction | ||
" FileType: TeX common settings | ||
" Author: lilydjwg <[email protected]> | ||
" Last Change: 2011年2月9日 | ||
" --------------------------------------------------------------------- | ||
nmap <buffer> <S-F5> :call texcommon#view()<CR> | ||
" --------------------------------------------------------------------- | ||
" Vim Modeline: | ||
" vim:fdm=expr:fde=getline(v\:lnum-1)=~'\\v"\\s*-{20,}'?'>1'\:1 | ||
" --------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
\documentclass{article} | ||
\usepackage[BoldFont,SlantFont,CJKnumber,CJKchecksingle]{xeCJK} | ||
% \usepackage[unicode,pdfborder={0 0 0}]{hyperref} | ||
\begin{document} | ||
|
||
% \setCJKmainfont{宋体} | ||
% \setCJKfamilyfont{hei}{黑体} | ||
\setCJKmainfont{Adobe Song Std} | ||
\setCJKfamilyfont{hei}{Adobe Heiti Std} | ||
\setCJKfamilyfont{fang}{Adobe Fangsong Std} | ||
\setCJKfamilyfont{kai}{Adobe Kaiti Std} | ||
|
||
\XeTeXlinebreaklocale "zh" | ||
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt | ||
\setlength{\parindent}{2em}%中文缩进两个汉字位 | ||
|
||
|
||
\end{document} | ||
\usemodule[zhfonts] | ||
\zhfonts[rm, 11pt] | ||
|
||
\starttext | ||
|
||
|
||
\stoptext |