summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/workflows
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-06-16 16:00:40 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-06-16 16:00:40 +0200
commit008292817580eba8a0f0cf83d8e2d08df8fc8c3f (patch)
tree7e47d035cc5d1f54d20f556476c439844f1956e0 /doc/context/sources/general/manuals/workflows
parent5e668aa418d6d082446e9369ae06625b50e49943 (diff)
downloadcontext-008292817580eba8a0f0cf83d8e2d08df8fc8c3f.tar.gz
2017-06-15 22:16:00
Diffstat (limited to 'doc/context/sources/general/manuals/workflows')
-rw-r--r--doc/context/sources/general/manuals/workflows/workflows-synctex.tex38
1 files changed, 23 insertions, 15 deletions
diff --git a/doc/context/sources/general/manuals/workflows/workflows-synctex.tex b/doc/context/sources/general/manuals/workflows/workflows-synctex.tex
index d275c5d48..1ede3c2e4 100644
--- a/doc/context/sources/general/manuals/workflows/workflows-synctex.tex
+++ b/doc/context/sources/general/manuals/workflows/workflows-synctex.tex
@@ -4,27 +4,29 @@
\startcomponent workflows-xml
-\startchapter[title=Synctex]
+\logo [SYNCTEX] {Sync\TeX}
+
+\startchapter[title=\SYNCTEX]
\startsection[title=Introduction]
-Some users like the synctex feature that is built in the \TEX\ engines.
+Some users like the \SYNCTEX\ feature that is built in the \TEX\ engines.
Personally I never use it because it doesn't work well with the kind of documents
I maintain. If you have one document source, and don't shuffle around (reuse)
text too much it probably works out okay but that is not our practice. Here I
-will describe how you can enable a more \CONTEXT\ specific synctex support so
+will describe how you can enable a more \CONTEXT\ specific \SYNCTEX\ support so
that aware \PDF\ viewers can bring you back to the source.
\stopsection
\startsection[title=What we want]
-The synctex method roughly works as follows. Internally \TEX\ constricts linked
+The \SYNCTEX\ method roughly works as follows. Internally \TEX\ constricts linked
lists of glyphs, kerns, glue, boxes, rules etc. These elements are called nodes.
Some nodes carry information about the file and line where they were created. In
the backend this information gets somehow translated in a (sort of) verbose tree
that describes the makeup in terms of boxes, glue and kerns. From that
-information the synctex parser library, hooked into a pdf viewer, can go back
+information the \SYNCTEX\ parser library, hooked into a \PDF\ viewer, can go back
from a position on the screen to a line in a file. One would expect this to be a
relative simple rectangle based model, but as far as I can see it's way more
complex than that. There are some comments that \CONTEXT\ is not supported well
@@ -36,7 +38,7 @@ mechanism geared for a macro package like \LATEX.
Because we have a couple of users who need to edit complex sets of documents,
coded in \TEX\ or \XML, I decided to come up with a variant that doesn't use the
-synctex machinery but manipulates the few synctex fields directly \footnote {This
+\SYNCTEX\ machinery but manipulates the few \SYNCTEX\ fields directly \footnote {This
is something that in my opinion should have been possible right from the start
but it's too late now to change the system and it would not be used beyond
\CONTEXT\ anyway.} and eventually outputs a straightforward file for the editor.
@@ -58,14 +60,14 @@ editor} are the following:
\startitem
Users should not be able to reach environments (styles) and other files
loaded from the (normally read|-|only) \TEX\ tree, like modules. We don't
- want accidental changed in such files.
+ want accidental changes in such files.
\stopitem
\startitem
We not only have \TEX\ files but also \XML\ files and these can normally
- flushed in rather arbitrary ways. Although the concept of lines is sort of
+ flush in rather arbitrary ways. Although the concept of lines is sort of
lost in such a file, there is still a relation between lines and the snippets
- that make of the content of an \XML\ node.
+ that make out the content of an \XML\ node.
\stopitem
\startitem
@@ -85,12 +87,12 @@ editor} are the following:
It is unavoidable that we get more run time but I assume that for the average user
that is no big deal. It pays off when you have a workflow when a book (or even a
chapter in a book) is generated from hundreds of small \XML\ files. There is no
-overhead when synctex is not used.
+overhead when \SYNCTEX\ is not used.
-In \CONTEXT\ we don't use the built|-|in synctex features, that is: we let
+In \CONTEXT\ we don't use the built|-|in \SYNCTEX\ features, that is: we let
filename and line numbers be set but often these are overloaded explicitly. The
output file is not compressed and constructed by \CONTEXT. There is no benefit in
-compression and the files are probably smaller than default synctex anyway.
+compression and the files are probably smaller than default \SYNCTEX\ anyway.
\stopsection
@@ -109,7 +111,13 @@ speed up processing when needed. This command can also be given in an environmen
(style). On the command line you can say
\starttyping
-context --synctex=context somefile.tex
+context --synctex somefile.tex
+\stoptyping
+
+A third method is to put this at the top of your file:
+
+\starttyping
+% synctex=yes
\stoptyping
Often an \XML\ files is very structured and although probably the main body of
@@ -117,7 +125,7 @@ text is flushed as a stream, specific elements can be flushed out of order. In
educational documents flushing for instance answers to exercises can happen out of
order. In that case we still need to make sure that we go to the right spot in
the file. It will never be 100\% perfect but it's better than nothing. The
-above command will also enable \XML support.
+above command will also enable \XML\ support.
If you don't want a file to be accessed, you can block it:
@@ -168,7 +176,7 @@ Don't turn on this feature when you don't need it. This is one of those mechanis
that hits performance badly.
Depending on needs the functionality can be improved and|/|or extended. Of course
-you can always use the traditional synctex method but don't expect it to behave
+you can always use the traditional \SYNCTEX\ method but don't expect it to behave
as described here.
\stopsection