From mboxrd@z Thu Jan  1 00:00:00 1970
From: "Thomas S. Dye" <tsd@tsdye.com>
Subject: Re: Karl Berry: Re: Nick Dokos: texi2dvi egrep regexp
Date: Sun, 10 Oct 2010 06:37:30 -1000
Message-ID: <404B7290-0CAC-4190-BE9F-98948CFA8C67@tsdye.com>
References: <17038.1286563867@gamaville.dokosmarshall.org>
	<AANLkTikVGwLzqzfUpPMhPu8fE6Y8xLwTbDpSE2be37Jy@mail.gmail.com>
	<87sk0fk6eo.wl%ucecesf@ucl.ac.uk>
	<3B502F70-93E5-485E-B4B9-4850A06B7925@gmail.com>
	<26025.1286642561@gamaville.dokosmarshall.org>
	<548BC6EA-FAFB-42F5-AFE3-EC45DAA8FA48@tsdye.com>
	<B71CE7D2-BD66-428F-A709-A9CACBF1D8FA@gmail.com>
Mime-Version: 1.0 (Apple Message framework v936)
Content-Type: multipart/mixed; boundary="===============0490570348=="
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from [140.186.70.92] (port=36538 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1P4yu0-0005C8-Qb
	for emacs-orgmode@gnu.org; Sun, 10 Oct 2010 12:37:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tsd@tsdye.com>) id 1P4ytz-0006N6-7f
	for emacs-orgmode@gnu.org; Sun, 10 Oct 2010 12:37:36 -0400
Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:51696)
	by eggs.gnu.org with smtp (Exim 4.71) (envelope-from <tsd@tsdye.com>)
	id 1P4yty-0006Mz-VA
	for emacs-orgmode@gnu.org; Sun, 10 Oct 2010 12:37:35 -0400
In-Reply-To: <B71CE7D2-BD66-428F-A709-A9CACBF1D8FA@gmail.com>
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org


--===============0490570348==
Content-Type: multipart/alternative; boundary=Apple-Mail-18--816194347


--Apple-Mail-18--816194347
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit


On Oct 9, 2010, at 9:05 PM, Carsten Dominik wrote:

>
> On Oct 9, 2010, at 7:25 PM, Thomas S. Dye wrote:
>
>> On Oct 9, 2010, at 6:42 AM, Nick Dokos wrote:
>>
>>> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>>
>>>
>>>> I am looking for a way out which will allow pdf compilation of Org
>>>> work out of the box, and still allow texi2dvi to be used where  
>>>> possible.
>>>>
>>>> I have so far come up with two possible work-arounds and would
>>>> like to hear if one of them makes sense:
>>>>
>>>> 1.  I could set the environment variable LC_ALL
>>>>  for the duration of the texi2dvi command to some value
>>>>  like C?  That should fix the egrep call, but could
>>>>  it have adverse effects on the pdflatex and bibtex runs or
>>>>  any other stuff used in texi2dvi?
>>>>
>>>
>>> Yes, at least theoretically. I don't think anybody has gone down
>>> the path of investigating these effects.
>>>
>>>> 2. On startup, I could use
>>>>
>>>> (if (= 0 (shell-command "echo foo | egrep \"[A-z]\""))
>>>>          ....
>>>>
>>>>
>>>> to check if there is a problem and in this case go for
>>>> manual pdflatex runs rather than using texi2dvi.  THis might work,
>>>> but it would be a bit unpredictable what ends up being used,
>>>> and with no setup in Org you could get different sets of commands
>>>> on different machines.
>>>>
>>>
>>> The trouble with this is that you are checking on egrep which will  
>>> give
>>> you a positive for egrep versions >= 2.6.x, but the fix to  
>>> texi2dvi might
>>> have made that irrelevant. How about
>>>
>>>   try
>>>      texi2dvi
>>>   except
>>>      do Seb's thrice-repeated pdflatex (or whatever) call
>>>
>>> After everybody has updated to the latest texinfo, the exception  
>>> code
>>> can be taken out.
>>>
>>> Alternatively, the texi2dvi method can be reverted: it was an idea  
>>> that
>>> was worth trying, but it has caused more harm than good at this  
>>> point
>>> - maybe it can be revisited in six months.
>>>
>>>> Any ather ideas?  Comments?
>>>>
>>>
>>
>> Perhaps org-latex-to-pdf-process should just run pdflatex twice (or  
>> three times) so that it most likely will work out of the box.   
>> IIUC, the user can set this variable to something else.
>
> I think this is the best idea.  I am going to set the default to 3  
> runs of pdflatex and provide a customization option to use texi2dvi.
> FOr now, I think the danger of this going wrong for unsuspecting  
> users is worse than the advantage of using texi2dvi.
>
> So if texi2dvi works on your system, just configure org-latex-to-pdf- 
> process.  If you use the customize interface to do the  
> customization, one of the options will be texi2dvi.
>
>> Some ready-to-use alternatives on Worg might be useful.  There, the  
>> pitfalls of using texi2dvi could be explained and those with  
>> systems where it works could find a recipe and make use of it.  The  
>> use of other latex make files might be illustrated there as well.
>
> Good idea.

I made a start in this direction on the LaTeX export tutorial, http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-8 
.  Information on other makefile setups and setups for other LaTeX  
engines, such as xelatex, could go here, as well.

All the best,
Tom
--Apple-Mail-18--816194347
Content-Type: text/html;
	charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><br><div><div>On Oct 9, 2010, =
at 9:05 PM, Carsten Dominik wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div><br>On =
Oct 9, 2010, at 7:25 PM, Thomas S. Dye wrote:<br><br><blockquote =
type=3D"cite">On Oct 9, 2010, at 6:42 AM, Nick Dokos =
wrote:<br></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">Carsten Dominik &lt;<a =
href=3D"mailto:carsten.dominik@gmail.com">carsten.dominik@gmail.com</a>&gt=
; wrote:<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">I am =
looking for a way out which will allow pdf compilation of =
Org<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">work =
out of the box, and still allow texi2dvi to be used where =
possible.<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">I have =
so far come up with two possible work-arounds and =
would<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">like =
to hear if one of them makes =
sense:<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">1. =
&nbsp;I could set the environment variable =
LC_ALL<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;for the duration of the texi2dvi command to some =
value<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;like C? &nbsp;That should fix the egrep call, but =
could<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;it have adverse effects on the pdflatex and bibtex runs =
or<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;any other stuff used in =
texi2dvi?<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">Yes, at least theoretically. I =
don't think anybody has gone =
down<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">the path of investigating these =
effects.<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">2. On =
startup, I could =
use<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> (if =
(=3D 0 (shell-command "echo foo | egrep =
\"[A-z]\""))<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;....<br></blockquote=
></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> to =
check if there is a problem and in this case go =
for<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> =
manual pdflatex runs rather than using texi2dvi. &nbsp;THis might =
work,<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> but =
it would be a bit unpredictable what ends up being =
used,<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> and =
with no setup in Org you could get different sets of =
commands<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite"> on =
different =
machines.<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">The trouble with this is that =
you are checking on egrep which will =
give<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">you a positive for egrep versions &gt;=3D 2.6.x, but the =
fix to texi2dvi might<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">have made that irrelevant. How =
about<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;&nbsp;try<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;texi2dvi<br></blockquote></blockquote><block=
quote type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;&nbsp;except<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do Seb's thrice-repeated pdflatex (or =
whatever) call<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">After everybody has updated to =
the latest texinfo, the exception =
code<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">can be taken out.<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">Alternatively, the texi2dvi =
method can be reverted: it was an idea =
that<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">was worth trying, but it has caused more harm than good at =
this point<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">- maybe it can be revisited in =
six months.<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cite">Any =
ather ideas? =
&nbsp;Comments?<br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">Perhaps =
org-latex-to-pdf-process should just run pdflatex twice (or three times) =
so that it most likely will work out of the box. &nbsp;IIUC, the user =
can set this variable to something else.<br></blockquote><br>I think =
this is the best idea. &nbsp;I am going to set the default to 3 runs of =
pdflatex and provide a customization option to use texi2dvi.<br>FOr now, =
I think the danger of this going wrong for unsuspecting users is worse =
than the advantage of using texi2dvi.<br><br>So if texi2dvi works on =
your system, just configure org-latex-to-pdf-process. &nbsp;If you use =
the customize interface to do the customization, one of the options will =
be texi2dvi.<br><br><blockquote type=3D"cite"> Some ready-to-use =
alternatives on Worg might be useful. &nbsp;There, the pitfalls of using =
texi2dvi could be explained and those with systems where it works could =
find a recipe and make use of it. &nbsp;The use of other latex make =
files might be illustrated there as well.<br></blockquote><br>Good =
idea.<br></div></blockquote></div><br><div>I made a start in this =
direction on the LaTeX export tutorial,&nbsp;<a =
href=3D"http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-8">=
http://orgmode.org/worg/org-tutorials/org-latex-export.php#sec-8</a>. =
&nbsp;Information on other makefile setups and setups for other LaTeX =
engines, such as xelatex, could go here, as =
well.</div><div><br></div><div>All the =
best,</div><div>Tom</div></body></html>=

--Apple-Mail-18--816194347--


--===============0490570348==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--===============0490570348==--