Picon
Favicon
Gravatar

LaTeX macro question

Hello,

I'm trying to write an environment that does the following things: (1) saves the verbatim text between the
\begin and \end commands as a list of tokens, (2) computes a simple hash function on that token list to
generate a value (so as to be able to detect when the content changes), and (3) uses \scantokens to
re-process that list of tokens so as to typeset it "properly". 

Right now, I'm having problems with (1) and (3) — I just can't seem to figure out how to save the verbatim
text and then process it with \scantokens.

I know the following lets me save verbatim text:

\usepackage{fancyvrb}

\begin{SaveVerbatim}{asdf}
  \begin{tikzpicture}
    \draw (0,0) -- (0,1) -- (1,1) -- cycle;
  \end{tikzpicture}
\end{SaveVerbatim}

And now I can typeset that as many times as I want via \UseVerbatim{asdf}. 

But 

\scantokens{\UseVerbatim{asdf}}

Just reproduces the same output as \UseVerbatim{asdf}

and

(Continue reading)

Joachim Kock | 6 Feb 09:09
Picon
Favicon
Gravatar

Re: wrap [was: migrating from emacs...]

On 2012-02-05, at 4:27 PM, Enrico Franconi wrote:

> I believe that the idea to force LF to format structured text does
> not belong to the modern times - when windows do resize freely.  I am
> fully with Herbert (if I understand him well): we do not need forced
> LFs, and we need to reformat our brain to the more powerful ways to
> organise structured text of the modern times :-)
>
> Since I have been a hard-core emacs user, I gave this issue a serious
> thought before leaving emacs, and I concluded that we need to switch
> our paradigm, by having LFs only when there is a logical need, rather
> than when the text hits the current accidental right margin of the
> window you are working on when creating/editing the text.

I understand that soft-wrapped lines is a good invention in
WYSIWYG word processors (where it depends on document width,
not window width!), but I don't see the point of it in latex
source code:

- with long soft-wrapped lines, go-to-line functionality like
typing 'e' at a tex error, is less efficient;

- diff becomes considerably less useful when differences are
detected inside a 700-char line forming a paragraph instead of
in a 70-char line;

- comment chars work on such "paragraphs" instead of on lines,
and if one day the file is hardwrapped (e.g. by TeXShop's
shift-cmd-H, or by an email transmission), it can really be
screwed up, since a comment that used to affect 700 chars now
(Continue reading)

Richard Talley | 5 Feb 18:40
Picon
Gravatar

MacTeX 2011 missing convert xml files

I have been using LyX 1.6.8 with MacTeX 2009 to write a lot of technical documentation.


Yesterday I installed MacTeX 2011 (I updated it with the TeX Live Utility) and LyX 2.0.2.

I have been unable to typeset some of the manuals that come with LyX. Pdf and eps files don't load, "Error converting to loadable format".

I tracked this down to a problem with MacTeX 2011's installation of the ImageMagick convert utility.

The 'What is Installed' pdf file says this:

"The package installs “convert” in /usr/local/bin, nine xml initialization files in /usr/local/lib/ImageMagick-6.6.9/config, and one man page in /usr/local/share/man/man1."

However, looking at the list of files in the MacTeX package, the nine xml initialization files are not included! The correct convert executable and the man page are on my system, but /usr/local/lib/ImageMagick-6.6.9/config doesn't exist.

Running convert from the command line to convert an eps file to pdf shows convert searching and failing to find magic.xml and delegates.xml.

Has anyone else seen this? What would be the fastest and easiest way to get these necessary xml files on my system?

Thanks,

-- Rich

----------- 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

Claus Gerhardt | 4 Feb 22:07
Picon
Favicon

xhmlatex

Attached are a shell script and an Applescript using htlatex with the option xhtml; they will convert
almost any mathematical tex source file into an html file which will look beautiful in Safari and probably
in any other browser.

I tested it with an arbitrary paper of mine and the result pleasantly  surprised me. The equations will be
scalable. 

Claus
Attachment (xhmlatex.scpt.zip): application/zip, 7358 bytes
Attachment (xhmlatex.zip): application/zip, 650 bytes
----------- 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

marian | 4 Feb 20:17
Picon
Gravatar

migrating from Emacs to TexShop

I have been an Emacs user for almost 20 years.  When I was young, I was a
sophisticated one, and I would write Emacs Lisp code to get the editor to do
exactly what I wanted.  Nowadays, I can't even be bothered to figure out how
to configure Emacs so that its TeX-specific features work.

For the last few days, I have been borrowing a friend's Mac.  I am impressed
with it and thinking of buying one myself, and if I do, I am thinking of
using TexShop, which I have been heavily using these past few days, instead
of Emacs.  I was happily surprised to find that many of the standard Emacs
keybindings using Control work in TexShop.  Unfortunately, none of the
keybindings using Meta work, but I found a post in the MacOS-TeX archives
explaining a way to make them work as well, and I plan to try it.

A number of things, however, don't seem so convenient.  First, the first
thing I noticed when I started editing a TeX file of mine using TeXShop is
that there didn't seem to be any equivalent to Emacs's fill-paragraph
command.  I concluded that the reason was probably that TeXShop expected you
to keep each paragraph as a single line, so I converted my file to put each
paragraph in a single line.  But I am not happy with this solution for two
reasons.  First, it will make it hard to share files between the Mac and
Unix.  Second, it makes the Emacs commands involving the beginning and end
of line (C-a, C-e, C-k, etc.) behave very differently: going to the
beginning of the line now takes you, in effect, to the beginning of the
paragraph.  Second, as noted in the thread on getting the Meta-based
commands to work, the PageUp and PageDown keys don't move the cursor as in
Emacs (or at least the version of it I was using), and at least until I set
up the hack to get the Meta-based bindings to work, C-v/M-v is not an
alternative.
Finally, there are lots of Emacs features that I rarely use but that are
extremely useful once in a while, for instance the commands to manipulate
rectangles.  As far as I understand, there would is just no TeXShop
equivalent or workaround for any of them.  Do people resort to using another
editor?  Using a scripting language?

I am willing to learn new ways of working, and even to use the mouse on
occasion, but they should be more or less as efficient as the old ones.  So
far, I am impressed with the TeX-specific features of TeXShop and with the
fact that it worked out-of-the-box, without the endless fiddling that seems
necessary to get anything to work properly on Emacs.  But it also seems
really inflexible and to lack not just some of the more esoteric features of
Emacs, which I rarely use, but even some basic movement commands.  I want to
just buy a Mac and use TeXShop and forget about all that complicated Unix
stuff.  But these issues are holding me back, and I don't have a good sense
of whether TeXShop is just very limited or whether there are alternatives
and workarounds I don't know about yet.

Marian

--
View this message in context: http://macosx-tex.576846.n2.nabble.com/migrating-from-Emacs-to-TexShop-tp7254679p7254679.html
Sent from the MacOSX-TeX mailing list archive at Nabble.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

Gary L. Gray | 3 Feb 05:26
Gravatar

PSA: BBEdit package for writing Latex - Nathan’s Blog

I haven't tried this (yet), but I thought the BBEdit aficionados might be interested in this:

http://nb.nathanamy.org/latex-bbpackage/

Gary
----------- 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

Murray Eisenberg | 31 Jan 20:44
Picon
Gravatar

Re: MacOSX-TeX Digest, Vol 51, Issue 28

On 1/30/12 09:14:36 -0500, William Adams<will.adams@...> wrote:
>
> Subject: Re: [OS X TeX] Re: eBooks with LaTex and ... ?
> To: TeX on Mac OS X Mailing List<macosx-tex@...>
>
> On Jan 29, 2012, at 8:21 PM, Murray Eisenberg wrote:
>
>> >  It's a shame that(La)TeX gets the short end of things with iBooks Author. (But how_would_  you expect to
incorporate LaTeX typeset material into such a rich page layout authoring tool?)
> The same way I use it in InDesign --- using LaTeXiT's TeXView.app-like typeset TeX equation Service.

Does the LaTeXiT output work in iBooks Author, using actual font 
characters rather than images? (I haven't tried it yet there).

--

-- 
Murray Eisenberg                     murray@...
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305
----------- 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

Josep Maria Font | 30 Jan 19:25
Favicon

Compatibility of Lion and Snow Leopard file structures ?

Hi,

I have received a new computer, with Lion installed, and I want to migrate my ordinary user to it. But I have
(almost all) my files in sync with two other machines through Dropbox, to my entire satisfaction till now
(after overcoming initial problems with file encoding, but this is another issue), and these other
machines are still using Snow Leopard (last version).

I have read about the new "document model" in Lion, about how TeXShop takes advantage of it, about saving
versions, etc., and I am concerned about what will happen when moving the files through Dropbox between
the Lion machine and the Snow Leopard ones. Does Snow Leopard understand Lion's document model ? Should I
expect conflicts, missing versions of a file, etc.? Will the "hidden" Lion old versions of a file be
invisible to Snow Leopard ? Should I wait until I am able to upgrade the two older machines to Lion ?

Are there any experiences out there of this very situation ? I will shortly begin googling about this, but I
would like to hear specifically from the TeX world. I will be grateful for any tip or advice. 

Best,

JMaF

----------- 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

Richard | 30 Jan 16:35
Picon
Gravatar

EPS colour problem (blue-->purple)

Hi,

I have an EPS figure with a blue/red colour scheme. When I Latex it using Texshop on Lion the
-eps-converted-to.pdf file looks fine in the red areas, but blue areas change to a purple colour.

How do I fix this?

thanks
		•
----------- 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

Murray Eisenberg | 30 Jan 02:21
Picon
Gravatar

Re: MacOSX-TeX Digest, Vol 51, Issue 27

On 1/29/12 12:25:38 +0100, Axel Kielhorn<tex@...> wrote:
>
> Subject: Re: [OS X TeX] eBooks with LaTex and ... ?
> To: TeX on Mac OS X Mailing List<macosx-tex@...>
> Message-ID:<76D35D9F-FCCC-4E46-B1B6-21EAC315C996@...>
> Content-Type: text/plain; charset=us-ascii
>
> Am 28.01.2012 um 17:27 schrieb David Derbes:
>
>> >  For several years now I've been working on the Great American Teach Yourself Physics text which I plan to
give away on line. It's all in LaTeX (of course), with diagrams via Mathematica and Illustrator.
>> >
>> >  Since I expect that readers (if any) will probably read it electronically, it would be helpful to
include dynamic illustrations (as you might expect, there's quite a bit of basic calculus in it).
> Dynamic illustration sounds nice, but there are few ebook readers capable of handling that.
> You are limiting the audience to iBook, Kindle Fire and Android tablet users.
> Most ebook readers are rather underpowered and eInk isn't suitable for animation.
>
>> >  My interest was increased by the recent release of Apple's iBooks Author.
> I haven't used it yet (being still on Snow Leopard), but you should keep in mind that this is a commercial
tool by one company designed to created profit for that company.
> It is not an open/free/libre eBook creator.
>
>> >  So I'm looking into various formats. It then occurred to me that quite a bit of expertise was to be found
right here.
>> >  The early indications with respect to Apple's Author are not good. There seems to be no LaTeX support at all.
> This is hardly a surprise.

Don't underestimate the significance of Apple's iBooks 2, textbooks for 
that app, and the free ibooks Author to produce such books.

One report (see macrumors.com) claims that Apple sold 350,000 copies of 
their already-existing textbooks the first three days. These are all 
high-school math/science titles -- including one, "Life on Earth", still 
in progress.

Especially if Apple ports iBooks 2 to Macs -- which may be important 
given how many college students have Macs, including MacBooks -- the 
college market could be the next big target.

It's a shame that(La)TeX gets the short end of things with iBooks 
Author. (But how _would_ you expect to incorporate LaTeX typeset 
material into such a rich page layout authoring tool?)

What is compatible with iBooks Author -- and can be called directly from 
within it -- is Design Science's "MathType" application. You create the 
math expressions in MathType, and they are transferred to the iBooks 
file you're creating as MathML, which the iBooks format can interpret.

That suggests possibilities, e.g., creating LaTeX as usual, using some 
tool (e.g., MathJax) to convert to MathML, which is then interpreted by 
the iBooks format.

Of course this _seems_ to mean you won't do a whole document first in 
LaTeX -- just the math-like expressions.

--

-- 
Murray Eisenberg                     murray@...
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305
----------- 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

Simon Burrell | 29 Jan 22:40
Picon
Gravatar

Using 'ditto' to shrink /usr/local/texlive folder

Hi,


Mac Pro (2010), OS X 10.6.8, MacTex 2011, BasicTex 2010 (probably soon to be deleted)

I hope you don't mind if I do a 'hit-and-run'.  In the interests of saving space I'd like to apply hfsCompression to the /usr/local/texlive folder.  I'll be making a backup prior to doing so, and I have Time Machine, but I thought it prudent to see if anyone could highlight any foreseeable problems with this action before proceeding---it'd be nice to avoid a tedious re-install procedure :-)  The exact command I'm intending to apply is:

sudo ditto --hfsCompression /usr/local/texlive /usr/local/texlive2

I would then delete the original texlive folder, and rename the new one to replace it.  For those who might not know, 'ditto' now preserves resource forks, HFS meta-data, extended attributes, quarantine information and ACLs by default.  So, would I, for example, have to re-create the symbolic links that point to this folder?

In addition, it might be nice to thin the 'texlive' folder by also using the '--arch x86_64' switch---my Mac uses the 64-bit kernel by default, you see.  Does anyone know whether this particular switch would cause problems?  To clarify, the full command would be:

sudo ditto --arch x86_64 --hfsCompression /usr/local/texlive /usr/local/texlive2

Your feedback appreciated.

Regards.
----------- 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


Gmane