[OS X TeX] Re: MacOSX-TeX Digest, Vol 14, Issue 18

Allan Edmonds edmonds at indiana.edu
Thu Dec 18 15:05:51 EST 2008


good. I guess this will be the last tim.

On Dec 18, 2008, at 3:00 PM, macosx-tex-request at email.esm.psu.edu wrote:

> Send MacOSX-TeX mailing list submissions to
> 	macosx-tex at email.esm.psu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> or, via email, send a message with subject or body 'help' to
> 	macosx-tex-request at email.esm.psu.edu
>
> You can reach the person managing the list at
> 	macosx-tex-owner at email.esm.psu.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MacOSX-TeX digest..."
>
>
> Today's Topics:
>
>   1. Re: Skim SKAutoReloadFileUpdate
>      (David B. Thompson, Ph.D., P.E., D.WRE, CFM)
>   2. Re: Parens Matching (George Ghio)
>   3. Re: Parens Matching (George Ghio)
>   4. Re: Parens Matching (Herbert Schulz)
>   5. Re: Parens Matching (M. Tamer Özsu)
>   6. Re: Skim SKAutoReloadFileUpdate (Adam R. Maxwell)
>   7. Re: Skim SKAutoReloadFileUpdate (Adam M. Goldstein)
>   8. Re: Skim SKAutoReloadFileUpdate (Adam R. Maxwell)
>   9. Re: Parens Matching (George Ghio)
>  10. Re: Skim SKAutoReloadFileUpdate (Adam M. Goldstein)
>  11. Re: Skim SKAutoReloadFileUpdate (Adam R. Maxwell)
>  12. Re: Skim SKAutoReloadFileUpdate (Joseph C. Slater PE, PhD)
>  13. Re: Skim SKAutoReloadFileUpdate (Peter Dyballa)
>  14. Re: Skim SKAutoReloadFileUpdate (Joseph C. Slater PE, PhD)
>  15. Re: Skim SKAutoReloadFileUpdate (Adam R. Maxwell)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 17 Dec 2008 13:12:06 -0800
> From: "David B. Thompson, Ph.D., P.E., D.WRE, CFM"
> 	<drdbthompson at gmail.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <3DCD0F59-9380-49EC-8EE6-1C323050EA5B at gmail.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>
>> The Skim wiki says "we don't recommend using this". However, I
>> always click "Auto"  and figure this will do my bidding for me. Is
>> there an explanation for the counter-recommendation? How bad could
>> things get? What bad effects should I be looking for?
>
>
> I've been using the "auto" feature as well and haven't seen anything
> bad (yet).
>
> -=d
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 18 Dec 2008 10:04:30 +1100
> From: George Ghio <gghi at bordernet.com.au>
> Subject: Re: [OS X TeX] Parens Matching
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <38799980-E069-4036-BCA2-7A04E2E2CDBA at bordernet.com.au>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
>
>
> On 17/12/2008, at 11:05 PM, Josep Maria Font wrote:
>
>> El 17/12/2008, a las 12:06, George Ghio escribió:
>>
>>> Very small problem with TeXShop(I hope). Can't seem to get "{}" in
>>> my documents only half the pair when I hit the "{" key. Is this
>>> normal for TeXShop even when the "Parens matching" box is ticked in
>>> Preferences - Document - Editor -Parens Matching?
>>
>> This is not what "parens matching" does. To obtain what you want,
>> you must enable "auto completion" in the same place, and edit the
>> file "autocompletion.plist" in the TeXShop/Keyboard folder, as the
>> one you want is not there. You can do the same for $ $, [ ], ( ),
>> etc. It works like a charm. Look for "Auto Completion" in TeXShop's
>> Help panel (Help menu).
>>
>> BTW, this is not the same as "Comand Completion" either.
>
> Thank you very much. IT does, as you say, work like a charm.
>
> George
>>
>>
>>
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>>
>>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 18 Dec 2008 10:16:02 +1100
> From: George Ghio <gghi at bordernet.com.au>
> Subject: Re: [OS X TeX] Parens Matching
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <8B515C57-85FD-4B83-9D88-3D404E69BF2E at bordernet.com.au>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
>
> Hi Tamer I just added this to my library/texshop/keyboard and it works
>
> <key>$</key>
> <string>$#INS#$</string>
>
> Thanks to Josep.
>
> George
> On 17/12/2008, at 11:36 PM, M. Tamer Özsu wrote:
>
>> Any way to set this up so that when you type $, you get $ $ and the
>> cursor stays in between the two $'s? I can get $ $ following these
>> instructions, but the cursor is placed after the second $.
>>
>> Thanks.
>>
>> --
>> M. Tamer Özsu
>> University of Waterloo
>>
>> On Wed 17-Dec-08, at 7:05 AM, Josep Maria Font wrote:
>>
>>> El 17/12/2008, a las 12:06, George Ghio escribió:
>>>
>>>> Very small problem with TeXShop(I hope). Can't seem to get "{}" in
>>>> my documents only half the pair when I hit the "{" key. Is this
>>>> normal for TeXShop even when the "Parens matching" box is ticked in
>>>> Preferences - Document - Editor -Parens Matching?
>>>
>>> This is not what "parens matching" does. To obtain what you want,
>>> you must enable "auto completion" in the same place, and edit the
>>> file "autocompletion.plist" in the TeXShop/Keyboard folder, as the
>>> one you want is not there. You can do the same for $ $, [ ], ( ),
>>> etc. It works like a charm. Look for "Auto Completion" in TeXShop's
>>> Help panel (Help menu).
>>>
>>> BTW, this is not the same as "Comand Completion" either.
>>
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>>
>>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 17 Dec 2008 17:24:29 -0600
> From: Herbert Schulz <herbs at wideopenwest.com>
> Subject: Re: [OS X TeX] Parens Matching
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <6DB95625-B5F8-469D-B996-FB3FF8DC443E at wideopenwest.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 17, 2008, at 5:16 PM, George Ghio wrote:
>
>> Hi Tamer I just added this to my library/texshop/keyboard and it  
>> works
>>
>> <key>$</key>
>> <string>$#INS#$</string>
>>
>> Thanks to Josep.
>>
>> George
>
>
> Howdy,
>
> I'd still suggest
>
> $#SEL##INS#$
>
> so that if you forget to enter the $'s you can just select the
> expression and press $ to surround it by the $'s. Hope you notice that
> if you escape the $ with a \ (i.e., write \$) the extra $ is NOT
> printed since \$ is a $ sign.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 17 Dec 2008 19:49:04 -0500
> From: "M. Tamer Özsu" <tozsu at sympatico.ca>
> Subject: Re: [OS X TeX] Parens Matching
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <BLU0-SMTP41EDF6CC187EE067F0767BD6F30 at phx.gbl>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Thank you all. This really works like a charm now.
>
> ==Tamer
>
> On Wed 17-Dec-08, at 6:24 PM, Herbert Schulz wrote:
>
>>
>> On Dec 17, 2008, at 5:16 PM, George Ghio wrote:
>>
>>> Hi Tamer I just added this to my library/texshop/keyboard and it
>>> works
>>>
>>> <key>$</key>
>>> <string>$#INS#$</string>
>>>
>>> Thanks to Josep.
>>>
>>> George
>>
>>
>> Howdy,
>>
>> I'd still suggest
>>
>> $#SEL##INS#$
>>
>> so that if you forget to enter the $'s you can just select the
>> expression and press $ to surround it by the $'s. Hope you notice
>> that if you escape the $ with a \ (i.e., write \$) the extra $ is
>> NOT printed since \$ is a $ sign.
>>
>> 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: http://www.esm.psu.edu/mac-tex/list/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 17 Dec 2008 20:37:02 -0800
> From: "Adam R. Maxwell" <amaxwell at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <47F97DAD-A8E3-4B0D-8085-E8D2D3D03D27 at mac.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> On Dec 17, 2008, at 1:12 PM, David B. Thompson, Ph.D., P.E., D.WRE,
> CFM wrote:
>
>>
>> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>>
>>> The Skim wiki says "we don't recommend using this". However, I
>>> always click "Auto"  and figure this will do my bidding for me. Is
>>> there an explanation for the counter-recommendation? How bad could
>>> things get? What bad effects should I be looking for?
>>
>>
>> I've been using the "auto" feature as well and haven't seen anything
>> bad (yet).
>
> Auto-reload for PDF was a mistake, IMNSHO [1].  There's a race
> condition in reloading the file, so you can end up loading it multiple
> times or (worst case) crashing it with invalid PDF.  The only reliable
> way to do this is to set your script(s) to run a "revert" command via
> AppleScript, if and only if your pdftex processes completed.
>
> Only the  script/process calling pdftex has any idea if it succeeded
> or how many runs will be required.  Hence, using revert is more
> efficient and sensible, since you can't read a partially created PDF
> document (as you can with some formats).
>
> -- 
> Adam
>
> [1] http://sourceforge.net/mailarchive/forum.php?thread_name=769A0376-4A14-49E6-A180-15FE27174D33%40cs.ubc.ca&forum_name=skim-app-users
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 2415 bytes
> Desc: not available
> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20081217/a8978272/smime-0001.bin
>
> ------------------------------
>
> Message: 7
> Date: Thu, 18 Dec 2008 01:30:52 -0500
> From: "Adam M. Goldstein" <a.m.goldstein at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <1BC91103-6657-4FA8-BFC4-E7B8F99AA101 at mac.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> On Dec 17, 2008, at 11:37 PM, Adam R. Maxwell wrote:
>
>>
>> On Dec 17, 2008, at 1:12 PM, David B. Thompson, Ph.D., P.E., D.WRE,
>> CFM wrote:
>>
>>>
>>> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>>>
>>>> The Skim wiki says "we don't recommend using this". However, I
>>>> always click "Auto"  and figure this will do my bidding for me. Is
>>>> there an explanation for the counter-recommendation? How bad could
>>>> things get? What bad effects should I be looking for?
>>>
>>>
>>> I've been using the "auto" feature as well and haven't seen
>>> anything bad (yet).
>>
>> Auto-reload for PDF was a mistake, IMNSHO [1].  There's a race
>> condition in reloading the file, so you can end up loading it
>> multiple times or (worst case) crashing it with invalid PDF.  The
>> only reliable way to do this is to set your script(s) to run a
>> "revert" command via AppleScript, if and only if your pdftex
>> processes completed.
>>
>> Only the  script/process calling pdftex has any idea if it succeeded
>> or how many runs will be required.  Hence, using revert is more
>> efficient and sensible, since you can't read a partially created PDF
>> document (as you can with some formats).
>>
>
> I'm confused. Is using "auto" when the dialogue comes up asking about
> it the first time a file changes the same as using the
> SKAutoReloadFileUpdate hidden preference, which is I think what the OP
> asked about?
>
> -Adam
>
> ------------------
> Adam M. Goldstein PhD, MSLIS
> --
> agoldstein at iona.edu
> a.m.goldstein at mac.com
> http://www.iona.edu/faculty/agoldstein
> --
> (914) 637-2717
> --
> Dept of Philosophy
> Iona College
> 715 North Avenue
> New Rochelle NY 10801
>
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 17 Dec 2008 22:41:42 -0800
> From: "Adam R. Maxwell" <amaxwell at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <1F16DCF6-DF4C-4097-AF3C-97E19CF0BA72 at mac.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Dec 17, 2008, at 10:30 PM, Adam M. Goldstein wrote:
>
>> On Dec 17, 2008, at 11:37 PM, Adam R. Maxwell wrote:
>>
>>> On Dec 17, 2008, at 1:12 PM, David B. Thompson, Ph.D., P.E., D.WRE,
>>> CFM wrote:
>>>
>>>> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>>>>
>>>>> The Skim wiki says "we don't recommend using this". However, I
>>>>> always click "Auto"  and figure this will do my bidding for me.
>>>>> Is there an explanation for the counter-recommendation? How bad
>>>>> could things get? What bad effects should I be looking for?
>>>>
>>>>
>>>> I've been using the "auto" feature as well and haven't seen
>>>> anything bad (yet).
>>>
>>> Auto-reload for PDF was a mistake, IMNSHO [1].  There's a race
>>> condition in reloading the file, so you can end up loading it
>>> multiple times or (worst case) crashing it with invalid PDF.  The
>>> only reliable way to do this is to set your script(s) to run a
>>> "revert" command via AppleScript, if and only if your pdftex
>>> processes completed.
>>>
>>> Only the  script/process calling pdftex has any idea if it
>>> succeeded or how many runs will be required.  Hence, using revert
>>> is more efficient and sensible, since you can't read a partially
>>> created PDF document (as you can with some formats).
>>>
>>
>> I'm confused. Is using "auto" when the dialogue comes up asking
>> about it the first time a file changes the same as using the
>> SKAutoReloadFileUpdate hidden preference, which is I think what the
>> OP asked about?
>
> Basically the same thing.  Using the "Auto" button will bypass the
> alert for the current document until it's closed, but setting the
> hidden default will always bypass the alert (if I read the source
> correctly).  My recommendation is to disable the feature entirely so
> Skim does not watch for changes to the file.
>
> -- 
> Adam
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 2415 bytes
> Desc: not available
> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20081217/89e09631/smime-0001.bin
>
> ------------------------------
>
> Message: 9
> Date: Thu, 18 Dec 2008 18:41:53 +1100
> From: George Ghio <gghi at bordernet.com.au>
> Subject: Re: [OS X TeX] Parens Matching
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <DAA67F52-C745-4243-8105-C6BE06C8CF3C at bordernet.com.au>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On 18/12/2008, at 10:24 AM, Herbert Schulz wrote:
>
>>
>> On Dec 17, 2008, at 5:16 PM, George Ghio wrote:
>>
>>> Hi Tamer I just added this to my library/texshop/keyboard and it
>>> works
>>>
>>> <key>$</key>
>>> <string>$#INS#$</string>
>>>
>>> Thanks to Josep.
>>>
>>> George
>>
>>
>> Howdy,
>>
>> I'd still suggest
>>
>> $#SEL##INS#$
>>
>> so that if you forget to enter the $'s you can just select the
>> expression and press $ to surround it by the $'s. Hope you notice
>> that if you escape the $ with a \ (i.e., write \$) the extra $ is
>> NOT printed since \$ is a $ sign.
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>>
>
> Hi Herb. Yes, much better solution.
>
> George
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>>
>
>
>
> ------------------------------
>
> Message: 10
> Date: Thu, 18 Dec 2008 09:20:31 -0500
> From: "Adam M. Goldstein" <a.m.goldstein at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <A4DB22FD-B361-457E-BB7D-2E093F65CCC2 at mac.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 18, 2008, at 1:41 AM, Adam R. Maxwell wrote:
>
>> On Dec 17, 2008, at 10:30 PM, Adam M. Goldstein wrote:
>>
>>> On Dec 17, 2008, at 11:37 PM, Adam R. Maxwell wrote:
>>>
>>>> On Dec 17, 2008, at 1:12 PM, David B. Thompson, Ph.D., P.E.,
>>>> D.WRE, CFM wrote:
>>>>
>>>>> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>>>>>
>>>>>> The Skim wiki says "we don't recommend using this". However, I
>>>>>> always click "Auto"  and figure this will do my bidding for me.
>>>>>> Is there an explanation for the counter-recommendation? How bad
>>>>>> could things get? What bad effects should I be looking for?
>>>>>
>>>>>
>>>>> I've been using the "auto" feature as well and haven't seen
>>>>> anything bad (yet).
>>>>
>>>> Auto-reload for PDF was a mistake, IMNSHO [1].  There's a race
>>>> condition in reloading the file, so you can end up loading it
>>>> multiple times or (worst case) crashing it with invalid PDF.  The
>>>> only reliable way to do this is to set your script(s) to run a
>>>> "revert" command via AppleScript, if and only if your pdftex
>>>> processes completed.
>>>>
>>>> Only the  script/process calling pdftex has any idea if it
>>>> succeeded or how many runs will be required.  Hence, using revert
>>>> is more efficient and sensible, since you can't read a partially
>>>> created PDF document (as you can with some formats).
>>>>
>>>
>>> I'm confused. Is using "auto" when the dialogue comes up asking
>>> about it the first time a file changes the same as using the
>>> SKAutoReloadFileUpdate hidden preference, which is I think what the
>>> OP asked about?
>>
>> Basically the same thing.  Using the "Auto" button will bypass the
>> alert for the current document until it's closed, but setting the
>> hidden default will always bypass the alert (if I read the source
>> correctly).  My recommendation is to disable the feature entirely so
>> Skim does not watch for changes to the file.
>
>
>
> OK, another question---how is what TeXShop does any different, and is
> there a difference between using it as an "external viewer" or as the
> source editor and viewer? If the TS user pushes "typeset," does this
> provide the PDF viewer with information about when the typesetting
> process begins and so the viewer can wait to reload until it's ready?
> But then if I use (say) emacs as my editor and TeXShop as a viewer,
> presumably the TeXShop PDF viewer doesn't have the information.
>
> I have never had a problem with either the TS viewer or Skim in the
> reloading department.
>
> -Adam G.
> ------------------
> Adam M. Goldstein PhD, MSLIS
> --
> agoldstein at iona.edu
> a.m.goldstein at mac.com
> http://www.iona.edu/faculty/agoldstein
> --
> (914) 637-2717
> --
> Dept of Philosophy
> Iona College
> 715 North Avenue
> New Rochelle NY 10801
>
>
>
> ------------------------------
>
> Message: 11
> Date: Thu, 18 Dec 2008 07:30:05 -0800
> From: "Adam R. Maxwell" <amaxwell at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <6D042CF4-7C03-4F50-9EE0-6C599C6EC2C9 at mac.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Dec 18, 2008, at 6:20 AM, Adam M. Goldstein wrote:
>> OK, another question---how is what TeXShop does any different, and
>> is there a difference between using it as an "external viewer" or as
>> the source editor and viewer?
>
> Yes, there is a difference.
>
>> If the TS user pushes "typeset," does this provide the PDF viewer
>> with information about when the typesetting process begins and so
>> the viewer can wait to reload until it's ready?
>
> TS runs an external process to typeset your document, so it knows when
> that call is finished, and when it should open/reload the PDF.
>
> TextMate uses a similar approach, since it launches the TeX process
> (es) on your behalf.  If that succeeds, it tells Skim (using Python):
>
> os.system("/usr/bin/osascript -e " + """'tell application "Skim" to
> revert (documents whose path is %s)' """%pdfPath)
>
> ...and does something similar for other viewers.  This is trivial with
> a shell script or makefile approach.
>
>> But then if I use (say) emacs as my editor and TeXShop as a viewer,
>> presumably the TeXShop PDF viewer doesn't have the information.
>
> Correct.  I just looked at the TS source, and TS evidently uses a one
> second timer to poll for changes, then attempts to load the file when
> it might be done.  Skim uses a kqueue to get notified that a file has
> changed, then reads the last few bytes of the PDF to see if it has a
> trailer yet (Mike McCracken's suggestion in the thread I linked to
> earlier).
>
>> I have never had a problem with either the TS viewer or Skim in the
>> reloading department.
>
>
> Ever seen Skim reload the PDF twice during a pdflatex/bibtex/pdflatex/
> pdflatex sequence?  That's the performance side of the problem, since
> it's not cheap to reload.  Whether it's a problem in other respects
> will depend on the speed of your machine and size of your document;
> there is still a window for the race condition, but it's smaller (so
> it'll possibly "work" most of the time, but there's no guarantee).
>
> I believe that it's a design flaw to have this feature in a PDF
> viewer, plain and simple, and people's expectations are based on other
> formats.  IIRC DVI and PostScript can be read/displayed as the file is
> being created, whereas PDF needs the entire file written to disk
> beforehand.
>
> -- 
> Adam
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 2415 bytes
> Desc: not available
> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20081218/af1b3e7c/smime-0001.bin
>
> ------------------------------
>
> Message: 12
> Date: Thu, 18 Dec 2008 10:39:32 -0500
> From: "Joseph C. Slater PE, PhD" <joseph.slater at wright.edu>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <137E3416-DD43-481A-A580-08A5C94359E6 at wright.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 17, 2008, at 11:37 PM, Adam R. Maxwell wrote:
>
>>
>> On Dec 17, 2008, at 1:12 PM, David B. Thompson, Ph.D., P.E., D.WRE,
>> CFM wrote:
>>
>>>
>>> On Dec 17, 2008, at 10:53, Joseph C. Slater PE, PhD wrote:
>>>
>>>> The Skim wiki says "we don't recommend using this". However, I
>>>> always click "Auto"  and figure this will do my bidding for me. Is
>>>> there an explanation for the counter-recommendation? How bad could
>>>> things get? What bad effects should I be looking for?
>>>
>>>
>>> I've been using the "auto" feature as well and haven't seen
>>> anything bad (yet).
>>
>> Auto-reload for PDF was a mistake, IMNSHO [1].  There's a race
>> condition in reloading the file, so you can end up loading it
>> multiple times or (worst case) crashing it with invalid PDF.  The
>> only reliable way to do this is to set your script(s) to run a
>> "revert" command via AppleScript, if and only if your pdftex
>> processes completed.
>>
>> Only the  script/process calling pdftex has any idea if it succeeded
>> or how many runs will be required.  Hence, using revert is more
>> efficient and sensible, since you can't read a partially created PDF
>> document (as you can with some formats).
>
> OK. I see your point (I read the thread). As a practical matter,
> however, I've never encountered this. If the worst that's going to
> happen is Skim crashes once in a while, I can handle that. The
> convenience more than offsets it.
>
> It seems to me that AUCTEX should be able to call a script that
> compiles, waits for results, then forces a refresh in Skim (which is
> the method you're advocating), but baring user (capable user)
> frustration, I doubt it's going to happen. I don't have the skill set,
> unfortunately (contrary to popular opinion). At least not without a
> Herculean effort.
>
> Joe
>
>
> ------------------------------
>
> Message: 13
> Date: Thu, 18 Dec 2008 16:40:52 +0100
> From: Peter Dyballa <Peter_Dyballa at Web.DE>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <592164BC-4330-4053-88A5-90C79930573A at Web.DE>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> Am 18.12.2008 um 15:20 schrieb Adam M. Goldstein:
>
>> But then if I use (say) emacs as my editor and TeXShop as a viewer,
>> presumably the TeXShop PDF viewer doesn't have the information.
>
>
> I am using GNU Emacs as editor and TeXShop as viewer. No sync or
> whatever is sent to TeXShop. The problem I can see is that TeXShop
> writes into the Console that it misses something:
>
> 	warning: CMapName specified but not defined.
>
> IMO it's not necessary to mention this. It can happen when a file
> changes and before this action has finished it is already re-read.
>
> --
> Greetings
>
>   Pete
>
> Eternity is a terrible thought. I mean, where's it going to end?
> 				- Tom Stoppard
>
>
>
>
>
> ------------------------------
>
> Message: 14
> Date: Thu, 18 Dec 2008 10:42:44 -0500
> From: "Joseph C. Slater PE, PhD" <joseph.slater at wright.edu>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <A8639980-1FE4-4D53-A064-DE1BC8697F1C at wright.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Dec 18, 2008, at 10:30 AM, Adam R. Maxwell wrote:
>
>> On Dec 18, 2008, at 6:20 AM, Adam M. Goldstein wrote:
>>> OK, another question---how is what TeXShop does any different, and
>>> is there a difference between using it as an "external viewer" or
>>> as the source editor and viewer?
>>
>> Yes, there is a difference.
>>
>>> If the TS user pushes "typeset," does this provide the PDF viewer
>>> with information about when the typesetting process begins and so
>>> the viewer can wait to reload until it's ready?
>>
>> TS runs an external process to typeset your document, so it knows
>> when that call is finished, and when it should open/reload the PDF.
>>
>> TextMate uses a similar approach, since it launches the TeX
>> process(es) on your behalf.  If that succeeds, it tells Skim (using
>> Python):
>>
>> os.system("/usr/bin/osascript -e " + """'tell application "Skim" to
>> revert (documents whose path is %s)' """%pdfPath)
>>
>> ...and does something similar for other viewers.  This is trivial
>> with a shell script or makefile approach.
>>
>>>
> <snip>
> How does it know the process succeeded, though? (20 more questions and
> I'll have enough knowledge to solve the issue in emacs!).
>
> Joe
>
>
> ------------------------------
>
> Message: 15
> Date: Thu, 18 Dec 2008 08:09:34 -0800
> From: "Adam R. Maxwell" <amaxwell at mac.com>
> Subject: Re: [OS X TeX] Skim SKAutoReloadFileUpdate
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <DA4F506D-E987-4D13-9DA9-F580EB886AD0 at mac.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> On Dec 18, 2008, at 7:42 AM, Joseph C. Slater PE, PhD wrote:
>
>>
>> On Dec 18, 2008, at 10:30 AM, Adam R. Maxwell wrote:
>>
>>> On Dec 18, 2008, at 6:20 AM, Adam M. Goldstein wrote:
>>>> OK, another question---how is what TeXShop does any different, and
>>>> is there a difference between using it as an "external viewer" or
>>>> as the source editor and viewer?
>>>
>>> Yes, there is a difference.
>>>
>>>> If the TS user pushes "typeset," does this provide the PDF viewer
>>>> with information about when the typesetting process begins and so
>>>> the viewer can wait to reload until it's ready?
>>>
>>> TS runs an external process to typeset your document, so it knows
>>> when that call is finished, and when it should open/reload the PDF.
>>>
>>> TextMate uses a similar approach, since it launches the TeX process
>>> (es) on your behalf.  If that succeeds, it tells Skim (using  
>>> Python):
>>>
>>> os.system("/usr/bin/osascript -e " + """'tell application "Skim" to
>>> revert (documents whose path is %s)' """%pdfPath)
>>>
>>> ...and does something similar for other viewers.  This is trivial
>>> with a shell script or makefile approach.
>>>
>>>>
>> <snip>
>> How does it know the process succeeded, though? (20 more questions
>> and I'll have enough knowledge to solve the issue in emacs!).
>
> Depends on how clever you want to be :).  The trivial way is to test
> the exit value of the process and see if it's zero (success) or
> anything else (failure).  Practically, you probably wouldn't like
> that, since TeX returns nonzero pretty frequently, even though it
> created a usable PDF.  You could count the number of error: lines it
> spits out, but that might get hairy.
>
> The easiest solution is probably a compromise: wait until all of your
> tex/bibtex/index processes are done, then try to reload the file.
> That eliminates the race condition, so you're left with potentially
> trying to open a garbage file.
>
> -- 
> Adam
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 2415 bytes
> Desc: not available
> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20081218/a83863b8/smime-0001.bin
>
> ------------------------------
>
>
> -------------------------- Helpful Info --------------------------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>
>
>
> End of MacOSX-TeX Digest, Vol 14, Issue 18
> ******************************************




More information about the MacOSX-TeX mailing list