[OS X TeX] Wrapping and formatting paragraphs in Texshop (and other misc.)

Bruno Voisin bvoisin at mac.com
Wed Jan 12 19:50:46 EST 2005


Le 12 janv. 05, à 21:16, David Arnold a écrit :

> I've noted that some of my files differ in Texshop. What I am working  
> on came from the windows environment text system (Emacs + Miktex).
>
> Some times Ctrl+k will kill a single line, sometimes a whole  
> paragraph. Thus, even though it looks like a nicely wrapped paragraph  
> onscreen, it is really one long line. Even inverse search with pdfsync  
> selects a "paragraph" indicating it is one long line.

This is Mac OS X default behaviour, same as in TextEdit, for example.  
Called soft wrap, I think, ie wrapping on screen but not in the source  
file, as opposed to hard wrap, ie wrapping both in the source file and  
on screen.

But not convenient with TeX, which was conceived with hard wrap in  
mind. If only because isolating an error when only a line number is  
given in the console window may be tricky when the line is very long.  
Not convenient either with FileMerge (from Xcode), when looking for a  
diff in a very long line.

> How can I reformat my document in Texshop so that one long line  
> becomes a paragraph with line endings? So that when I hit Ctrl+k, I  
> delete to the end of the line and not the whole paragraph?
>
> How can I turn on line endings in Texshop?
>
> How can I reformat a paragraph in Texshop?
>
> Does anyone know how to configure Texshop to show what line the cursor  
> is on? I know about Command-L, but I want to see line number in the  
> status bar (or somewhere).
>
> Does anyone know how to configure the cursor? I'd like to change its  
> size to make it more visible. I have a hard time finding it on the  
> screen with these old eyes. :-)

None of this, I think, is possible in TeXShop. There are hidden prefs  
described in TeXShop's help, but I couldn't find any corresponding to  
those settings.

You may have a look at the shareware BBEdit or Alpha, which allow this  
(Alpha having on top a very elaborate TeX menu, and a notion of modes à  
la Emacs). Or install Emacs for Mac: Enhanced Carbon Emacs  
<http://www.inf.unibz.it/~franconi/mac-emacs/> is especially geared  
towards TeX, by incorporating AUCTeX and RefTeX. There are actually a  
number of OS X Emacs out there. Quoting a previous message from 6  
January:

> OS X Emacs as part of a wider-range porting infrastructure
> ==========================================================
>
> - Fink build, for X11 (version 21.3.50, CVS 2004/11/17)
>
> 	<http://fink.sourceforge.net/pdb/package.php/emacs21>
>
> - Fink build, for X11 with Xaw3d (version 21.3.50, CVS 2004/11/17)
>
> 	<http://fink.sourceforge.net/pdb/package.php/emacs21-xaw3d>
>
> - DarwinPorts portfile, either X11 or Carbon (version 21.3.50.1,  
> current CVS): to be built locally
>
> 	<http://darwinports.opendarwin.org/darwinports/dports/editors/emacs/ 
> Portfile>
>
> - There used to be a WebDAV server with some DarwinPorts builds,  
> including Carbon Emacs, but I can't remember the URL for the life of  
> me.
>
> Carbon Emacs
> ============
>
> - Andrew Choi's original Carbon build instructions
>
> 	<http://members.shaw.ca/akochoi-emacs/>
>
> - Seiji Zenitani's Carbon build (version 21.3.50.1, CVS 2004/12/07)
>
> 	<http://www.apple.com/downloads/macosx/unix_open_source/ 
> carbonemacspackage.html>
> 	<http://home.att.ne.jp/alpha/z123/emacs-mac-e.html>
>
> - Ovidiu Predescu's Carbon build (version 21.3.50.1, CVS 2004/09/08)
>
> 	<http://www.webweavertech.com/ovidiu/emacs.html>
>
> - Kevin Walzer's Carbon build (version 21.3.50.1, CVS 2004/08/04)
>
> 	<http://www.wordtech-software.com/emacs.html>
>
> - Alex Rice's Carbon build (version 21.3.50.1, CVS 2004/05/29)
>
> 	<http://mindlube.com/products/emacs/>
>
> - David Caldwell's Carbon build (version 21.3.50, CVS 2002/11/26):  
> Jaguar only
>
> 	<http://www.porkrind.org/emacs/>
>
>
> Enhanced Carbon Emacs
> =====================
>
> - Enrico Franconi's Carbon build with TeX enhancements (version  
> 21.3.50, CVS 2003/11/14)
>
> 	<http://www.inf.unibz.it/~franconi/mac-emacs/>
>
>
> Cocoa Emacs
> ===========
>
> - Adrian Robert's Cocoa Emacs distro (version 20.7, released  
> 2004/11/04): to be built locally
>
> 	<http://kamares.ucsd.edu/~arobert/GNUstep/emacs.html>
>
> - Christophe de Dinechin's Cocoa Emacs build (version 20.7, released  
> 2002/08/27): Jaguar only
>
> 	<http://emacs-on-aqua.sourceforge.net/>
> 	<http://sourceforge.net/projects/emacs-on-aqua>
>
>
> Carbon XEmacs
> =============
>
> - Pitts Jarvis' Carbon XEmacs build (version 21.5.10, released  
> 2003/03/17): Jaguar only
>
> 	<http://homepage.mac.com/pjarvis/xemacs-21.5.9.html>
>
>
> Emacs goodies
> =============
>
> - David Reitter's OS X Emacs customization package
>
> 	<http://www.reitter-it-media.de/software/osx_emacs.html>
>
> - Massimiliano Gubinelli's alternative OS X Emacs icon
>
> 	<http://docenti.ing.unipi.it/~d9615/homepage/mac.html>
>
> - Mac OS X Emacs list archive
>
> 	<http://www.esm.psu.edu/mac-tex/MacOSX-Emacs-Digests/>

You may also prefer to build Emacs from CVS yourself. Quoting a message  
by Thøger Juul Thorsen from 21 December:

> To build Emacs as a self-contained Carbon app (i.e. completely  
> relocatable), do this:
>
> Make a directory called Emacs, or something.  cd to the directory in  
> Terminal, then build Info with
>
>  curl -O ftp://ftp.gnu.org/gnu/texinfo/texinfo-4.3.tar.gz
>  tar zxf texinfo-4.3.tar.gz
>  cd texinfo-4.3
>  CFLAGS="-g -O2 -D_INTL_REDIRECT_MACROS" ./configure
>  make
>  sudo make install
>
> This then makes Emacs:
>
> cd ..
>  export CVS_RSH="ssh"
>  cvs -z3 -d:ext:anoncvs at savannah.gnu.org:/cvsroot/emacs co emacs
>    (verify that the site's public key is  
> 80:5a:b0:0c:ec:93:66:29:49:7e:04:2b:fd:ba:2c:d5)
>  cd emacs/mac
>  ./make-package --self-contained
>
> This will create a self-contained emacs and place an installer in a  
> .dmg in the emacs/mac directory.
> Now open the .dmg and drag the Application to your /Applications  
> folder, and you're done.

Hope this helps,

Bruno Voisin
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list