2009/4/7 Wei-Wei Guo <wwgu...@gmail.com>: > Wolfgang Schuster 写道: >> >> Am 06.04.2009 um 17:17 schrieb Wei-Wei Guo: >> >>> Dear all, >>> >>> I need to draw underlines under a paragraph. The number of underlines is >>> determined by the number of lines of the paragraph. For example: >> >> \definetextbackground >> [underline] >> [location=text, >> alternative=1, >> background=, >> frame=off] >> >> \starttext >> >> \startunderline >> \input knuth >> \stopunderline >> >> \stoptext >> > > It is not what I want. First, the underline is too close to the text. I need > to be able to manipulate the distance between the underline and the text. > Second, the underline of the last line has the same length with the last > line of the text. The underlines should be all the same length. > >
Hi, May be this can help you. %%%% \startuseMPgraphic{mpos:par:columnset} % Shift underlining down a touch \iftracepositions show_multi_pars \else draw_multi_pars \fi ; path p ; p := boundingbox currentpicture ; currentpicture := currentpicture shifted (0,-1.2*StrutDepth) ; setbounds currentpicture to p ; \stopuseMPgraphic \definetextbackground[underline] [location=paragraph,alternative=1,background=,frame=off] \definestartstop [underline] [before={\starttextbackground[underline]}, after=\stoptextbackground] \starttext \startunderline \input knuth \stopunderline \stoptext %%%% -- Best wishes, Li Yanrui * Gentoo Linux (~x86) * ConTeXt Minimals Beta (2009.04.06 18:43) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________