[texworks] Document Version-ing and synctex Previewing
Paul A Norman
paul.a.norman at gmail.com
Tue Jun 21 04:20:45 CEST 2011
Ok,
So when using
%& -job-name=These-Fair-Isles
in the source, if you directly manually open your output pdf in the Tw
viewer, you can of course sync back to the source no problem, synctex knows
the real source file name even though the produced .pdf has a different
name.
.. its syncing the other way which is the problem source -> preview, I think
this would be an editor (Tw) specific.
For current needs though, I'll just probably try to hook in on the TypeSet
hook form script, and do a silent virtual auto saveAs using a version
or time-stamp as part of the file name, perhaps into a subdirectory, and
leave the main document always with the same name.and consequent .pdf name
for syncing.
Basically mean that there'll be an auto-backup each time the document is
typeset. As .tex are really comaparitively quite small, this is quite good
- could look at zipping as part of it.
But antway, having researched this ...
I see some very interesting switches for the Typeset command settings in
preferences
in --
http://www.google.com/codesearch#TCAOwTxChU8/trunk/src/TeXDocument.cpp&q=synctexoption%20package:http://texworks%5C.googlecode%5C.com&l=2464
if (!synctexSupported)
args.removeAll("$synctexoption");
args.replaceInStrings("$synctexoption", "-synctex=1");
args.replaceInStrings("$fullname", fileInfo.fileName());
args.replaceInStrings("$basename", fileInfo.completeBaseName());
args.replaceInStrings("$suffix", fileInfo.suffix());
args.replaceInStrings("$directory",
fileInfo.absoluteDir().absolutePath
And was wondering about the general options for use in
Edit/Preferences/Typesetting and setting Processing Tools up, or
editing existing ones.
I see $filename used there a bit,
What other options are there please? Obviously $basename, $suffix,
$directory as well.
I can look these up in Qt I suppose according to fileInfo.. as shown above.
Can these be combined with straight ascii/utf8 when editing
Edit/Preferences/Typesetting and setting Processing Tools?
And what other switches are built in please, good to know especially
when adding exotic toolsets to processing tools.
Paul
Tw obviously picks up the document name changes .tex to .pdf an endeavours
to scntex from source to that .pdf
So looking inside the generated
Paul
On 20 June 2011 11:40, Paul A Norman <paul.a.norman at gmail.com> wrote:
> Thanks for the suggestions Charlie,
>
> We have a reasonable mirroring operation in place covering both local
> and external storage.
>
> The reason for version numbering the documents is that it fits in with
> our local setup, and makes restoration of any lost text, through local
> diffing with Win-merge fast and effective, (opensource
> http://winmerge.org/ hopefully soon to be corss-platform
> https://bitbucket.org/grimmdp/winmerge ) .
>
> What I'm looking for is a way to tell TeXworks which pdf to use for
> syncing with the source text.
>
> Paul
>
>
>
> On 20 June 2011 11:27, Charlie Sharpsteen <chuck at sharpsteen.net> wrote:
> > On Sun, Jun 19, 2011 at 4:07 PM, Paul A Norman <paul.a.norman at gmail.com>
> wrote:
> >> Hi,
> >>
> >> For security of work, I both sync the files to storage(-s), and
> >> manually version number my .tex document(s) from time to time (one
> >> long monolithic) - not any version-ing on includes or like to worry
> >> about here.
> >>
> >> E.g.
> >>
> >> These-Fair-Isles-01.tex
> >> These-Fair-Isles-02.tex
> >> These-Fair-Isles-03.tex
> >>
> >> And use a document pre-header of ...
> >>
> >> %& -job-name=These-Fair-Isles
> >>
> >> Which nicely, under MiKTeX at least, makes the pdf as:
> >> These-Fair-Isles.pdf
> >> and keeps it that way no matter what my document name version number is.
> >>
> >> This means that the current document can always be linked to, and
> >> there is no obsolete .pdf garbage collection needed,
> >> i.e. no great list of These-Fair-Isles-01.pdf,
> >> These-Fair-Isles-02.pdf, These-Fair-Isles-03.pdf ... pdfs to be
> >> cleaned up later.
> >>
> >> (All the .aux files etc nicely show up for deletion on File/Remove Aux
> Files)
> >>
> >> Is there any setting I can put in the document to tell syntax to work
> >> on the document named in the top most header,
> >>
> >> %& -job-name=These-Fair-Isles
> >>
> >> Or is there a similar command line I can include in the top of the
> >> document's header, so that Tw synctex preview will work please?
> >>
> >> I.e. I would be working say at the moment in These-Fair-Isles-11.tex
> >> (or what ever)
> >> but always previewing and syncing to These-Fair-Isles.pdf
> >>
> >> Paul
> >
> > Have you considered using a version control system such as Git,
> > Mercurial or SVN? Then you would just have one copy,
> > These-Fair-Isles.tex, and the ability to rewind to any prior version.
> > Plus, distributed systems like Git and Mercurial offer even more
> > security of work by allowing you to easily mirror your documents
> > across multiple computers in case the proverbial bolt of lightning
> > strikes your main machine.
> >
> > -Charlie
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20110621/f3ec21ce/attachment.html>
More information about the texworks
mailing list