Please - this is a whole day of my previous life down the drain...

As requested generally, working example included (except for the absence of the eps file, which I shall try to attach...zipped)
I posted elsewhere here that I couldn't get "Wingdings 2" into my document, but I only needed one character so I have created it as an EPS file (at various sizes)
Now however, I can't get it to place/space properly. Code below gives 5 examples. \stargraphicC provides the best result I've got (also attached)
Question: how do I box, or place or anything to get the graphic to occupy a specifiable height in pts so that if, e.g. \baselineskip is 12pt, then including the 36 point image is exactly equivalent to three lines...
As a subsidiary question, since I pass a number and many things expect units, as asked within the code below, how do I add/subtract/multiply/divide in units?
Thanks!
Code: Select all
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[mediumvopaper,twoside,openright,showtrims,10pt]{memoir}
\usepackage{xltxtra,fontspec,xunicode}
\usepackage{ellipsis} % better ellipsis with \dots, \textellipsis
\usepackage{wrapfig}
\settrimmedsize{22.46cm}{14.41cm}{*}
\setulmarginsandblock{100pt}{1in}{*}
\setlrmarginsandblock{44pt}{50pt}{*}
\setheaderspaces{36pt}{*}{*} % Dropheight Headsep Ratio
\checkandfixthelayout
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\makechapterstyle{mythChap}{%
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchaptertitle}[1]{\centering\chaptitlefont ##1}
}
\newcommand{\stargraphicA}[1]{ % graphic is between lines 1 & 2 of "The quick brown fox..."
\begin{figure}[htbp]
\centering
\includegraphics[height=#1pt]{WingDing#1.eps}
\end{figure}
}
% wrapfigure seems to take vertical spacing in LINES, so need to scale pts by \baselineskip
% this version attempts to take the parameter (which is the number of points) and to
\newcommand{\stargraphicB}[1]{ % graphic overwrites lines 2-4 of "The quick brown fox..."
\begin{wrapfigure}[#1/\baselineskip]{r}{\textwidth}
\centering
\includegraphics[height=#1pt]{WingDing#1.eps}
\end{wrapfigure}
}
\newcommand{\stargraphicC}[1]{ % graphic appears "in line" but whilst spacing above is good, the
% spacing is too large below...
% Show left so line spacing is clearer...
\makebox[\textwidth][l]{
\includegraphics*[height=#1pt]{WingDing#1.eps}
}
}
% in these cases, how can I multiply the parameter value... what's the syntax... "Illegal unit of measure"
% whatever combination I seem to try
\newcommand{\stargraphicD}[1]{ % doesn't work - no image visible - whether I use #1 or #1pt as a value
% Try adjusting the bounding box...
% bb (bounding box parameter order is Lower Left X, Lower Left Y, Upper R X, Upper R Y
\makebox[\textwidth][l]{
\includegraphics*[bb = 0 0 #1pt #1pt]{WingDing#1.eps}
}
}
\newcommand{\stargraphicE}[1]{ % doesn't work - no image visible - whether I use #1 or #1pt as a value
% Try adjusting the bounding box...
% bb (bounding box parameter order is Lower Left X, Lower Left Y, Upper R X, Upper R Y
\makebox[\textwidth][l]{
\includegraphics*[viewport = 0 0 #1 #1pt]{WingDing#1.eps}
}
}
\begin{document}
\chapterstyle{mythChap}
\chapter{Fred}
Now is the winter of our discontent made glorious summer by this son of York.
\newline
\stargraphicC{36}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{document}