Re: [ww-users] Latex batch mode
Status: Beta
Brought to you by:
worden
From: Lee W. <wor...@gm...> - 2011-08-17 17:01:18
|
Yes, the workflow is different. Currently if WW successfully produces a pdf file or any other file, it provides the file and the usual link to the logfile without indicating whether there are errors reported in the logfile or not. It would be possible for WW to parse the messages output by latex and produce a message if there were non-fatal errors, but it seems like it would require a somewhat deep change in WW's design. Users can display the .make.log file on the wiki page, to see whether there are errors without needing to follow the [log] link. It would also be possible to do more sophisticated error reporting within the current design, by creating a rule to make a .latex.errors file from the .make.log file and displaying that in the wiki page - or, if you want to be fancy, a nicely formatted .latex.errors.wikitext or .latex.errors.html (or even .latex.errors.tex). You can do this yourself, and if I did it for you this is probably the route I would favor. Jonathan has done error output rules much like this for R output. Relatedly, I've learned of a tool called latexmk and am wondering whether we should consider using that instead of the make rules that are currently in there to coordinate remaking pdfs from all the source files. All opinions are welcome. The sourceforge tracker entry is open for comments: https://sourceforge.net/tracker/index.php?func=detail&aid=3388647&group_id=366300&atid=1527388 Thanks for the ideas - LW On 08/17/11 09:38, Walt Mankowski wrote: > I'll give you an example of how emacs handles this. Let's say I have > this line in my dissertation > > $i$. As with edit distance (c.f.\ Equation~\ref{eqn:sim_ed}), we > > and I change it to this: > > $i$. As with edit distance (c.f.\ Equation~\reff{eqn:sim_ed}), we > > When I compile the first one inside emacs, it chugs for a few seconds > and then says > > LaTeX: successfully formatted {58} pages > > and creates a new PDF. But when I compile the second one, it says > > LaTeX errors in `*~/drexel/thesis/dissertation/thesis output*'. Use C-c ` to display. > > If I enter C-c `, I go to a new buffer emacs created with the LaTeX error: > > ERROR: Undefined control sequence. > > --- TeX said --- > l.924 ... with edit distance (c.f.\ Equation~\reff > {eqn:sim_ed}), we > --- HELP --- > TeX encountered an unknown command name. You probably misspelled the > name. If this message occurs when a LaTeX command is being processed, > the command is probably in the wrong place---for example, the error > can be produced by an \item command that's not inside a list-making > environment. The error can also be caused by a missing \documentclass > command. > > But it *also* created the PDF, and the line with the equation > reference has an obvious formatting problem on it. > > Obviously your workflow is different inside workingwiki, but this > sounded like what David was asking for. I just wanted to point out > that it's at least possible to get both an error report and a new PDF. > > Walt > > On Wed, Aug 17, 2011 at 04:41:12AM -0400, Jonathan Dushoff wrote: >> It's not obvious (at least to me) what you both mean by "error >> report". WW will certainly put the latex errors into the make log, >> but I guess Lee means to make it not report an error condition (so >> that it will keep going ahead with make, and so that WW will be >> willing to show you the file). >> >> Probably we should all be looking at our make logs more -- and looking >> at the log before submitting something important in LaTeX has always >> been a good idea that a lot of us skip, even before we had WW. >> >> JD >> >> On Tue, Aug 16, 2011 at 10:35 AM, Walt Mankowski<wa...@po...> wrote: >>> I generally compile latex documents inside emacs. Emacs's latex mode >>> is somehow smart enough to do both -- produce a (generally wrong) PDF >>> file, and give you an error report. I don't know how it's doing that, >>> but it's at least possible to do both. >> >>> On Mon, Aug 08, 2011 at 03:25:20PM -0700, Lee Worden wrote: >>>> By request, I'm trying a change in WorkingWiki's behaviour, by having it >>>> try to finish processing latex documents even if they have errors in >>>> them. This only applies to creating pdf files, not to creating the HTML >>>> version of the document that you see in the wiki page (which is already >>>> error-tolerant). >> >>>> This means that if your document has errors, you're more likely to get a >>>> pdf file and less likely to get an error report. If the pdf file seems >>>> strange, you may want to look at the log file despite the lack of error >>>> report. >> >>>> If you get messages like "make succeeded but did not produce >>>> my-thing.pdf" (or if anything else seems strange or wrong) please let me >>>> know and I'll try to improve the situation. >> >>>> Thanks, >>>> Lee >> >>>> -------- Original Message -------- >>>> Subject: [ workingwiki-Feature Requests-3297260 ] Latex batch mode >>>> Date: Mon, 08 Aug 2011 15:07:14 -0700 >>>> From: SourceForge.net<no...@so...> >>>> To: SourceForge.net<no...@so...> >> >>>> Feature Requests item #3297260, was opened at 2011-05-03 19:28 >>>> Message generated for change (Comment added) made by worden >>>> You can respond by visiting: >>>> https://sourceforge.net/tracker/?func=detail&atid=1527388&aid=3297260&group_id=366300 >> >>>> Please note that this message will contain a full copy of the comment >>>> thread, >>>> including the initial issue submission, for this request, >>>> not just the latest update. >>>> Category: None >>>>> Group: Refactored WorkingWiki >>>>> Status: Closed >>>> Priority: 5 >>>> Private: No >>>> Submitted By: Jonathan Dushoff (dushoff) >>>>> Assigned to: Lee Worden (worden) >>>> Summary: Latex batch mode >> >>>> Initial Comment: >>>> David Earn suggests that the wiki should do latex in batch mode by >>>> default. This just means that it would try to produce PDF output even >>>> when encountering an error. This could help in finding errors, I think, >>>> but I'm not sure how valuable it would be -- given that we already have >>>> the .xhtml version. >> >> >>>> ---------------------------------------------------------------------- >> >>>>> Comment By: Lee Worden (worden) >>>> Date: 2011-08-08 15:07 >> >>>> Message: >>>> OK, trying it out in r729. I had to put -interaction=nonstopmode on the >>>> command line to have it keep going to the end of the document, and put a - >>>> sign in front of the command to have make ignore the error code that it >>>> returns. So we'll want to keep an eye out for 'make succeeded but did not >>>> produce document.pdf'. If that starts happening, please let me know and >>>> I'll try to come up with a better kind of diagnostic output. >> >>>> ---------------------------------------------------------------------- >> >>>> You can respond by visiting: >>>> https://sourceforge.net/tracker/?func=detail&atid=1527388&aid=3297260&group_id=366300 >> >>>> ------------------------------------------------------------------------------ >>>> uberSVN's rich system and user administration capabilities and model >>>> configuration take the hassle out of deploying and managing Subversion and >>>> the tools developers use with it. Learn more about uberSVN and get a free >>>> download at: http://p.sf.net/sfu/wandisco-dev2dev >>>> _______________________________________________ >>>> workingwiki-users mailing list >>>> wor...@li... >>>> https://lists.sourceforge.net/lists/listinfo/workingwiki-users |