On Fri, Feb 27, 2015 at 12:54 PM, Liviu Andronic <[email protected]> wrote:
> On Fri, Feb 27, 2015 at 6:22 PM, Scott Kostyshak <[email protected]> wrote:
>> On Fri, Feb 27, 2015 at 3:50 AM, Liviu Andronic <[email protected]> 
>> wrote:
>>> On Fri, Feb 27, 2015 at 5:59 AM, Scott Kostyshak <[email protected]> wrote:
>>>> On Thu, Feb 26, 2015 at 4:24 PM, Enrico Forestieri <[email protected]> wrote:
>>
>>>>> My vote is for a warning and an output produced in any case.
>>>>> If latex produces an output, that output has to be shown, IMO.
>>>>> Having the possibility of looking at the output may be of great
>>>>> help to pinpoint problems.
>>>>
>>>> Interesting idea. If we do this, we should do it for all errors. With
>>>>
>>> I would second this. Actually, it seems to me that this is what LyX
>>> has been doing for quite some time,
>>
>>> as somewhat often I get errors but
>>> a PDF does output (sometimes with useful clues on what really went
>>> wrong, and pointers on how to fix it).
>>
>> LaTeX errors? Strange, for me if my document has LaTeX errors and LyX
>> catches them by parsing the log, I do not get a PDF. I get the "LaTeX
>> Errors" dialog. You get the PDF and the "LaTeX Errors" dialog? Can you
>> send an example .lyx file that does this for you?
>>
> No, nothing handy. From memory, the exact use case is that I have a
> document that  compiles and I have a PDF displayed. Then I modify the
> document, introduce something that will generate an error (perhaps on
> 2nd pass), and compile from LyX: at one point the document compilation
> will result in error, but the PDF file shall be reloaded from disk in
> the PDF viewer (i.e. the PDF will appear even if compilation errors
> out). This will NOT work however if the PDF viewer was closed in
> between: an error will mean that the PDF viewer won't be called.
>
> Liviu

Ah, that makes sense. Yes, you are exactly right about what's going
on. This means that we already have an inconsistency in LyX: either we
should not modify the PDF in the case of an error (e.g. use a
temporary file and only rename if their is no error) or we should
always show the PDF in the case of an error. It should be the same
behavior for reload and view, in my opinion. And it seems to me that
Enrico's preference is the most sensible: always show the PDF if there
is one.

However, do we want a warning + PDF or an error + PDF? I think an
error + PDF makes more sense. Similarly, on the command line, lyx -e
pdf2 myfile.lyx in my opinion should have a non-zero exit code. I
suppose it should also produce a PDF if possible.

Scott

Reply via email to