[NTG-context] metafun example & utf8 input problem
Hi all, I'm trying the example at page 236 Graphics and macros (metafun-s.pdf). I use vietnamese utf-8 input with T5.: --- code --- \enableregime[utf] \setupencoding[default=t5] \loadmapfile[urwvn] \usetypescript[all][computer-modern][t5] \setupbodyfont[reset] \usetypescript[berry][t5] \usetypescript[postscript][t5] \setupbodyfont[postscript,12pt] \starttext \startuseMPgraphic{FunnyFrame} picture p ; numeric w, h, o ; p := textext.rt(\MPstring{FunnyFrame}) ; w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ; p := p shifted (2o,h-ypart center p) ; draw p ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ; draw boundingbox p ; setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay [FunnyFrame] [\useMPgraphic{FunnyFrame}] \defineframedtext [FunnyText] [frame=off,background=FunnyFrame] \def\StartFrame{\startFunnyText} \def\StopFrame {\stopFunnyText } \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{} \FrameTitle{Nháng nhán Äánh} \StartFrame Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng! Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng! Nháng nhán Äánh trÃn ÄÃy cà thá ÄÃng, cà thá khÃng ÄÃng! \StopFrame \stoptext end of code The text in \StartFrame \StopFrame is correctly printed. But the \FrameTitle is not. I lossed all accented characters. In Acroread, I found that the framed title uses CMR12 font instead of VnNimbusRomNo9L-Regu font like the body. Any help will be very appreciated. Thank you, Quy NGUYEN-DAI ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Sidebars and versals Oh my!
Been working my way through the examples in the Columns Manual, the Details Manual etc. and had some thoughts on additional features. Versals come in many different flavors, of which the conventional dropped cap is just one. Even that facility could use a tweak. Conventionally, to provide a transition from the dropped cap to the normal text, the rest of the first word, or the next two or three words, or sometimes the entire first line is put in a small caps typeface. I cobbled up my own macro for this for a particular book I typeset: \def\drop#1#2{% \noindent {\head #1} \vskip -20pt \noindent \hangindent=1.7em \hangafter=-2 {\sc #2} } But this is not the only type of versal. Sometimes a large capital letter (perhaps in italics) is centered on the top of the textblock thus: \def\drop#1#2{\noindent\hglue .4\hsize{\tfd#1}{\sc#2}} Now there are other variations seen in fine books, such as a dropped initial cap partly or completely protruding into the left margin, often colored gray. The first macro above could be modified for a specific case. A general macro is more challenging. A matter of continuing interest is the sidebar, which can be placed in the outer margin, or flush left or right in a paragraph, or partly protruding into the outer margin. Usually these sidebars will have a gray background and often have a border. It appears that creating the sidebar separately as a pdf graphic and then importing and placing it would be the easiest way home. Context already has mechanisms for flowing or wrapping text around a graphic. How well the wraparound feature works when more than one short paragraph is involved I have not tested yet. In any case I will continue to explore these layout features, and if anything interesting shows up I will share. -- John Culleton Short list of publishing/marketing books: http://wexfordpress.com/tex/shortlist.pdf ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] algorithms style : need \starttyping with TeX and math feature
Maurice Diamantini wrote: > Well I agree that it's no more "typing" any more! > So a special option for \setuplines would be more appropriate? Exactly, \starttyping does exactly that what you don't want: it disables math and expansion of TeX commands. Also, perhaps my request is simply an option of \startlines which keep not only the lines break, but also the first spaces of each line (in a verbatim font fors these space) In plain TeX you have a command \obeyspaces (apart from \obeylines). Nevertheless, whitespaces at the beginning of line are ignored when using \obeyspaces, so you additionally need to write an escaped whitespace '\ ' or \strut at the beginning of line (I guess there's a more efficient solution for that, but I'm no expert). But if you really only need whitespace at the beginning of line, probably make something like: \def\tab{\strut\hbox to 3em{}} % or any other size instead 3em instead of using \obeyspaces and simply put \tab where you need a certain amount of white space. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Acrobat 7.0
Am 23.12.2004 um 11:47 schrieb Hans Hagen: well, somehow i got the feeling that this time for windows users updating does not bring anything really new the only happy users will be mac users who now have proper pdf in their browsers There's a lot of new or enhanced features for us prepress people, e.g. for Reader Extensions you don't need this expensive server product any more, that means, if you own Acrobat 7 Professional you can enable the correction tools in Reader for your document. And I very much hope that they fixed some of the bugs... Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] algorithms style : need \starttyping with TeX and math feature
A solution of my probleme could be reformule to : How can I configure the \setuptyping environment to be able to keep the normal feature of special TeX caracters like: - \ - { and } and [ and ] - $ Well I agree that it's no more "typing" any more! So a special option for \setuplines would be more appropriate? Le 24 déc. 04, à 09:07, Maurice Diamantini a écrit : Bonjour à tous, I'm trying to white some algorithms in natural language (versus pseudo-computing langage) I need to keep some "typing" for write space (i.e. indentation of text) while being able to white TeX commands (with \xxx{yyy}) and math (like $y_u(t)$) In fact I'd like some LaTeX algorithms style like feature. I could do some recursive \startitemize...\stopitemize... but it is two much verbose, so I thought looking at the ConTeXt "typing" system Also, perhaps my request is simply an option of \startlines which keep not only the lines break, but also the first spaces of each line (in a verbatim font fors these space) Thank you for any help! -- Maurice Diamantini ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] algorithms style : need \starttyping with TeX and math feature
Bonjour à tous, I'm trying to white some algorithms in natural language (versus pseudo-computing langage) I need to keep some "typing" for write space (i.e. indentation of text) while being able to white TeX commands (with \xxx{yyy}) and math (like $y_u(t)$) In fact I'd like some LaTeX algorithms style like feature. I could do some recursive \startitemize...\stopitemize... but it is two much verbose, so I thought looking at the ConTeXt "typing" system Also, perhaps my request is simply an option of \startlines which keep not only the lines break, but also the first spaces of each line (in a verbatim font fors these space) Thank you for any help! -- Maurice Diamantini ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context