[texworks] Document Version-ing and synctex Previewing
Paul A Norman
paul.a.norman at gmail.com
Wed Jun 22 11:56:39 CEST 2011
This is what foxed me, these $fullname variables are not in the manual
but in the wiki and it is referenced at the back of the manual under
Beyond this Manual which points to
Is it worth having some of this stuff (or the stable elements of it)
directly in the manual perhaps, or Table of contents pointing to even
just the links, and in the index?
On 21 June 2011 14:20, Paul A Norman <paul.a.norman at gmail.com> wrote:
> 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
> .. 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
> if (!synctexSupported)
> args.replaceInStrings("$synctexoption", "-synctex=1");
> args.replaceInStrings("$fullname", fileInfo.fileName());
> args.replaceInStrings("$suffix", fileInfo.suffix());
> 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.
> 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
> 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.
>> 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
More information about the texworks