Você está na página 1de 4

askinclude.

sty - tng tc a tp vo ni dung vn bn


Nguyn Hu in Khoa Ton - C - Tin hc HKHTN H Ni, HQGHN

Gii thiu gi lnh


http://tug.ctan.org/tex-archive/macros/latex/contrib/oberdiek/ Tc gi ca gi lnh l Pablo A. Straub. c Heiko Oberdiek sa v cng c thm.

Gi lnh a cc trang do ta la chn in ra hoc ra tp, c ti a ch

Cch s dng

1. Giao din Gi lnh dng lnh \include{chapter1} a vo mt cch tng tc. Cn \includeonly{chapter1} a vo trc tip. V d mt tp chnh ca ta c \documentclass{report} \usepackage{askinclude} % Khng dng \include trong phn u vn bn. % Thay \input bng cc lnh gi gi lnh trn \begin{document} \include{title} \include{introduction} \include{summary} \include{index} \end{document} Khi bin dch ln u tin c cc kh nng sau y xy ra *********************************** *** Package askinclude Question *** *********************************** Previous answer (noregexp): [*] Regular expressions: --> [noregexp] disabled [makematch] enabled, using package makematch [pdfmatch] enabled, using pdfTeXs \pdfmatch Which files do you want to include? 1

http://nhdien.wordpress.com - Nguyn Hu in [foo,bar] comma separated file or pattern list [*] all files [-] no files [?] ask for each file [] use the previous answer \answer=chapter2,summary Ta g vo tr li \answer=.

foo,bar : cc tp a vo cch du phy, c th chn cch tn tp theo biu thc cc loi chnh quy phn sau. * : a tt c cc tp vo. - : Khng tp no c a vo. ? : chuyn sang cu hi tng tc mode. Phn sau s ni mode ny. : Dng mc nh tr li m c ghi vo tp (.aux) ca ln dch trc. Ln trc khng bin dch mc nh [*] cho tt c cc tp th: noregexp : Khng dng biu thc chnh quy. makematch : Dng dng biu thc chnh quy. pdfmatch : Ch ra tng ng vi pdfTEX 1.30.] Gi lnh askinclude.sty nh cc tp a vo hay cha: V d khi chy li *********************************** *** Package askinclude Question *** *********************************** Files, found by previous run in \include: (-) title (-) introduction (-) chapter1 (+) chapter2 (-) chapter3 (+) summary Previous answer (noregexp): [chapter2,summary] ... 2. Hi theo mode c bit chn tr li ? theo mode s c giao din *********************************** *** Package askinclude Question *** *********************************** Include title? [y]es, [n]o, [A]ll, [N]one, [D]efault (n): \answer= G vo cc k t sau \answer=

http://nhdien.wordpress.com - Nguyn Hu in [y]: [n]: [A]: [N]: [D]: tp ny c a vo. Tp ny khng a vo. Tp ny v cc tp sau . Tp ny v khng np cc tp tip theo. Dng mc nh v cc tp theo.

Nu tp chy ln trc th thng bo (+) l dng ln trc, (-) cha dng v khi dng y hoc n. y l mc nh. 3. Biu thc chnh quy Ba phng php dng biu thc cho tn tp: noregexp : Khng dng chnh quy. makematch : Dng gi lnh makematch. pdfmatch : Dng \pdfmatch nu c. Mc nh l noregexp. a. dng chnh quy makematch Gi lnh makematch ca David Kastrup tm tng ng : [*]: khng trng mt k t hoc nhiu. Ch c * th tt c cc k t. [!]: Khng dng mng sau . V d Mng Danh sch tn tp foobar foobar,dummy foo* foobar,xfoobar *foo* xfoobar f*b*r foobar * any !foobar foobar,other !foo* xfoobar in*,!*dex intro,index !index,in* intro,index *,!chap2 chap1,chap2,chap3

kt qu foobar foobar xfoobar foobar any other xfoobar intro intro,index chap1,chap3

b. Phng php pdfmatch Dng k hiu v $ vo u k t. v ! tng t nh trn. V d:

http://nhdien.wordpress.com - Nguyn Hu in Mng foobar foo.* foo.* foo$ fo?bar fo+bar fo*bar chap3 chap[13] chap(1|3)$ .* !foobar in.*,!dex !index,in.* .*,!chap2 .*,!bla .*,!bla$ Danh sch tn tp foobar,dummy foobar,xfoobar foobar,xfoobar foo,foobar fbar,fobar,foobar fbar,fobar,foobar fbar,fobar,foobar chap3,chap32 chap1, chap1,chap2,chap3 chap1,chap3,chap33 any foobar,other intro,index intro,index chap1,chap2,chap3 foo,bla,blabla foo,bla,blabla kt qu foobar foobar,xfoobar foobar foo fbar,fobar fobar,foobar fbar,fobar,foobar chap3,chap32 chap1,chap3 chap1,chap3 any other intro intro,index chap1,chap3 foo foo,blabla

Você também pode gostar