Julien Rioux wrote:

> On 10/03/2012 8:20 AM, Georg Baum wrote:
>> The roundtrip output of one of the tex2lyx tests has changed recently:
>>
>> tex2lyx -roundtrip src/tex2lyx/test/test-insets.tex
>>
>> will produce src/tex2lyx/test/test-insets.lyx.lyx and
>> src/tex2lyx/test/test- insets.lyx.tex. If you compare these files with
>> the ones created about 3 weeks ago, you'll get identical .lyx.lyx files,
>> but the attached differences in the .lyx.tex files (ignoring the
>> differences coming from the changed src/tex2lyx/test/test-insets.tex file
>> itself).
>>
> 
> Interesting. Do we have some infrastructure in place to do such
> comparison tests, or is it just something that you run locally from time
> to time? Would be good to do such checks as part of testing features in
> a staging branch, if we end up using this workflow.

I run the attached script locally before committing any tex2lyx change. It 
lives in src/tex2lyx/test, and is called from the build directory:

../run.sh 427 428

It would definitely be good to make something similar accessible via "make 
test", and keep the output in git, so that you can easily compare to the 
reference output. Maybe I'll do that when I find some time.

> It's a bug in the old implementation: there are no [before] or [after]
> optional arguments to \citeauthor and \citeyear when using natbib
> numerical style. Natbib will gobble those for you, so it doesn't lead to
> latex compilation errors, but it was wrong of LyX to pretend that you
> can have them. This kind of customization at the \citecommand level was
> not possible before, but is now implemented in r40820. It is not a
> fileformat change, since generated dvi/pdf are the same. I also don't
> think that any changes to tex2lyx are necessary in this case, as it is
> doing the right thing in gobbling the options just like natbib does.

Thanks for the explanation, now I understand what happens. In fact, tex2lyx 
does not gobble the options (they appear in the generated .lyx file), but 
LyX does not export them to .tex. Also I do now believe that the citation 
modules should be excluded from the normal module search in tex2lyx, since 
they are loaded via the cite engine and not the module list. Therefore they 
should either get a different extension, or the category should be used to 
filter them out (in LyX as well).


Georg

Attachment: run.sh
Description: application/shellscript

Reply via email to