[OS X TeX] some questions on Texshop
Per Ting
perting at gmail.com
Thu Dec 31 20:00:37 CET 2009
Herb,
Thanks for your help. Now everything works fine except the sync which is sometimes OK and sometimes off. I could not find Open Selection macro and would appreciate if you would send it to me. Some more questions (for one who has immigrated from Winedt+Miktex)
1-I had set up winedt such that double clicking on a an .eps or .pdf graphics file in the latex source would open it in ghostview or pdf viewer, is this possible in texshop?
2-How can I view a list of my labels, refs, cites, etc? In winedt there is a Gather window that allows access to all these. I tried "tag" in texshop but it does not contain anything (I am opening it from the root file of a 700 book with many cites and labels).
4-Is tab viewing possible in texshop? That is, clicking on tabs to view different source files rather than minimizing each window.
5-Is is possible to view a project tree in a window?
6-How can I start Bibdesk from texshop so that it automatically loads the bibliography file(s) in the source file. How can I import \cite from Bibdesk to texshop? Is it possible to set texshop is such a way that when I type \cite{} it starts bibdesk, loads the right bib file and clicking on the selected entry in bibdes fills the bracket in the \cite command? Is a similar action with jabref possible?
7-In winedt it is possible to select part of the latex source file and process just the selected part and view the pdf (or dvi, or ps) file. The program generates a temp file, imports the preamble from the root file, adds the selection and processes the resulting temp file and opens the pdf file. This is very handy in many cases. Is such a thing possible in texshop?
Thanks again for your help!
On Dec 29, 2009, at 6:13 AM, Herbert Schulz wrote:
>
> On Dec 29, 2009, at 1:05 AM, Per Ting wrote:
>
>>
>> I have recently started using Texshop (2.29 with TL09). I am working on a book with many chapters used with \input on the root file. I have the following problems/questions.
>>
>> 1-I use .eps, psfrag, and pstricks in my file. The preferred method should be using dvi-ps-pdf path. I have followed the instructions for using latexmk (and pst-pdfmk), copied the necessary files into the ~/Library/Texshop/bin and adde % !TEX TS-program=latexmk to my root file, but typesetting does not invoke bibtex and makeindex and goes staring to generate p.s. and pdf file. I expect first dvi file be generated then bibtex bad makeindex be run, then another round of latex and finally dvips and pstopdf. Another indication of a problem is that although after moving the files I have closed and reopened teashop, latexmk and pst-pdfmk are not in the drop down menu of the source file.
>>
>
> Howdy,
>
> If you are using .eps, psfrag and pstricks in your file using latex->dvips->ps2pdf is definitely the way to go. You say you moved the ``necessary files to ~/Library/TeXShop/bin/'' can you tell me what files you moved there and where they came from? The necessary files in that directory should already be there and you should be moving .engine files from ~/Library/TeXShop/Engines/Inactive/Latexmk/ two directory up to ~/Library/TeXShop/Engines/. These are the engine files used by TeXShop. When you restart TeXShop they should show up in the pop-up menu in the Source and Preview toolbars. Finally, the line you want at the top of the file is
>
> % !TEX TS-program = latexmk
>
> with the space on either side of the `=' sign. While other spaces don't seem to matter those seem to be important.
>
>> 2-When I run latex and bibtex and makeindex and latex again manually I get the the desired result but sync between source and pdf does not work precisely. Direct sync (from source to pdf) works OK but inverse sync is off by a couple of paragraphs or even more. Interestingly enough, if I run the sequence in Texworks and then load the source into texshp, sync works alright! Also if instead of dvi-ps-pdf path I use pdflatex and include auto-pst-pdf, sync works OK.
>>
>
> Make sure that you have TeXShop->Preferences->Typesetting->Sync Method set to SyncTeX. My experience is that TeXworks will get to the right paragraph (unless you use hard wrapping within paragraphs---I use soft wrapping) and that's all while TeXShop attempts to do better. Most of the time TeXShop does an amazing job of finding the right couple of words but if the words are repeated close by it sometimes is off a bit. Try clicking a word or two down.
>
>> 3-How can I open the \inputted chapters from the root source file? On a PC with winedt I double clicked on the word \input and it opened the file in a tab. In texshop it seems that I have to use file>open... which is not as convenient and then it opens the file in a new window not in a new tab. Is there a way to change this?
>>
>
> There is a macro for doing that but I'm not sure if it's part of the default macros (I've been using TeXShop for 8 years and have collected many macros). Look for a macro called Open Selection. I can send it to you if you don't have it. You select the file name in the input (or include, usepackage, etc.), including the path if necessary (the macro will find the file if kpsewhich can find it in the standard places) and the macro opens the file.
>
>> 4-To be able to use sync (or simply to run latex) from within a chapter that has been used in the root file by \input I have to set the root file for that chapter using file>set project root. This is also inconvenient since has to be done for each chapter. Is there a way to set the root file globally for a project?
>>
>> Thanks
>
> Each of the input or included files should have a line
>
> % !TEX root = path/to/root.tex
>
> (again, with the spaces) placed at the top of the file. The `path/to/root.tex' can be an absolute or relative path; e.g., if `chap1.tex' is in the folder `subdir' just below the `mybook.tex' root file
> i)mybook.tex should have the line
>
> \input{subdir/chap1}
>
> or
>
> \include{subdir/chap1}
>
> and ii)the chap1.tex file should have the line
>
> % !TEX root = ../mybook.tex
>
> and when you typeset (Cmd-T) from either mybook.tex or chap1.tex the file will properly get compiled according to the rule you've set in (e.g., latexmk) mybook.tex. Oh... once things are set up this way opening chap1.tex will automatically open and minimize (to the Dock) mybook.tex.
>
> Hope this helps get you going.
>
> 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://email.esm.psu.edu/mac-tex/
> 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
>
More information about the macostex-archives
mailing list