Silly puzzle, log file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Silly puzzle, log file

MacOSX-TeX mailing list
A few days ago, I posted this silly puzzle:

I'm writing a paper, swing.tex. I drew a nice illustration in Illustrator, swing.eps, converted it with TeXShop to pdf. It is included in the tex file with

\begin{figure}[htb]
\centerline{\includegraphics[scale = .9]{swing}}
\caption{Illustrating a swing}\label{F:swingillustration}
%Figure~\ref{F:swingillustration}
\end{figure}

Cannot typeset the file. Silly puzle: why?

To my surprise, nobody had the obvious answer. So now I am giving it away with the log file:

(/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/mt-euf.cfg) [1{/usr/loc
al/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]Syntax Error: Couldn't read xref table
Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table

Does this help?

George

--
Sent from Postbox

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Ross Moore-3
George,

your image file has the same name as your \jobname ,
that is, the PDF that you are building.

Silly indeed.

On 10/10/2019, at 0:14, "gratzer via MacOSX-TeX" <[hidden email]> wrote:

A few days ago, I posted this silly puzzle:

I'm writing a paper, swing.tex. I drew a nice illustration in Illustrator, swing.eps, converted it with TeXShop to pdf. It is included in the tex file with

\begin{figure}[htb]
\centerline{\includegraphics[scale = .9]{swing}}
\caption{Illustrating a swing}\label{F:swingillustration}
%Figure~\ref{F:swingillustration}
\end{figure}

Cannot typeset the file. Silly puzle: why?

To my surprise, nobody had the obvious answer. So now I am giving it away with the log file:

(/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/mt-euf.cfg) [1{/usr/loc
al/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]Syntax Error: Couldn't read xref table
Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table

Does this help?

George

--
Sent from Postbox

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Herbert Schulz
> On Oct 9, 2019, at 1:22 PM, Ross Moore <[hidden email]> wrote:
>
> George,
>
> your image file has the same name as your \jobname ,
> that is, the PDF that you are building.
>
> Silly indeed.
>
> On 10/10/2019, at 0:14, "gratzer via MacOSX-TeX" <[hidden email]> wrote:
>
>> A few days ago, I posted this silly puzzle:
>>
>> I'm writing a paper, swing.tex. I drew a nice illustration in Illustrator, swing.eps, converted it with TeXShop to pdf. It is included in the tex file with
>>
>> \begin{figure}[htb]
>> \centerline{\includegraphics[scale = .9]{swing}}
>> \caption{Illustrating a swing}\label{F:swingillustration}
>> %Figure~\ref{F:swingillustration}
>> \end{figure}
>>
>> Cannot typeset the file. Silly puzle: why?
>>
>> To my surprise, nobody had the obvious answer. So now I am giving it away with the log file:
>>
>> (/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/mt-euf.cfg) [1{/usr/loc
>> al/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]Syntax Error: Couldn't read xref table
>> Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
>> Syntax Error: Couldn't find trailer dictionary
>> Syntax Error: Couldn't read xref table
>>
>> Does this help?
>>
>> George
>>

Howdy,

Ross, what a perfect solution!!!

An interesting thing is that if swing.eps wasn't converted to swing.pdf directly recent (quite a few years now) pdflatex engines would have automatically converted the .eps file to swing-eps-converted-to.pdf using ghostscript and there would have been no problem. Sometimes habits come back to bite you! :-) I believe one of the solutions to the problem gave this solution but no explanation.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Herbert Schulz
> On Oct 9, 2019, at 2:54 PM, Herbert Schulz <[hidden email]> wrote:
>
>> On Oct 9, 2019, at 1:22 PM, Ross Moore <[hidden email]> wrote:
>>
>> George,
>>
>> your image file has the same name as your \jobname ,
>> that is, the PDF that you are building.
>>
>> Silly indeed.
>>
>> On 10/10/2019, at 0:14, "gratzer via MacOSX-TeX" <[hidden email]> wrote:
>>
>>> A few days ago, I posted this silly puzzle:
>>>
>>> I'm writing a paper, swing.tex. I drew a nice illustration in Illustrator, swing.eps, converted it with TeXShop to pdf. It is included in the tex file with
>>>
>>> \begin{figure}[htb]
>>> \centerline{\includegraphics[scale = .9]{swing}}
>>> \caption{Illustrating a swing}\label{F:swingillustration}
>>> %Figure~\ref{F:swingillustration}
>>> \end{figure}
>>>
>>> Cannot typeset the file. Silly puzle: why?
>>>
>>> To my surprise, nobody had the obvious answer. So now I am giving it away with the log file:
>>>
>>> (/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/mt-euf.cfg) [1{/usr/loc
>>> al/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]Syntax Error: Couldn't read xref table
>>> Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
>>> Syntax Error: Couldn't find trailer dictionary
>>> Syntax Error: Couldn't read xref table
>>>
>>> Does this help?
>>>
>>> George
>>>
>
> Howdy,
>
> Ross, what a perfect solution!!!
>
> An interesting thing is that if swing.eps wasn't converted to swing.pdf directly recent (quite a few years now) pdflatex engines would have automatically converted the .eps file to swing-eps-converted-to.pdf using ghostscript and there would have been no problem. Sometimes habits come back to bite you! :-) I believe one of the solutions to the problem gave this solution but no explanation.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)

Howdy,

Sigh... I just realized that there still would have been a problem if

\includegraphics[scale = .9]{swing}

was used but not if

\includegraphics[scale = .9]{swing.eps}

was used.

PS: I've got my system set up to have the automatic conversion be file.eps->file.pdf so I would have gotten bitten!!! Well, maybe not since I also `prepend' the extension to the list.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Ross Moore-3
Hi Herb,

On 10 Oct 2019, at 7:05 am, Herbert Schulz <[hidden email]> wrote:
> Howdy,
>
> Ross, what a perfect solution!!!
>
> An interesting thing is that if swing.eps wasn't converted to swing.pdf directly recent (quite a few years now) pdflatex engines would have automatically converted the .eps file to swing-eps-converted-to.pdf using ghostscript and there would have been no problem. Sometimes habits come back to bite you! :-) I believe one of the solutions to the problem gave this solution but no explanation.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)

Howdy,

Sigh... I just realized that there still would have been a problem if

\includegraphics[scale = .9]{swing}

There is another possible issue here, related to where the image is stored.
It better not be in the same directory as your main document,
else it will be clobbered by pdfTeX writing out the current job.

Thus you’ll need a  \graphicspath  entry to find its actual directory.



was used but not if

\includegraphics[scale = .9]{swing.eps}

was used.

PS: I've got my system set up to have the automatic conversion be file.eps->file.pdf so I would have gotten bitten!!! Well, maybe not since I also `prepend' the extension to the list.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)



Cheers,

Ross



----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Herbert Schulz
> On Oct 9, 2019, at 3:11 PM, Ross Moore <[hidden email]> wrote:
>
> Hi Herb,
>
>> On 10 Oct 2019, at 7:05 am, Herbert Schulz <[hidden email]> wrote:
>> > Howdy,
>> >
>> > Ross, what a perfect solution!!!
>> >
>> > An interesting thing is that if swing.eps wasn't converted to swing.pdf directly recent (quite a few years now) pdflatex engines would have automatically converted the .eps file to swing-eps-converted-to.pdf using ghostscript and there would have been no problem. Sometimes habits come back to bite you! :-) I believe one of the solutions to the problem gave this solution but no explanation.
>> >
>> > Good Luck,
>> >
>> > Herb Schulz
>> > (herbs at wideopenwest dot com)
>>
>> Howdy,
>>
>> Sigh... I just realized that there still would have been a problem if
>>
>> \includegraphics[scale = .9]{swing}
>
> There is another possible issue here, related to where the image is stored.
> It better not be in the same directory as your main document,
> else it will be clobbered by pdfTeX writing out the current job.
>
> Thus you’ll need a  \graphicspath  entry to find its actual directory.
>
>
>>
>> was used but not if
>>
>> \includegraphics[scale = .9]{swing.eps}
>>
>> was used.
>>
>> PS: I've got my system set up to have the automatic conversion be file.eps->file.pdf so I would have gotten bitten!!! Well, maybe not since I also `prepend' the extension to the list.
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)

Howdy,

Further thinking about it shows that prepending won't fix the problem since the file still gets overwritten.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: Silly puzzle, log file

Ross Moore-3


On 10 Oct 2019, at 7:27 am, Herbert Schulz <[hidden email]> wrote:

>>
>> Sigh... I just realized that there still would have been a problem if
>>
>> \includegraphics[scale = .9]{swing}
>
> There is another possible issue here, related to where the image is stored.
> It better not be in the same directory as your main document,
> else it will be clobbered by pdfTeX writing out the current job.
>
> Thus you’ll need a \graphicspath entry to find its actual directory.

This doesn’t avoid TeX reading the wrong file for the image.
So the only way to have the image and job with the same name 
is to include the directory path; e.g.,

   \includegraphics[scale = .9]{../images/swing}

(with or without the extension).

But then the LaTeX source isn’t as portable as you might like.
You have to make sure that you include that images/ directory
if you move the source elsewhere. 
You probably have to do that anyway.


>>
>> was used but not if
>>
>> \includegraphics[scale = .9]{swing.eps}
>>
>> was used.
>>
>> PS: I've got my system set up to have the automatic conversion be file.eps->file.pdf so I would have gotten bitten!!! Well, maybe not since I also `prepend' the extension to the list.
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)

Howdy,

Further thinking about it shows that prepending won't fix the problem since the file still gets overwritten.


The good thing about this issue is that you only ever make the error *once*.
After that, you’ll remember it forever, and nevermore name your images
and jobs using exactly the same name!



Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

And George, there is a difference between exporting an Illustrator job to  .pdf (or .eps )
and using the original .ai  file.  It's about font inclusion. 
The PDF has them, while the .ai  file has only font names.

This means that if you update your system, or move to another machine without
a font that your document uses, text objects from the .ai  file may no longer show correctly, 
instead using a font substitution.
You can edit the PDF (or .eps) in Illustrator, but you may need to resolve the now missing fonts.


Cheers.

Ross



----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex