[OS X TeX] A tikzpic problem
Don Green Dragon
fergdc at Shaw.ca
Tue Jan 14 20:59:53 EST 2014
Hi Herb,
Please see below:
On 12Jan2014, at 2:08 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>
> On Jan 12, 2014, at 1:35 PM, Don Green Dragon <fergdc at Shaw.ca> wrote:
>
>> Hello Everyone,
>>
>> 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.
>>
>> This may be addressed to the wrong mailing list, but at this point I do not have a mail connection with the tikz people.
>>
>> 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.
>>
>> I’m using TeXShop 3.26 running under Mavericks 10.9.1
>>
>> The following lines of code produce the `correct’ drawing when viewed on the Preview page.
>>
>> \documentclass [11pt, fleqn, leqno] {book}
>> \usepackage{graphicx}
>> \usepackage{epstopdf}
>> % Introduce TikZ package for math drawings
>> \usepackage{tikz}
>>
>> \begin{document}
>>
>> \begin{figure}[htbp] % Figure 1.4
>> \begin{tikzpicture}
>> \draw (-0.5, 0) -- (7.5,0) ; % horiz segment
>> \filldraw (0,0) circle (2pt) node[anchor=north east] {A}; % label point (0,0) as A
>> \filldraw (7,0) circle (2pt) node[anchor=north west] {B}; % label point (7,0) as B
>> \draw [dotted] (0,0) -- (50:9);
>> \filldraw (50:9) circle (2pt) node [anchor= north west] {$C$}; % draw diagonal segment
>> \foreach \i in {1,...,7} % place dots along diagonal
>> \filldraw (50:\i) circle (2pt) node [anchor=south east] {\i};
>> \draw [dashed] (7,0) -- (50:7); % draw segment from 7 to B
>> % draw lines through 1, 2,..., 6 parallel to line from 7 to B
>> \foreach \m in {1,...,6}
>> \draw (50:\m) -- (\m, 0);
>> \foreach \t in {1,...,6} % label the points n/7
>> \filldraw [red] (\t,0) circle (2pt) node [below] {\t/7};
>> % describe construction process
>> \draw [xshift=6.8cm, yshift=5cm]
>> node[right, text width = 7.5cm,fill=green!20]
>> {The points are constructed as follows:\\
>> \hspace*{9pt}First the segment $A$ to $B$ is drawn so that the distance from $A$ to $B$ is 1 unit
>> of length. Next construct the diagonal segment from $A$ to $C$ which we will denote by
>> $\mathcal{S}$. Then along $\mathcal{S}$ construct the points labelled $1,\dots,7$ so that if $d$ is
>> the distant from $A$ to 1, then the distance from $n$ to $n+1$ is also $d$ --- use compass!\\
>> \hspace*{9pt}Now the dashed segment from 7 to $B$, call it $\mathcal{T}$. Finally, construct a
>> line through point $n$ (= 1, 2, \dots, 6) which is parallel to $\mathcal{T}$. The resulting line
>> intersects the segment from $A$ to $B$ at a point representing the fraction $n/7$. So $A$ is 0/7
>> and $B$ is 7/7.\\
>> \hspace*{9pt}The Greeks were capable of carrying out the constructions above using only a straight
>> edge (not a ruler) and a compass.
>> };
>> \end{tikzpicture}
>> \caption{Construction of Fraction n/7 for n = 1, 2, 3, 4, 5, 6} \label{fig1d}
>> \end{figure}
>>
>> \end{document}
>>
>> 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
>>
>> \foreach \t in {1,...,6} % label the points n/7
>> \filldraw [red] (\t,0) circle (2pt) node [below] {\t/7};
>>
>> which is supposed to print six small red dots (i.e., filled circles) and label them 1/7 2/7 … 6/7
>>
>> 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.
>>
>> So something in my preamble is interfering, or so it seems, with Tikz but I have not a clue where the conflict might occur.
>>
>> Any suggestions?
>>
>> don green dragon
>> fergdc at shaw.ca
>
> Howdy,
>
> It might be helpful if you let us know what else you are including/doing in your preamble when things go bad.
Okay, as suggested by Luis Sequeira, I’ve attached a source file <AxioCalcRootCopy.tex> which when typeset here produces a Preview page showing NO errors. Alignment is perfect even when examined with Preview’s magnifying lens. On printing, misalignment of the two horizontal segments and red dot at (0,0) are clear. The example attached is simpler that the code above, but reveals just as well my complaint when printed here on an HP color Laserjet 2605dn.
Could it be that the laser jet’s settings are off? I don’t think so because when a graphic, created by Inkscape as a .pdf file, is printed, there are no misalignments that I can see on print. Mind you, I’m not convinced the comparison is relevant because the Inkscape graphic is not similar in terms of points, segments, . . .
I’ve checked a few things that I 'imagined’ might interfere:
(1) David Carlisle’s {showkeys} is not the culprit when employed as:
\usepackage[nocite]{showkeys}
(2) The fact that my example is embedded in a \begin{table}. . . \end{table} structure does not cause the misprint. Removing the table environment does not remove the misalignment.
In the comments in <AxioCalcRootCopy.tex>, it is stated which parts of my preamble have NOT been included, since without them the errors on printout remain.
> 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.
Thanks for that information. I’ve commented out the epstopdf package and that does not seem to change anything.
My version of TeX Live Utility is 1.17.
Thank you for helping people with problems from hither to yon.
don green dragon
fergdc at shaw.ca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AxioCalcRootCopy.tex
Type: application/octet-stream
Size: 7792 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20140114/bca31eaf/attachment.obj>
More information about the MacOSX-TeX
mailing list