Hallo,
I want to convert my thesis (which I wrote in plain tex) to ConTeXt. Unfortunately the process fails because my documents contain some commutative diagrams made in Xypic. Is it possible to convert xy code to something that ConTeXt can understand?
Thanks,
Dirard
On 4/27/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
Hallo,
I want to convert my thesis (which I wrote in plain tex) to ConTeXt. Unfortunately the process fails because my documents contain some commutative diagrams made in Xypic. Is it possible to convert xy code to something that ConTeXt can understand?
Thanks,
Dirard
You can try this http://search.gmane.org/search.php?group=gmane.comp.tex.context&query=XY... There are exemples there.
Also in http://thread.gmane.org/gmane.comp.tex.context/5227/focus=5254 Save following line in m-xypic.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%% %m-xypic.tex % \input xy
\xyoption{all}
\unprotect
\appendtoks \xywithoption{tips}{\let\tipsize <at> <at> \bodyfontpoint}% \to\everybodyfont
\protect \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
And in you tex file put before \starttext \usemodule[xypic]
Hi all,
I created a m-xypic.tex file with the code that Luigi suggested. Then I tried to run texec on my file t.tex, but texec hangs with a message <xymatrix 4x2.
This is the code in t.tex
--- \usemodule[xypic] \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext ---
Dirard
* On 01/05/07 at 09:09 luigi scarso luigi.scarso@gmail.com wrote:
Also in http://thread.gmane.org/gmane.comp.tex.context/5227/focus=5254 Save following line in m-xypic.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%% %m-xypic.tex % \input xy
\xyoption{all}
\unprotect
\appendtoks \xywithoption{tips}{\let\tipsize <at> <at> \bodyfontpoint}% \to\everybodyfont
\protect \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
And in you tex file put before \starttext \usemodule[xypic]
-- luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
hmm, try this
\input xy \xyoption{all} \unprotect \appendtoks \xywithoption{tips}{\let\tipsize <at> <at> \bodyfontpoint}% \to\everybodyfont \protect %\endinput % \usemodule[xypic] \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
btw, not sure it works; something strange near W in your xymatrix
There seems to be something wrong with the dotted arrows. I tried different codes.
The following code compiles. --- \input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext ---
Dirard
* On 01/05/07 at 22:10 luigi scarso luigi.scarso@gmail.com wrote:
hmm, try this
\input xy \xyoption{all} \unprotect \appendtoks \xywithoption{tips}{\let\tipsize <at> <at> \bodyfontpoint}% \to\everybodyfont \protect %\endinput % \usemodule[xypic] \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
btw, not sure it works; something strange near W in your xymatrix -- luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
There seems to be something wrong with the dotted arrows. I tried different codes.
The following code compiles.
\input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
How doy you compile it under LaTeX (or TeX) ?
I save the following code in a file, say tt.tex. Then I just run texec tt.tex. It compiles. The problem is that the universal arrow is not displayed as it should; i.e. a dotted arrow.
--- \input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext ---
Dirard
* On 02/05/07 at 11:30 luigi scarso luigi.scarso@gmail.com wrote:
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
There seems to be something wrong with the dotted arrows. I tried different codes.
The following code compiles.
\input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
How doy you compile it under LaTeX (or TeX) ?
luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
I save the following code in a file, say tt.tex. Then I just run texec tt.tex.
yes, ok How did you used to compile it under LaTeX ? (sorry, I don't use latex from a long time)
I don't use LaTeX either. This code comes from my thesis which I wrote in plain TeX.
Save the following code in a file: -- \input xy \xyoption{all} \xyoption{dvips} $$ \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } $$ \bye -- Then run tex file.
Dirard
* On 02/05/07 at 17:06 luigi scarso luigi.scarso@gmail.com wrote:
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
I save the following code in a file, say tt.tex. Then I just run texec tt.tex.
yes, ok How did you used to compile it under LaTeX ? (sorry, I don't use latex from a long time)
-- luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
I don't use LaTeX either. This code comes from my thesis which I wrote in plain TeX.
Save the following code in a file:
\input xy \xyoption{all} \xyoption{dvips} $$ \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } $$ \bye -- Then run tex file.
ok, thanks. I will look into this night
hmm, some problem with \ar@. Maybe a collision with another macro of context. I will investigate
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
I save the following code in a file, say tt.tex. Then I just run texec tt.tex. It compiles. The problem is that the universal arrow is not displayed as it should; i.e. a dotted arrow.
\input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
%% %% put a space between \ar and @ %% \input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar @{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
Maybe there is a clean solution.
Luigi,
It works!
Grazie mille,
Dirard
* On 04/05/07 at 02:40 luigi scarso luigi.scarso@gmail.com wrote:
On 5/2/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
I save the following code in a file, say tt.tex. Then I just run texec tt.tex. It compiles. The problem is that the universal arrow is not displayed as it should; i.e. a dotted arrow.
\input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar@{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
%% %% put a space between \ar and @ %% \input xy \xyoption{all} \starttext \startformula \xymatrix{ & W \ar[dr]^{f_2} \ar @{.>}[d]_{f} \ar[dl]_{f_1} &&\ X & X \times Y \ar[l]_{p_1} \ar[r]^{p_2} & Y } \stopformula \stoptext
Maybe there is a clean solution.
-- luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 5/4/07, Dirard Mikdad dmikdad@math.leidenuniv.nl wrote:
Luigi,
It works!
I'm not so sure about this, if I have time I will give a closer look.
BTW, the safest way actually is to made your xy-diagrams in pdftex as singles figure and then import in context using \externalfigure. With a bit of TeX programming, you can also made a pdf that contains exactly a xy-diagram (ie width and height are those of xy-diagram no letter or a4) so that inclusion in context is nicer.
luigi
Also, have a look at http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/metaobj It seems that it has the same power of XY-pic .
Ok, I will do that.
Thnx,
Dirard * On 14/05/07 at 11:34 luigi scarso luigi.scarso@gmail.com wrote:
Also, have a look at http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/metaobj It seems that it has the same power of XY-pic . -- luigi
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________