Re: Beginners question
[email protected] Tue, 12 Sep 2023 15:27:21 +0200
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <trinity-f566343a-b549-4999-9d84-624b13411134-1694525241437@3c-app-gmx-bap37> |
> Then, in a label command, you just have to use the control sequence \it, e.g., Another typo. `\it' should have been deleted. > Gesendet: Dienstag, 12. September 2023 um 15:22 Uhr > Von: [email protected] > An: "Patrick Gundlach" <[email protected]> > Betreff: Aw: [metapost] Beginners question > > In your example, you use a low-level command. Normally, one uses `label' or `dotlabel' to include text in a MetaPost file and this is what I'd recommend. > > If you're using TeX for the typesetting, you can define any PostScript font for which the necessary files are available (.tfm and .pfb). In a "normal" TeX installation, e.g., TeXLive or MikTeX, this will certainly be the case for the computer fonts and the standard PostScript fonts. > > You can access any font you want using `verbatimtex', e.g., > > verbatimtex \font\largeit=cmbxti10 scaled \magstep3 etex; > > Then, in a label command, you just have to use the control sequence \it, e.g., > > label(btex {\largeit Abc} etex, (0, 0)); > > You can put as many font definitions or other TeX code as you want (within reason) in the `verbatimtex' command. > > If you don't use any macros, cmr10 is the default (if you're using TeX). > > If you're using, say, Times-Roman as your font, and/or if you're using `troff' or something else for the typesetting, you'll have to check the manual or someone else will have to answer, because I never do either of these things. I have used Times-Roman or some other standard PostScript font in the past, though. > > > Gesendet: Dienstag, 12. September 2023 um 11:08 Uhr > > Von: "Patrick Gundlach" <[email protected]> > > An: [email protected] > > Betreff: [metapost] Beginners question > > > > Hello all, > > > > I try to define a user interface such as: > > > > draw "some text" infont "myfontfamily" withstyle "bold"; > > > > where infant ... and withstyle ... are optional ( and the defaults should be "text" and "regular"). > > > > (How) Is it possible to achieve this? > > > > Is it advisable do to so? Or should I rather create an interface such as > > > > draw text ("some text", "myfontfamily", "bold")? > > > > > > Patrick > > > > > > > > > > -- > > http://tug.org/metapost/ > > -- http://tug.org/metapost/