[NTG-context] Including xfig graphics

Taco Hoekwater taco at elvenkind.com
Fri Jan 7 10:09:47 CET 2011


On 01/07/2011 10:07 AM, Alan BRASLAU wrote:
> Hello,
>
> Ultimately, you will probably be more satisfied using Metapost graphics
> "natively" within ConTeXt. With xfig, you can export to Metapost.
> This code can probably be directly used by ConTexT, or perhaps with
> minor modifications.

I did a quick test, and the transfig mp code starts with this nice (!)
block of verbatimtex:

% +MP-ADDITIONAL-HEADER
verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex
% -MP-ADDITIONAL-HEADER


%SetFigFont macros for latex
verbatimtex
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
   \reset at font\fontsize{#1}{#2pt}%
   \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
   \selectfont}%
\fi\endgroup%
\ifx\SetFigFontSize\undefined%
\gdef\SetFigFontSize#1#2{%
   \fontsize{#1}{#2pt}%
   \selectfont}%
\fi%
etex

It looks configurable-ish, but I do not feel like experimenting
without a proper test case.

Best wishes,
Taco


More information about the ntg-context mailing list