.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "FRAGMASTER 1" .TH FRAGMASTER 1 "2020-12-28" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" fragmaster \- Using psfrag constructs with pdflatex .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& fragmaster [options] \& \& Create EPS and PDF files with embedded psfrag substitutions. \& \& Options: \& \-h,\-\-help Brief usage guide. \& \-m,\-\-man Show full man page (needs perldoc) \& \-\-clean Clean auto\-generated $basename.{eps,pdf} files. \& \-\-debug Show more info and leave temporary files behind. \& \-\-force Rebuild everything ignoring modification times. \& \-\-dirfm=file Use given file as optional per\-directory \& fragmaster fm control file instead of default \& "fragmaster.dfm". .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBfragmaster\fR is a perl script that helps using psfrag constructs with \&\fBpdflatex\fR. .PP \&\fBpsfrag\fR is a LaTeX package which allows one to replace text elements in included \s-1EPS\s0 graphics by arbitrary LaTeX output. Because \fBpsfrag\fR uses PostScript for making the replacements, in principle you can't use \fBpsfrag\fR with \fBpdflatex\fR which doesn't have any interfaces to PostScript. .PP \&\fBfragmaster\fR produces a new \s-1EPS\s0 from your original \s-1EPS\s0 which already contains all those \fBpsfrag\fR replacements. This new \s-1EPS\s0 graphic actually can be converted to \s-1PDF\s0 including all replacements. The resulting \*(L"encapsulated\*(R" \s-1PDF\s0 can then be used with pdflatex. .PP \&\fBfragmaster\fR will scan the current directory for files which end in \&\fI_fm\fR and have a \fI_fm.eps\fR counterpart. Looking at the modification dates, the script checks if the output files have to be rebuilt and does so if necessary (a little like \*(L"make\*(R" would do it). .PP In your LaTeX document you can include the produced graphics using .PP .Vb 1 \& \eincludegraphics{} .Ve .PP conveniently omitting file extension. \&\fBlatex\fR will choose the \s-1EPS,\s0 \fBpdflatex\fR will choose the \s-1PDF.\s0 .SS "\fBfragmaster\fP control file and other related files." .IX Subsection "fragmaster control file and other related files." To use the script you have to create two files per graphic: .PP .Vb 2 \& * _fm.eps: the EPS file itself, \& * _fm: a fragmaster control file. .Ve .PP From these files the psfragged graphics will be created: .PP .Vb 2 \& * .eps, \& * .pdf .Ve .PP The \fI_fm\fR control file is basically a LaTeX file (with optionally special comments) and can look like this: .PP .Vb 11 \& % Just an ordinary comment \& % \& % Some special comments: \& % fmclass: book \& % fmclassopt: 11pt \& % fmopt: width=6cm \& % \& % Another special comment: \& % head: \& % \eusepackage{amsmath} \& % end head \& \& % psfrag commands: \& \epsfrag{x}{$x$} \& \epsfrag{y}{$y = x^2$} .Ve .PP Special comment \f(CW\*(C`fmclass:\*(C'\fR will make the script use given class instead of default \f(CW\*(C`article\*(C'\fR class. .PP Special comment \f(CW\*(C`fmclassopt:\*(C'\fR will make the script use given options as class options instead of default \f(CW\*(C`12pt\*(C'\fR. .PP The special comment \f(CW\*(C`fmopt:\*(C'\fR will be evaluated such that the following text will by passed as optional argument to \&\f(CW\*(C`\eincludegraphics\*(C'\fR. This way you can e.g. adjust the relation between graphics size and font size using something like \f(CW\*(C`fmopt: width=6cm\*(C'\fR. No global default for this. .PP The special comment construct \f(CW\*(C`head:/end head\*(C'\fR causes the lines in between to be included in the preamble of the LaTeX temporary document after having the leading comment characters \*(L"%\*(R" stripped off. This way, you can include LaTeX packages, as in \f(CW\*(C`\eusepackage{amsmath}\*(C'\fR. No global default for this. .SS "Per-directory \fBfragmaster\fP dir control file." .IX Subsection "Per-directory fragmaster dir control file." You can set per-directory \f(CW\*(C`fmclass:\*(C'\fR, \f(CW\*(C`fmclassopt:\*(C'\fR, \f(CW\*(C`fmopt:\*(C'\fR and \&\f(CW\*(C`head:/end head\*(C'\fR options by means of a per-directory fragmaster control file \fIfragmaster.dfm\fR with similar syntax as above. You can use another file by means of the \fB\-\-dirfm\fR option. Note that options set this way are mutually exclusive, any option set in per-file \fI_fm\fR file will completely override associated option in per-directory file, and options set in per-directory file will override initial defaults (\f(CW\*(C`\edocumentclass[12pt]{article}\*(C'\fR). Empty options are ignored. .PP This is work in progress and still needs extensive checking. Double-check that modification date based rebuilds are working properly. .SH "KNOWN PROBLEMS" .IX Header "KNOWN PROBLEMS" In case the \s-1EPS\s0 will be produced as landscape graphics, i.e. \fBgv\fR shows \&\fILandscape\fR instead of \fIPortrait\fR in the menu bar, and the graphic will end up turned around 90 degrees in your document, then it is likely that your original \s-1EPS\s0 is wider than it is tall. In this case some (more recent) versions of \fBdvips\fR make the \*(L"smart\*(R" assumption that your graphic is landscape, even though the graphic's proportions don't tell anything about the orientation of its contents... This still can happen in case your input \s-1EPS\s0 matches a standard paper size. .PP Anyway, you can make \fBdvips\fR behave nicer by specifying the following line in \fI/usr/share/texmf/dvips/config/config.pdf\fR (or a local equivalent inside \fI/usr/local/share/texmf\fR): .PP @ custom 0pt 0pt .PP In the likely case that you're wondering why, I'd recommend the \&\fBdvipsk\fR sources warmly to you... .SH "AUTHORS" .IX Header "AUTHORS" Tilman Vogel (dot at dot) and Agustin Martin (at dot) .SH "HISTORY" .IX Header "HISTORY" This script was inspired by a posting from Karsten Roemke (dot at dot) with subject \&\*(L"psfrag pdflatex, lange her\*(R" in de.comp.text.tex on 2003\-11\-11 05:25:44 \s-1PST.\s0 .PP Karsten Roemke was inspired for his solution by postings from Thomas Wimmer. .SH "COPYRIGHT" .IX Header "COPYRIGHT" .Vb 2 \& Copyright (C) 2004 Tilman Vogel \& Copyright (C) 2011\-2015 Agustin Martin .Ve .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.