Achtung: Dies ist eine historische Web-Site. Aktuell ist https://rainer.gerhards.net/ (engl) bzw https://www.rainer-gerhards.de/ (deutsch). Alle dynamischen Funktionen, Formulare etc auf dieser Seite sind abgeschaltet.
Datenschutzerklärung Impressum

Astronomy and Space Flight, Astronomie und Raumfahrt und dies und das...

Rechenanlagen - LaTeX und xfig

rgerhards - 29.10.2008, 10:10 Uhr
Titel: LaTeX und xfig
Ein guter Artikel findet sich unter: http://www.xfig.org/userman/latex_and_xfig.html

Für Fedora und Nutzung von pdflatex:



Und hier zitiere ich jetzt einfach einmal schamlos aus obiger Anleitung:

Zitat:

A COMBINED PDF/LaTeX FILE
This is the method I would recommend in most cases. It may be difficult for the beginner at the first time, but it is really powerful. If you choose this method, you'll have to set the xfig fonts to LaTeX ones, and to set the "special" attribute of your text boxes. To do this automatically, you can add these 2 lines in your .Xresources or .Xdefaults (depends on your system):

Fig.latexfonts: true
Fig.specialtext: true


Then, when exporting, select the "Combined PDF/LaTeX" format. Then, in your LaTeX file, put in the preamble:
\usepackage[pdftex]{graphicx,color}
The color package is required whenever you put some text in colors. Then include the picture with:
\input foo.pdftex_t
You can also resize it:
\resizebox{3cm}{!}{\input foo.pdftex_t} % sets the width to 3cm
Pros: Whatever is put in your text boxes is treated just as your document's code; that means you can use your own macros, which is really cool.
Cons: When putting big formulas on your figure, it is sometimes difficult to predict what place they will take because xfig and fig2dev don't know the bounding area of the text because they contain LaTeX directives that aren't printed.


Das graphicx Paket hat man evtl. schon aus anderen Gründen eingebunden, dann muss man das hier natürlich nicht noch einmal machen. Unter Fedora haben meine xfig Ausgabedateien die extension .pdf_t und nicht .pdftext_t. Damit funktioniert es aber auch wunderbar.

Etwas lästig ist, dass die Ausdrücke nicht im Wysiwg mode erscheinen, dadurch wird die Positionierung teilweise umständlich. Da hilft dann nur ausprobieren - zumindest habe ich keinen besseren Weg gefunden.

Die Qualität der so erzeugten Grafiken ist deutlich besser, als der Umweg über jpeg oder ähnliches. Und der große Vorteil ist halt, dass man nach belieben LaTeX Ausdrücke verwenden kann.
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007