I have a finished mkii project and I’d like to be able to export it to a format that can be a start for other distributions (such as epub or the like). For this, I get the impression I need mkiv. Now, before I go on trying to move my project to mkiv I have a question. Can I run mkii and mkiv side by side? That is, if I configure my TeX setup for mkiv (I am using MacTeX 2014), can I still fall back to the old setup when I fail? Second, is there some step-by-step instruction to move a project from mkii to mkiv? G
Hi Gerben, Indeed this is possible to use mkii and mkiv side by side. In particular if you use TeXShop, it is enough to say at the beginning of your TeX file %!TEX TS-program = mkii or %!TEX TS-program = mkiv where it is assumed that you have created two files named mkii.engine and mkiv.engine located in the directory ~/Library/TeXShop/Engines For instance my file mkii.engine contains the following lines: #!/bin/bash source /Volumes/OK/context-minimal/tex/setuptex texexec --autogenerate --synctex=1 "$1" where /Volumes/OK/context-minimal/tex/setuptex is the path to the file setuptex in my Context standalone directory. Best regards: OK
On 21 Jan 2015, at 00:36, Gerben Wierda
wrote: I have a finished mkii project and I’d like to be able to export it to a format that can be a start for other distributions (such as epub or the like). For this, I get the impression I need mkiv.
Now, before I go on trying to move my project to mkiv I have a question. Can I run mkii and mkiv side by side? That is, if I configure my TeX setup for mkiv (I am using MacTeX 2014), can I still fall back to the old setup when I fail?
Second, is there some step-by-step instruction to move a project from mkii to mkiv?
G ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hi Otared and Gerben, I do not know which version of TeXShop you are using but the more recent ones have Engines for ConTeXt, already. If they are not already installed you can find them in: ~/Libraries/TeXShop/Engines/Inactive just more the Contex( LuaTeX).engine into Engines and restart TeXShop. Here is the engine definition for MacTeX 2014 (TeXLive) #!/bin/tcsh # Before using this engine, you must run the following command once in Terminal: luatools --generate set path= ($path /usr/texbin /usr/local/bin) mtxrun --script context --autogenerate --synctex=1 "$1"
Am 21.01.2015 um 12:08 schrieb Otared Kavian
: Hi Gerben, [snip, snip] For instance my file mkii.engine contains the following lines:
#!/bin/bash source /Volumes/OK/context-minimal/tex/setuptex texexec --autogenerate --synctex=1 "$1" No need to Source setuptex. Just set the Path to your ConTeXt Standalone directory The setuptex script is a multi-platform script to setup the paths!
where /Volumes/OK/context-minimal/tex/setuptex is the path to the file setuptex in my Context standalone directory.
Best regards: OK
regards Keith.
Hi Keith, Thanks for your attention. Indeed I use the latest TeXShop (version 3.49) but regarding the content my mkii.engine file if I remove the line source /Volumes/OK/context-minimal/tex/setuptex then I cannot typeset with my standalone installation of Context: I tried to use a set path such as set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin) but I get an error message telling me: /Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: syntax error near unexpected token `(' /Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: `set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin)’ So at this point I have to keep the instruction to source the setuptex file in order to typeset either with mkii or mkiv, using the standalone Context. Best regards: OK
On 21 Jan 2015, at 12:55, Keith Schultz
wrote: Hi Otared and Gerben,
I do not know which version of TeXShop you are using but the more recent ones have Engines for ConTeXt, already.
If they are not already installed you can find them in: ~/Libraries/TeXShop/Engines/Inactive
just more the Contex( LuaTeX).engine into Engines and restart TeXShop.
Here is the engine definition for MacTeX 2014 (TeXLive) #!/bin/tcsh
# Before using this engine, you must run the following command once in Terminal: luatools --generate
set path= ($path /usr/texbin /usr/local/bin) mtxrun --script context --autogenerate --synctex=1 "$1"
Am 21.01.2015 um 12:08 schrieb Otared Kavian
: Hi Gerben, [snip, snip] For instance my file mkii.engine contains the following lines:
#!/bin/bash source /Volumes/OK/context-minimal/tex/setuptex texexec --autogenerate --synctex=1 "$1" No need to Source setuptex. Just set the Path to your ConTeXt Standalone directory The setuptex script is a multi-platform script to setup the paths!
where /Volumes/OK/context-minimal/tex/setuptex is the path to the file setuptex in my Context standalone directory.
Best regards: OK
regards Keith. ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hi Otared, actually, just setting the PATH variable will work, but you have to set it with the proper command! The Standard TexShop engines use the tcsh shell and not bash !! either change the first line to #!/bin/tcsh or set the path bash style export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH I put the standard PATH behind the minimals path so that it is searched first! regards Keith
Am 21.01.2015 um 13:48 schrieb Otared Kavian
: Hi Keith,
Thanks for your attention. Indeed I use the latest TeXShop (version 3.49) but regarding the content my mkii.engine file if I remove the line
source /Volumes/OK/context-minimal/tex/setuptex
then I cannot typeset with my standalone installation of Context: I tried to use a set path such as
set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin)
but I get an error message telling me:
/Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: syntax error near unexpected token `(' /Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: `set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin)’
So at this point I have to keep the instruction to source the setuptex file in order to typeset either with mkii or mkiv, using the standalone Context.
Best regards: OK
Hi Keith, I got it! With the proper setting of paths it works without sourcing setuptex. Thus I have for my installation of mkii: ---------------------------------------------- #!/bin/bash export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH texexec --autogenerate --synctex=1 "$1" ---------------------------------------------- Many thanks again! Best regards: OK
On 21 Jan 2015, at 14:31, Keith J. Schultz
wrote: Hi Otared,
actually, just setting the PATH variable will work, but you have to set it with the proper command!
The Standard TexShop engines use the tcsh shell and not bash !!
either change the first line to #!/bin/tcsh
or set the path bash style export PATH=/Volumes/OK/context-minimal/tex/texmf-osx-64/bin:$PATH
I put the standard PATH behind the minimals path so that it is searched first!
regards Keith
Am 21.01.2015 um 13:48 schrieb Otared Kavian
mailto:otared@gmail.com>: Hi Keith,
Thanks for your attention. Indeed I use the latest TeXShop (version 3.49) but regarding the content my mkii.engine file if I remove the line
source /Volumes/OK/context-minimal/tex/setuptex
then I cannot typeset with my standalone installation of Context: I tried to use a set path such as
set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin)
but I get an error message telling me:
/Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: syntax error near unexpected token `(' /Users/kavian/Library/TeXShop/Engines/mkii.engine: line 3: `set path = ($path /Volumes/OK/context-minimal/tex/texmf-osx-64/bin)’
So at this point I have to keep the instruction to source the setuptex file in order to typeset either with mkii or mkiv, using the standalone Context.
Best regards: OK
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
I don’t use TeXShop for these projects. I use a separate editor in a shell and a Makefile (very old-fashioned). The Makefile contains stuff like:
OPEN=echo
MODE=--mode=standalone
ONCE=
.SUFFIXES: .pdf .tex .open
.pdf.open:
open $<
.tex.pdf:
texexec --pdf ${MODE} ${ONCE} $<
once:
make ONCE="--once" book-open
full:
make ONCE="" book-open
prd_book.pdf: ${PRODUCTSDIR}/prd_book.tex ${ENVDIR}/env_cataoia.tex \
$(TEXS) $(BOOKIMAGES) /Users/gerben/Library/texmf/bibtex/bib/gwierda.bib
make MODE="--mode=editor" ONCE="${ONCE}" ${PRODUCTSDIR}/prd_book.pdf
I can do a quick compile with 'make once' and a full compile with 'make full’. And if I compile a separate chapter file it ends up being compiled differently from compiling a full book (e.g. the endnotes and bibliography end up at the end of the chapter) so I can work on separate chapters.
luna:chapters gerben$ make -n c_loosely.pdf
texexec --pdf --mode=standalone c_loosely.tex
luna:chapters gerben$ make -n prd_book.pdf
make MODE="--mode=editor" ONCE="" ../products/prd_book.pdf
The latter turns into
texexec --pdf --mode=editor ../products/prd_book.tex
And the environment file has:
\startmode[standalone]
\setupfootertexts[pagenumber][{\jobname->\filename{\currentcomponent}}]
\def\maybeendnotes
{\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography}
\switchtobodyfont[9pt]
\placepublications[criterium=all]}
\appendtoks \maybeendnotes \to \everystoptext
\stopmode
So, what would be easiest for me if I know what commend to use instead of the texexec command.
G
On 21 Jan 2015, at 12:55, Keith Schultz
Hi Otared and Gerben,
I do not know which version of TeXShop you are using but the more recent ones have Engines for ConTeXt, already.
If they are not already installed you can find them in: ~/Libraries/TeXShop/Engines/Inactive
just more the Contex( LuaTeX).engine into Engines and restart TeXShop.
Here is the engine definition for MacTeX 2014 (TeXLive) #!/bin/tcsh
# Before using this engine, you must run the following command once in Terminal: luatools --generate
set path= ($path /usr/texbin /usr/local/bin) mtxrun --script context --autogenerate --synctex=1 "$1"
Am 21.01.2015 um 12:08 schrieb Otared Kavian
: Hi Gerben, [snip, snip] For instance my file mkii.engine contains the following lines:
#!/bin/bash source /Volumes/OK/context-minimal/tex/setuptex texexec --autogenerate --synctex=1 "$1" No need to Source setuptex. Just set the Path to your ConTeXt Standalone directory The setuptex script is a multi-platform script to setup the paths!
where /Volumes/OK/context-minimal/tex/setuptex is the path to the file setuptex in my Context standalone directory.
Best regards: OK
regards Keith. ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 26.01.2015 um 17:19 schrieb Gerben Wierda
: […]
So, what would be easiest for me if I know what commend to use instead of the texexec command.
You can use context <filename> to process your document with MkIV and context —pdftex <filename> to process your document with MkII. As you can see all you have to do is to replace texexec with the context command. You can also force from within your document when you add % engine=pdftex as first line of your document. Wolfgang
Hi Gerben, I would not say old-fasshoined , but old school. Wolgang said to use context, but that is just a script that calls mtxrun! So you can use: mtxrun —script context for other options look for: tool-mkiv.pdf I am sure your makefiles are more complex. regards Keith.
Am 26.01.2015 um 17:19 schrieb Gerben Wierda
: I don’t use TeXShop for these projects. I use a separate editor in a shell and a Makefile (very old-fashioned). The Makefile contains stuff like:
OPEN=echo MODE=--mode=standalone ONCE=
.SUFFIXES: .pdf .tex .open
.pdf.open: open $<
.tex.pdf: texexec --pdf ${MODE} ${ONCE} $<
once: make ONCE="--once" book-open
full: make ONCE="" book-open
prd_book.pdf: ${PRODUCTSDIR}/prd_book.tex ${ENVDIR}/env_cataoia.tex \ $(TEXS) $(BOOKIMAGES) /Users/gerben/Library/texmf/bibtex/bib/gwierda.bib make MODE="--mode=editor" ONCE="${ONCE}" ${PRODUCTSDIR}/prd_book.pdf
I can do a quick compile with 'make once' and a full compile with 'make full’. And if I compile a separate chapter file it ends up being compiled differently from compiling a full book (e.g. the endnotes and bibliography end up at the end of the chapter) so I can work on separate chapters.
luna:chapters gerben$ make -n c_loosely.pdf texexec --pdf --mode=standalone c_loosely.tex luna:chapters gerben$ make -n prd_book.pdf make MODE="--mode=editor" ONCE="" ../products/prd_book.pdf
The latter turns into
texexec --pdf --mode=editor ../products/prd_book.tex
And the environment file has:
\startmode[standalone] \setupfootertexts[pagenumber][{\jobname->\filename{\currentcomponent}}] \def\maybeendnotes {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography} \switchtobodyfont[9pt] \placepublications[criterium=all]} \appendtoks \maybeendnotes \to \everystoptext \stopmode
So, what would be easiest for me if I know what commend to use instead of the texexec command.
G [snip, snip]
On 26 Jan 2015, at 19:51, Keith Schultz
Hi Gerben,
I would not say old-fasshoined , but old school.
Wolgang said to use context, but that is just a script that calls mtxrun!
So you can use:
mtxrun —script context
for other options look for:
tool-mkiv.pdf
Is that part of MacTeX? Or do I need to download a separate ConTeXt somewhere and install it somewhere in the texlive directory structure? G
I am sure your makefiles are more complex.
regards Keith.
Am 26.01.2015 um 17:19 schrieb Gerben Wierda
: I don’t use TeXShop for these projects. I use a separate editor in a shell and a Makefile (very old-fashioned). The Makefile contains stuff like:
OPEN=echo MODE=--mode=standalone ONCE=
.SUFFIXES: .pdf .tex .open
.pdf.open: open $<
.tex.pdf: texexec --pdf ${MODE} ${ONCE} $<
once: make ONCE="--once" book-open
full: make ONCE="" book-open
prd_book.pdf: ${PRODUCTSDIR}/prd_book.tex ${ENVDIR}/env_cataoia.tex \ $(TEXS) $(BOOKIMAGES) /Users/gerben/Library/texmf/bibtex/bib/gwierda.bib make MODE="--mode=editor" ONCE="${ONCE}" ${PRODUCTSDIR}/prd_book.pdf
I can do a quick compile with 'make once' and a full compile with 'make full’. And if I compile a separate chapter file it ends up being compiled differently from compiling a full book (e.g. the endnotes and bibliography end up at the end of the chapter) so I can work on separate chapters.
luna:chapters gerben$ make -n c_loosely.pdf texexec --pdf --mode=standalone c_loosely.tex luna:chapters gerben$ make -n prd_book.pdf make MODE="--mode=editor" ONCE="" ../products/prd_book.pdf
The latter turns into
texexec --pdf --mode=editor ../products/prd_book.tex
And the environment file has:
\startmode[standalone] \setupfootertexts[pagenumber][{\jobname->\filename{\currentcomponent}}] \def\maybeendnotes {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography} \switchtobodyfont[9pt] \placepublications[criterium=all]} \appendtoks \maybeendnotes \to \everystoptext \stopmode
So, what would be easiest for me if I know what commend to use instead of the texexec command.
G [snip, snip]
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hi Gerben, Sorry, one typo! The file is tools-mkiv.pdf. It is not in the MacTeX distribution! You get it with Standalone, I normally use that! But you can get it at: http://www.pragma-ade.nl/general/manuals/tools-mkiv.pdf http://www.pragma-ade.nl/general/manuals/tools-mkiv.pdf regards Keith.
Am 26.01.2015 um 22:49 schrieb Gerben Wierda
: On 26 Jan 2015, at 19:51, Keith Schultz
mailto:keithjschultz@icloud.com> wrote: Hi Gerben,
I would not say old-fasshoined , but old school.
Wolgang said to use context, but that is just a script that calls mtxrun!
So you can use:
mtxrun —script context
for other options look for:
tool-mkiv.pdf
Is that part of MacTeX? Or do I need to download a separate ConTeXt somewhere and install it somewhere in the texlive directory structure?
[snip, snip]
I have a standard ConTeXt project setup (products, environment, chapters subdirectory). In the chapters subdirectory there is a Makefile. I’ve just installed mkiv. Can someone tell me what I need to change in this Makefile to compile my project with mkiv instead of mkii?
OPEN=echo
MODE=--mode=standalone
ONCE=
.SUFFIXES: .pdf .tex .open
.pdf.open:
open $<
.tex.pdf:
texexec --pdf ${MODE} ${ONCE} $<
IMAGEDIR=../images
MPDIR=../mp
PRODUCTSDIR=../products
ENVDIR=../environments
TEXS=c_loosely.tex c_inconvenient.tex c_chess.tex c_goals.tex \
c_orthodoxy.tex c_model.tex c_future.tex c_logic.tex \
c_psatemplate.tex c_fsatemplate.tex c_introduction.tex \
c_hurdles.tex c_bibliography.tex c_current.tex c_intermezzo.tex \
c_cloud.tex
OPENS=c_loosely.open c_inconvenient.open c_chess.open c_goals.open \
c_orthodoxy.open c_model.open c_future.open c_logic.open \
c_fsatemplate.open c_psatemplate.open c_introduction.open \
c_hurdles.open c_bibliography.open c_current.open c_intermezzo.open \
c_cloud.open
PDFS=c_loosely.pdf c_inconvenient.pdf c_chess.pdf c_goals.pdf \
c_orthodoxy.pdf c_model.pdf c_future.pdf c_logic.pdf \
c_fsatemplate.pdf c_psatemplate.pdf c_introduction.pdf \
c_hurdles.pdf c_bibliography.pdf c_current.pdf c_intermezzo.pdf \
c_cloud.pdf
BOOKIMAGES=${IMAGEDIR}/ChessAndTheArtOfEA-ImagesBook.001.jpg \
${IMAGEDIR}/ChessAndTheArtOfEA-ImagesBook.002.jpg \
${IMAGEDIR}/ChessAndTheArtOfEA-ImagesBook.003.jpg \
${IMAGEDIR}/ChessAndTheArtOfEA-ImagesBook.004.jpg \
${IMAGEDIR}/psaprince2positioning.pdf \
${IMAGEDIR}/eapsapositioning.pdf \
${IMAGEDIR}/psaprocess.pdf
#.PHONY: $(OPENS)
default:
make once
rebuild: reset
make full
once:
make ONCE="--once" book-open
full:
make ONCE="" book-open
all: $(PDFS)
clean:
rm -f %*
reset:
rm -f *.bbl *.aux *.log *.tmp *.tui *.tuo *.mp *.blg *.top
realclean: clean reset
all-open: $(OPENS)
book-open: book
open prd_book.pdf
book: prd_book.pdf
prd_book.pdf: ${PRODUCTSDIR}/prd_book.tex ${ENVDIR}/env_cataoia.tex \
$(TEXS) $(BOOKIMAGES) /Users/gerben/Library/texmf/bibtex/bib/gwierda.bib
make MODE="--mode=editor" ONCE="${ONCE}" ${PRODUCTSDIR}/prd_book.pdf
On 27 Jan 2015, at 13:06, Keith J. Schultz
Hi Gerben,
Sorry, one typo! The file is tools-mkiv.pdf.
It is not in the MacTeX distribution! You get it with Standalone, I normally use that!
But you can get it at: http://www.pragma-ade.nl/general/manuals/tools-mkiv.pdf
regards Keith.
Am 26.01.2015 um 22:49 schrieb Gerben Wierda
: On 26 Jan 2015, at 19:51, Keith Schultz
wrote: Hi Gerben,
I would not say old-fasshoined , but old school.
Wolgang said to use context, but that is just a script that calls mtxrun!
So you can use:
mtxrun —script context
for other options look for:
tool-mkiv.pdf
Is that part of MacTeX? Or do I need to download a separate ConTeXt somewhere and install it somewhere in the texlive directory structure?
[snip, snip]
___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Mon, 23 Feb 2015, Gerben Wierda wrote:
I have a standard ConTeXt project setup (products, environment, chapters subdirectory). In the chapters subdirectory there is a Makefile. I’ve just installed mkiv. Can someone tell me what I need to change in this Makefile to compile my project with mkiv instead of mkii?
.tex.pdf: texexec --pdf ${MODE} ${ONCE} $<
Change `texexec --pdf` to `context` Aditya
Hi Gerben, Mkii and Mkiv are to different animals and live side by side. You do not need to change your TeX setup at all! All you need to do is change the call to start the processing. Mkiv can be called with the context … or mtxrun -script context … What I do not know is in what kind of „environment you are working in. MacOS or Terminal, or Xquartz( aka X11), because you could even install ConTeXt Standalone! and us it all of them side by side! If you use the Standalone you need to setup the Paths properly though. There is a shell script that helps with this if you are working directly in the „Unix“- environment. If you use TeXShop, it is easy enough, just switch the Engine in the editor. and typeset!! For TexWorks it should be similiar. I do not believe there are step by step instructions for going from mkii to mkiv. To my knowledge most mkii code should run under mkiv! Yet, you can do many things easier in mkiv than in mkii! But, I think you know one step: make a copy of your project and work on that!! ;)) Hope this helps Keith
Am 21.01.2015 um 00:36 schrieb Gerben Wierda
: I have a finished mkii project and I’d like to be able to export it to a format that can be a start for other distributions (such as epub or the like). For this, I get the impression I need mkiv.
Now, before I go on trying to move my project to mkiv I have a question. Can I run mkii and mkiv side by side? That is, if I configure my TeX setup for mkiv (I am using MacTeX 2014), can I still fall back to the old setup when I fail?
Second, is there some step-by-step instruction to move a project from mkii to mkiv?
G ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (6)
-
Aditya Mahajan
-
Gerben Wierda
-
Keith J. Schultz
-
Keith Schultz
-
Otared Kavian
-
Wolfgang Schuster