<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 13, 2014 at 8:08 AM, Herbert Schulz <span dir="ltr"><<a href="mailto:herbs@wideopenwest.com" target="_blank">herbs@wideopenwest.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div><br>
On Jan 12, 2014, at 1:35 PM, Don Green Dragon <fergdc@Shaw.ca> wrote:<br>
<br>
> Hello Everyone,<br>
><br>
> May the year 2014 bring good fortune and peace to you all. Also, many thanks to the people on this list who are so incredibly helpful in giving their time to answer and solve such a variety of questions, and who continue to keep TeX running on the various platforms.<br>
><br>
> This may be addressed to the wrong mailing list, but at this point I do not have a mail connection with the tikz people.<br>
><br>
> I began using tikz drawing program recently in order to create simple vector drawings for the document I’m working on. I created four drawings and was quite pleased with their appearance on the Preview page. Everything was precisely as I wanted. Then the relevant pages were printed to see what the drawings looked like on paper. The disappointment was that of the four, only one was true to what I saw in the Preview. The `errors’ — from my point of view — are small but clearly visible and the resulting drawing is useless.<br>
><br>
> I’m using TeXShop 3.26 running under Mavericks 10.9.1<br>
><br>
> The following lines of code produce the `correct’ drawing when viewed on the Preview page.<br>
><br>
> \documentclass [11pt, fleqn, leqno] {book}<br>
> \usepackage{graphicx}<br>
> \usepackage{epstopdf}<br>
> % Introduce TikZ package for math drawings<br>
> \usepackage{tikz}<br>
><br>
> \begin{document}<br>
><br>
> \begin{figure}[htbp] % Figure 1.4<br>
> \begin{tikzpicture}<br>
> \draw (-0.5, 0) -- (7.5,0) ; % horiz segment<br>
> \filldraw (0,0) circle (2pt) node[anchor=north east] {A}; % label point (0,0) as A<br>
> \filldraw (7,0) circle (2pt) node[anchor=north west] {B}; % label point (7,0) as B<br>
> \draw [dotted] (0,0) -- (50:9);<br>
> \filldraw (50:9) circle (2pt) node [anchor= north west] {$C$}; % draw diagonal segment<br>
> \foreach \i in {1,...,7} % place dots along diagonal<br>
> \filldraw (50:\i) circle (2pt) node [anchor=south east] {\i};<br>
> \draw [dashed] (7,0) -- (50:7); % draw segment from 7 to B<br>
> % draw lines through 1, 2,..., 6 parallel to line from 7 to B<br>
> \foreach \m in {1,...,6}<br>
> \draw (50:\m) -- (\m, 0);<br>
> \foreach \t in {1,...,6} % label the points n/7<br>
> \filldraw [red] (\t,0) circle (2pt) node [below] {\t/7};<br>
> % describe construction process<br>
> \draw [xshift=6.8cm, yshift=5cm]<br>
> node[right, text width = 7.5cm,fill=green!20]<br>
> {The points are constructed as follows:\\<br>
> \hspace*{9pt}First the segment $A$ to $B$ is drawn so that the distance from $A$ to $B$ is 1 unit<br>
> of length. Next construct the diagonal segment from $A$ to $C$ which we will denote by<br>
> $\mathcal{S}$. Then along $\mathcal{S}$ construct the points labelled $1,\dots,7$ so that if $d$ is<br>
> the distant from $A$ to 1, then the distance from $n$ to $n+1$ is also $d$ --- use compass!\\<br>
> \hspace*{9pt}Now the dashed segment from 7 to $B$, call it $\mathcal{T}$. Finally, construct a<br>
> line through point $n$ (= 1, 2, \dots, 6) which is parallel to $\mathcal{T}$. The resulting line<br>
> intersects the segment from $A$ to $B$ at a point representing the fraction $n/7$. So $A$ is 0/7<br>
> and $B$ is 7/7.\\<br>
> \hspace*{9pt}The Greeks were capable of carrying out the constructions above using only a straight<br>
> edge (not a ruler) and a compass.<br>
> };<br>
> \end{tikzpicture}<br>
> \caption{Construction of Fraction n/7 for n = 1, 2, 3, 4, 5, 6} \label{fig1d}<br>
> \end{figure}<br>
><br>
> \end{document}<br>
><br>
> Furthermore, when the Preview page is printed ''from the above skeleton'', the printout is correct. BUT when I print the document page on which this figure occurs using my FULL preamble an error occurs. The code line that does not print properly is<br>
><br>
> \foreach \t in {1,...,6} % label the points n/7<br>
> \filldraw [red] (\t,0) circle (2pt) node [below] {\t/7};<br>
><br>
> which is supposed to print six small red dots (i.e., filled circles) and label them 1/7 2/7 … 6/7<br>
><br>
> The red dots appear but are misaligned. On one printout, there were translated right about 2 mm and up maybe 0.5 mm. On another printout, the red dots were translated left and down.<br>
><br>
> So something in my preamble is interfering, or so it seems, with Tikz but I have not a clue where the conflict might occur.<br>
><br>
> Any suggestions?<br>
><br>
> don green dragon<br>
> <a href="mailto:fergdc@shaw.ca" target="_blank">fergdc@shaw.ca</a><br>
<br>
</div></div>Howdy,<br>
<br>
It might be helpful if you let us know what else you are including/doing in your preamble when things go bad.<br>
<br>
PS: Assuming you have a reasonably recent TeX Live there is no need to use the epstopdf package; it's already included by the graphicx package. Not only htat you also need not use the -shell-escape flag since grapohicx will use a restricted (i.e., safe) version of epstopdf automatically.<br>
<br>
Good Luck,<br>
<br>
Herb Schulz<br>
(herbs at wideopenwest dot com)<br>
<div><div><br>
<br>
<br>
<br>
----------- Please Consult the Following Before Posting -----------<br>
TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank">http://www.tex.ac.uk/faq</a><br>
List Reminders and Etiquette: <a href="http://email.esm.psu.edu/mac-tex/" target="_blank">http://email.esm.psu.edu/mac-tex/</a><br>
List Archive: <a href="http://tug.org/pipermail/macostex-archives/" target="_blank">http://tug.org/pipermail/macostex-archives/</a><br>
TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/" target="_blank">http://mactex-wiki.tug.org/</a><br>
List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br>
</div></div></blockquote></div><br><br><br><br><br><div><div>I think this is a good question for <a href="http://tex.stackexchange.com" target="_blank">tex.stackexchange.com</a>
. You will, as Herbert said, need to say what you include in the full
preample, because without that it is hard to guess what the problem
might be. <br>
<br></div>One way to solve the problem, though possibly not what you are
after, is to create a pdf of the figure first and include this compiled
pdf as a figure in your document. You can do this with the standalone
package, code below. When you insert the compiled pdf figure in your
document, you need the <br>
<br>\begin{figure} <br></div>\includegraphics{figure}<br><div>\caption{} <br>\end{figure}<br><br><br><br></div><div>Here is the code for the figure to be compiled separately.<br></div><br><br>\documentclass{standalone}<br>
<br>\usepackage{tikz}<br>\begin{document}<br><br>\begin{tikzpicture}<br> \draw (-0.5, 0) -- (7.5,0) ; % horiz segment<br> \filldraw (0,0) circle (2pt) node[anchor=north east] {A}; % label point (0,0) as A<br> \filldraw (7,0) circle (2pt) node[anchor=north west] {B}; % label point (7,0) as B<br>
\draw [dotted] (0,0) -- (50:9);<br> \filldraw (50:9) circle (2pt) node [anchor= north west] {$C$}; % draw diagonal segment<br> \foreach \i in {1,...,7} % place dots along diagonal<br> \filldraw (50:\i) circle (2pt) node [anchor=south east] {\i};<br>
\draw [dashed] (7,0) -- (50:7); % draw segment from 7 to B<br> % draw lines through 1, 2,..., 6 parallel to line from 7 to B<br> \foreach \m in {1,...,6}<br> \draw (50:\m) -- (\m, 0);<br> \foreach \t in {1,...,6} % label the points n/7<br>
\filldraw [red] (\t,0) circle (2pt) node [below] {\t/7};<br> % describe construction process<br> \draw [xshift=6.8cm, yshift=5cm]<br> node[right, text width = 7.5cm,fill=green!20]<br> {The points are constructed as follows:\\<br>
\hspace*{9pt}First the segment $A$ to $B$ is drawn so that the distance from $A$ to $B$ is 1 unit<br> of length. Next construct the diagonal segment from $A$ to $C$ which we will denote by<br> $\mathcal{S}$. Then along $\mathcal{S}$ construct the points labelled $1,\dots,7$ so that if $d$ is<br>
the distant from $A$ to 1, then the distance from $n$ to $n+1$ is also $d$ --- use compass!\\<br> \hspace*{9pt}Now the dashed segment from 7 to $B$, call it $\mathcal{T}$. Finally, construct a<br> line through point $n$ (= 1, 2, \dots, 6) which is parallel to $\mathcal{T}$. The resulting line<br>
intersects the segment from $A$ to $B$ at a point representing the fraction $n/7$. So $A$ is 0/7<br> and $B$ is 7/7.\\<br> \hspace*{9pt}The Greeks were capable of carrying out the constructions above using only a straight<br>
edge (not a ruler) and a compass.<br> };<br>\end{tikzpicture}<br><br>\end{document}<br><br></div></div>