Discussion:
[OS X TeX] How to make a original latexmk.engine for TeXShop
军其 胡
2018-10-19 12:14:34 UTC
Permalink
Bonjour, all in the list,

I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?

Bien à vous,

Jun-Qi HU
Herbert Schulz
2018-10-19 13:28:19 UTC
Permalink
Post by 军其 胡
Bonjour, all in the list,
I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?
Bien à vous,
Jun-Qi HU
Howdy,

TeXShop's latexmk engines read rc files for each particular version of the engines. Those files are located in the ~/Library/TeXShop/bin/tslatexmk folder and should NOT be changed since an update to TeXShop could overwrite them. In addition, after the very first run of any of the latexmk engines there is an editable file, latexmkrcedit, created in the ~/Library/TeXShop/bin folder, which can be edited and will NOT be overwritten. That file is read by all of the latexmk engines. Finally, every project can have a platexmkrc file in the same folder as the project's files. It will be used for the typesetting of any .tex file in that folder using one of the latexmk engines. The order of reading the files is latexmkrcedit, the specific latexmkrc for that engine and finally the platexmkrc file if it exists in the folder containing the typeset document. The order is important because the rc files can overwrite changes made by a previously read rc file.

If you wish you can duplicate one of the engine files and give it a new name, e.g., mylatexmk.engine. Then edit that engine file to read a personal rc file with a special name, e.g., mylatexmkrc, instead of the one named after the ${TSBIN} in the engine. Finally place your rc file, named, e.g. mylatexmkrc, in ~/Library/TeXShop/bin/tslatexmk where it will be called.

Hope this helps.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/
Herbert Schulz
2018-10-19 13:49:02 UTC
Permalink
Post by Herbert Schulz
Post by 军其 胡
Bonjour, all in the list,
I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?
Bien à vous,
Jun-Qi HU
Howdy,
TeXShop's latexmk engines read rc files for each particular version of the engines. Those files are located in the ~/Library/TeXShop/bin/tslatexmk folder and should NOT be changed since an update to TeXShop could overwrite them. In addition, after the very first run of any of the latexmk engines there is an editable file, latexmkrcedit, created in the ~/Library/TeXShop/bin folder, which can be edited and will NOT be overwritten. That file is read by all of the latexmk engines. Finally, every project can have a platexmkrc file in the same folder as the project's files. It will be used for the typesetting of any .tex file in that folder using one of the latexmk engines. The order of reading the files is latexmkrcedit, the specific latexmkrc for that engine and finally the platexmkrc file if it exists in the folder containing the typeset document. The order is important because the rc files can overwrite changes made by a previously read rc file.
If you wish you can duplicate one of the engine files and give it a new name, e.g., mylatexmk.engine. Then edit that engine file to read a personal rc file with a special name, e.g., mylatexmkrc, instead of the one named after the ${TSBIN} in the engine. Finally place your rc file, named, e.g. mylatexmkrc, in ~/Library/TeXShop/bin/tslatexmk where it will be called.
Hope this helps.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,

An alternative is to simply duplicate one of the latexmk engines and edit everything out leaving only the line

latexmk ${1}

which should read your ~/latexmkrc file by default. You won't need any of the rc files mentioned before.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://e
Herbert Schulz
2018-10-19 13:58:32 UTC
Permalink
Post by Herbert Schulz
Post by Herbert Schulz
Post by 军其 胡
Bonjour, all in the list,
I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?
Bien à vous,
Jun-Qi HU
Howdy,
TeXShop's latexmk engines read rc files for each particular version of the engines. Those files are located in the ~/Library/TeXShop/bin/tslatexmk folder and should NOT be changed since an update to TeXShop could overwrite them. In addition, after the very first run of any of the latexmk engines there is an editable file, latexmkrcedit, created in the ~/Library/TeXShop/bin folder, which can be edited and will NOT be overwritten. That file is read by all of the latexmk engines. Finally, every project can have a platexmkrc file in the same folder as the project's files. It will be used for the typesetting of any .tex file in that folder using one of the latexmk engines. The order of reading the files is latexmkrcedit, the specific latexmkrc for that engine and finally the platexmkrc file if it exists in the folder containing the typeset document. The order is important because the rc files can overwrite changes made by a previously read rc file.
If you wish you can duplicate one of the engine files and give it a new name, e.g., mylatexmk.engine. Then edit that engine file to read a personal rc file with a special name, e.g., mylatexmkrc, instead of the one named after the ${TSBIN} in the engine. Finally place your rc file, named, e.g. mylatexmkrc, in ~/Library/TeXShop/bin/tslatexmk where it will be called.
Hope this helps.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
An alternative is to simply duplicate one of the latexmk engines and edit everything out leaving only the line
latexmk ${1}
which should read your ~/latexmkrc file by default. You won't need any of the rc files mentioned before.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,

Sorry, that line should be

latexmk -pdfps "${1}"

NOT simply

latexmk ${1}

as stated before.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/
Herbert Schulz
2018-10-19 14:05:52 UTC
Permalink
Post by Herbert Schulz
Post by Herbert Schulz
Post by Herbert Schulz
Post by 军其 胡
Bonjour, all in the list,
I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?
Bien à vous,
Jun-Qi HU
Howdy,
TeXShop's latexmk engines read rc files for each particular version of the engines. Those files are located in the ~/Library/TeXShop/bin/tslatexmk folder and should NOT be changed since an update to TeXShop could overwrite them. In addition, after the very first run of any of the latexmk engines there is an editable file, latexmkrcedit, created in the ~/Library/TeXShop/bin folder, which can be edited and will NOT be overwritten. That file is read by all of the latexmk engines. Finally, every project can have a platexmkrc file in the same folder as the project's files. It will be used for the typesetting of any .tex file in that folder using one of the latexmk engines. The order of reading the files is latexmkrcedit, the specific latexmkrc for that engine and finally the platexmkrc file if it exists in the folder containing the typeset document. The order is important because the rc files can overwrite changes made by a previously read rc file.
If you wish you can duplicate one of the engine files and give it a new name, e.g., mylatexmk.engine. Then edit that engine file to read a personal rc file with a special name, e.g., mylatexmkrc, instead of the one named after the ${TSBIN} in the engine. Finally place your rc file, named, e.g. mylatexmkrc, in ~/Library/TeXShop/bin/tslatexmk where it will be called.
Hope this helps.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
An alternative is to simply duplicate one of the latexmk engines and edit everything out leaving only the line
latexmk ${1}
which should read your ~/latexmkrc file by default. You won't need any of the rc files mentioned before.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
Sorry, that line should be
latexmk -pdfps "${1}"
NOT simply
latexmk ${1}
as stated before.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,

And reading the documentation it will automatically read ~/.latexmkrc not ~/latexmkrc. If you wish to have it read ~/latexmkrc instead the command line should be

latexmk -pdfps -r "${HOME}/latexmkrc" "${1}"

rather than what was given before.

Sorry for all the additional comments.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailm
Herbert Schulz
2018-10-19 14:19:20 UTC
Permalink
Post by Herbert Schulz
Post by Herbert Schulz
Post by Herbert Schulz
Post by Herbert Schulz
Post by 军其 胡
Bonjour, all in the list,
I always call latexmk provided by MacTeX to compile my TeX-format file in Emacs.
Moreover, a latexmkrc would be created in every TeX projects by myself. It works well all times.
Today, I try to use latexmk.engine in TeXShop, I move latexmk.engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/latexmk.engine to ~/Library/TeXShop/Engines/.
After restarting TeXShop, I found it works but not like works as called in Emacs, even after I change platexmkrc to latexmkrc in latexmk.engine.
The latexmk mechanism in TeXShop is different from directly calling latexmk.
Does anyone know how to create a neat latexmk.engine for TeXshop which only calls the original latexmk and read latexmkrc from the root directory of the TeX project?
Bien à vous,
Jun-Qi HU
Howdy,
TeXShop's latexmk engines read rc files for each particular version of the engines. Those files are located in the ~/Library/TeXShop/bin/tslatexmk folder and should NOT be changed since an update to TeXShop could overwrite them. In addition, after the very first run of any of the latexmk engines there is an editable file, latexmkrcedit, created in the ~/Library/TeXShop/bin folder, which can be edited and will NOT be overwritten. That file is read by all of the latexmk engines. Finally, every project can have a platexmkrc file in the same folder as the project's files. It will be used for the typesetting of any .tex file in that folder using one of the latexmk engines. The order of reading the files is latexmkrcedit, the specific latexmkrc for that engine and finally the platexmkrc file if it exists in the folder containing the typeset document. The order is important because the rc files can overwrite changes made by a previously read rc file.
If you wish you can duplicate one of the engine files and give it a new name, e.g., mylatexmk.engine. Then edit that engine file to read a personal rc file with a special name, e.g., mylatexmkrc, instead of the one named after the ${TSBIN} in the engine. Finally place your rc file, named, e.g. mylatexmkrc, in ~/Library/TeXShop/bin/tslatexmk where it will be called.
Hope this helps.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
An alternative is to simply duplicate one of the latexmk engines and edit everything out leaving only the line
latexmk ${1}
which should read your ~/latexmkrc file by default. You won't need any of the rc files mentioned before.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
Sorry, that line should be
latexmk -pdfps "${1}"
NOT simply
latexmk ${1}
as stated before.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,
And reading the documentation it will automatically read ~/.latexmkrc not ~/latexmkrc. If you wish to have it read ~/latexmkrc instead the command line should be
latexmk -pdfps -r "${HOME}/latexmkrc" "${1}"
rather than what was given before.
Sorry for all the additional comments.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,

Ok, this is silly... Here's a simple latexmk engine (mylatexmk.engine --- rename it as you wish) that will read in ~/latexmkrc as you wish.
军其 胡
2018-10-19 15:30:16 UTC
Permalink
I think it's still not a good one, since it only read ~/latexmkrc.
But I want to make latexmk read $PROJECTDIR/latexmkrc.
Post by Herbert Schulz
Here's a simple latexmk engine (mylatexmk.engine --- rename it as you wish) that will read in ~/latexmkrc as you wish.
<mylatexmk.engine.zip>
Just unzip it, place it in ~/Library/TeXShop/Engines and restart TeXShop. It should then appear in the popup engine list on the Source file Toolbar (NOT under the Typeset menu.
I put the following lines into $PROJECTDIR/latexmkrc:
---------------------------------------------------------------------------------------
$pdflatex = 'xelatex -synctex=-1 %O %S';
$pdf_mode = 1;
$postscript_mode = 0;
$dvi_mode = 0;

add_cus_dep('adx', 'and', 0, 'makeadx2and');
sub makeadx2and {
system( "makeindex -o \"$_[0].and\" \"$_[0].adx\"" );
}

add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
sub makenlo2nls {
system( "makeindex \"$_[0].nlo\" -s nomencl.ist -o \"$_[0].nls\"" );
}
---------------------------------------------------------------------------------------
it always works well.
Post by Herbert Schulz
By the way, what special settings do you use that aren't properly set by the latexmk engine supplied with TeXShop?
Herbert Schulz
2018-10-19 15:49:42 UTC
Permalink
Post by 军其 胡
I think it's still not a good one, since it only read ~/latexmkrc.
But I want to make latexmk read $PROJECTDIR/latexmkrc.
Post by Herbert Schulz
Here's a simple latexmk engine (mylatexmk.engine --- rename it as you wish) that will read in ~/latexmkrc as you wish.
<mylatexmk.engine.zip>
Just unzip it, place it in ~/Library/TeXShop/Engines and restart TeXShop. It should then appear in the popup engine list on the Source file Toolbar (NOT under the Typeset menu.
---------------------------------------------------------------------------------------
$pdflatex = 'xelatex -synctex=-1 %O %S';
$pdf_mode = 1;
$postscript_mode = 0;
$dvi_mode = 0;
add_cus_dep('adx', 'and', 0, 'makeadx2and');
sub makeadx2and {
system( "makeindex -o \"$_[0].and\" \"$_[0].adx\"" );
}
add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
sub makenlo2nls {
system( "makeindex \"$_[0].nlo\" -s nomencl.ist -o \"$_[0].nls\"" );
}
---------------------------------------------------------------------------------------
it always works well.
Post by Herbert Schulz
By the way, what special settings do you use that aren't properly set by the latexmk engine supplied with TeXShop?
Howdy,

Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
军其 胡
2018-10-19 16:00:30 UTC
Permalink
Let me try.
Post by Herbert Schulz
Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
<mylatexmk.engine>
I assume you're using TeXShop to run the engine so I'd use
$pdflatex = 'xelatex -synctex=-1 --file-line-error %O %S';
in your $PROJECTDIR/latexmkrc file since TeXShop uses that information to find the file for the error in the log file.
I think the mechanism of latexmk is simple.
Through a custom latexmkrc, we can define many options, including LaTeX engine, PDF/DVI mode, using other utilities or not, etc.
One latexmk.engine is enough for all TeX engine.
Post by Herbert Schulz
You were talking about latex and I see you want to use xelatex. Try the xelatexmk engine along with a platexmkrc file and see if that works for you
军其 胡
2018-10-19 16:28:39 UTC
Permalink
The behavior of running latexmk in TeXShop is weird.
It seems that latexmk.engine would ignore to check the timestamps of the files in the TeX projects.
It is not like directly running latexmk in the bash shell because it would check timestamps.
For example, if you execute this following command
$ latexmk sam.tex
in bash shell once, the TeX-format files will be compiled.
If we don't modify anything in this TeX project, just run
$ latexmk sam.tex
again, it will give me the following information
---------------------------------------------------------------------------------------
Latexmk: This is Latexmk, John Collins, 7 August 2018, version: 4.59.
Latexmk: All targets (lnmpde.pdf) are up-to-date
---------------------------------------------------------------------------------------
I can't figure out what happened in TeXShop.
Post by Herbert Schulz
Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
<mylatexmk.engine>
I assume you're using TeXShop to run the engine so I'd use
$pdflatex = 'xelatex -synctex=-1 --file-line-error %O %S';
in your $PROJECTDIR/latexmkrc file since TeXShop uses that information to find the file for the error in the log file.
Herbert Schulz
2018-10-19 17:06:53 UTC
Permalink
Post by 军其 胡
The behavior of running latexmk in TeXShop is weird.
It seems that latexmk.engine would ignore to check the timestamps of the files in the TeX projects.
It is not like directly running latexmk in the bash shell because it would check timestamps.
For example, if you execute this following command
$ latexmk sam.tex
in bash shell once, the TeX-format files will be compiled.
If we don't modify anything in this TeX project, just run
$ latexmk sam.tex
again, it will give me the following information
---------------------------------------------------------------------------------------
Latexmk: This is Latexmk, John Collins, 7 August 2018, version: 4.59.
Latexmk: All targets (lnmpde.pdf) are up-to-date
---------------------------------------------------------------------------------------
I can't figure out what happened in TeXShop.
Post by Herbert Schulz
Ok, the following TeXShop engine also reads $PROJECTDIR/latexmkrc.
<mylatexmk.engine>
I assume you're using TeXShop to run the engine so I'd use
$pdflatex = 'xelatex -synctex=-1 --file-line-error %O %S';
in your $PROJECTDIR/latexmkrc file since TeXShop uses that information to find the file for the error in the log file.
Howdy,

Exactly the same behavior in TeXShop! If the files are up to date latexmk gives the same output. Are you sure you are having TeXShop use that engine?

First, how are you using the engine? You should have a line

% !TEX program = mylatexmk

(or whatever you call the engine) at the top of your file. Second, you typeset the document by using Typeset->Typeset (Cmd-T). Then TeXShop will execute the mylatexmk (or whatever…) engine.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/ma
军其 胡
2018-10-19 18:26:06 UTC
Permalink
Ok! Following your instructions, latexmk.engine DOES work. Although there are only two lines
-------------------------------
#!/bin/bash
latexmk "$1"
-------------------------------
in latexmk.engine.

I'm confused of the role of latexmk.engine in TeXShop.
When I use latexmk in Emacs, I only take it as the wrapped scripts instead of TeX engine.
In other words, latexmk always ignore the local file variable of Emacs in the TeX-format files when it is called in Emacs.
In fact, the TeX engine for latexmk is specified in latexmkrc.
However, by clicking latexmk button in TeXShop, latexmk.engine would also read the local file variable.
Post by Herbert Schulz
Howdy,
Exactly the same behavior in TeXShop! If the files are up to date latexmk gives the same output. Are you sure you are having TeXShop use that engine?
First, how are you using the engine? You should have a line
% !TEX program = mylatexmk
(or whatever you call the engine) at the top of your file. Second, you typeset the document by using Typeset->Typeset (Cmd-T). Then TeXShop will execute the mylatexmk (or whatever
) engine.
Herbert Schulz
2018-10-19 18:51:09 UTC
Permalink
Post by 军其 胡
Ok! Following your instructions, latexmk.engine DOES work. Although there are only two lines
-------------------------------
#!/bin/bash
latexmk "$1"
-------------------------------
in latexmk.engine.
I'm confused of the role of latexmk.engine in TeXShop.
When I use latexmk in Emacs, I only take it as the wrapped scripts instead of TeX engine.
In other words, latexmk always ignore the local file variable of Emacs in the TeX-format files when it is called in Emacs.
In fact, the TeX engine for latexmk is specified in latexmkrc.
However, by clicking latexmk button in TeXShop, latexmk.engine would also read the local file variable.
Post by Herbert Schulz
Howdy,
Exactly the same behavior in TeXShop! If the files are up to date latexmk gives the same output. Are you sure you are having TeXShop use that engine?
First, how are you using the engine? You should have a line
% !TEX program = mylatexmk
(or whatever you call the engine) at the top of your file. Second, you typeset the document by using Typeset->Typeset (Cmd-T). Then TeXShop will execute the mylatexmk (or whatever…) engine.
Howdy,

I sent an updated engine in a later email. Sorry about so many posts.

There are many extra dependencies that are already in the rc files associated with each of the TeXShop engines and they satisfy almost everyone's ordinary needs. If you have special needs for a given project you can always create a platexmkrc (the p is for project) in the same folder as the project. I use different engines for different documents and it's helpful for me to see that I'm using xelatex when I use the xelatexmk engine rather than a generic latexmk engine. The latexmk engine actually is set up to use latex->dvips->ps2pdf.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email
军其 胡
2018-10-19 19:11:06 UTC
Permalink
Probably, I understand what you explained.
I insist that the TeX engine for latexmk should specified in latexmkrc even for common users.

Thank you for your patience.
Post by Herbert Schulz
There are many extra dependencies that are already in the rc files associated with each of the TeXShop engines and they satisfy almost everyone's ordinary needs. If you have special needs for a given project you can always create a platexmkrc (the p is for project) in the same folder as the project. I use different engines for different documents and it's helpful for me to see that I'm using xelatex when I use the xelatexmk engine rather than a generic latexmk engine. The latexmk engine actually is set up to use latex->dvips->ps2pdf.
Herbert Schulz
2018-10-19 19:21:30 UTC
Permalink
Post by 军其 胡
Probably, I understand what you explained.
I insist that the TeX engine for latexmk should specified in latexmkrc even for common users.
Thank you for your patience.
Post by Herbert Schulz
There are many extra dependencies that are already in the rc files associated with each of the TeXShop engines and they satisfy almost everyone's ordinary needs. If you have special needs for a given project you can always create a platexmkrc (the p is for project) in the same folder as the project. I use different engines for different documents and it's helpful for me to see that I'm using xelatex when I use the xelatexmk engine rather than a generic latexmk engine. The latexmk engine actually is set up to use latex->dvips->ps2pdf.
Howdy,

I keep most of my non-project oriented .tex files in a single folder. They use different engines depending upon what I'm trying to accomplish; I usually use pdflatex but, with some documents I use xelatex and even lualatex and, if I'm using many eps graphics I might even use latex->dvips->ps2pdf. Using your method I'd have to edit the latexmkrc file for each case. I can't agree with you.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.ps
军其 胡
2018-10-19 19:32:42 UTC
Permalink
Ah..., you use latexmk for single TeX-format file.
At this occasion, you are right.
I thought latexmk is always used to compile the TeX projects like GNU Make.
Post by Herbert Schulz
I keep most of my non-project oriented .tex files in a single folder. They use different engines depending upon what I'm trying to accomplish; I usually use pdflatex but, with some documents I use xelatex and even lualatex and, if I'm using many eps graphics I might even use latex->dvips->ps2pdf. Using your method I'd have to edit the latexmkrc file for each case. I can't agree with you.
Herbert Schulz
2018-10-19 20:26:12 UTC
Permalink
Post by 军其 胡
Ah..., you use latexmk for single TeX-format file.
At this occasion, you are right.
I thought latexmk is always used to compile the TeX projects like GNU Make.
Post by Herbert Schulz
I keep most of my non-project oriented .tex files in a single folder. They use different engines depending upon what I'm trying to accomplish; I usually use pdflatex but, with some documents I use xelatex and even lualatex and, if I'm using many eps graphics I might even use latex->dvips->ps2pdf. Using your method I'd have to edit the latexmkrc file for each case. I can't agree with you.
Howdy,

There are many reasons to use latexmk based engines. I've got lots of documents that require multiple compiles because of cross-references, or special processing for glossaries, or bibliographies (latexmk will automatically use biber rather than bibtex when needed with the biblatex package) or … . The rc files that are read in create the necessary dependencies and rules for quite a few packages so the user doesn't have to it themselves.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://em
军其 胡
2018-10-20 08:29:59 UTC
Permalink
In your case, since there are so many dependencies (cross-references, etc.) between those files,
I think, it's better to organize them as a TeX projects,
or else it cause to fail in compiling them because of some single TeX-format file would be missed.
There are many reasons to use latexmk based engines. I've got lots of documents that require multiple compiles because of cross-references, or special processing for glossaries, or bibliographies (latexmk will automatically use biber rather than bibtex when needed with the biblatex package) or 
 . The rc files that are read in create the necessary dependencies and rules for quite a few packages so the user doesn't have to it themselves.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Herbert Schulz
2018-10-20 11:12:34 UTC
Permalink
Post by 军其 胡
In your case, since there are so many dependencies (cross-references, etc.) between those files,
I think, it's better to organize them as a TeX projects,
or else it cause to fail in compiling them because of some single TeX-format file would be missed.
Post by Herbert Schulz
There are many reasons to use latexmk based engines. I've got lots of documents that require multiple compiles because of cross-references, or special processing for glossaries, or bibliographies (latexmk will automatically use biber rather than bibtex when needed with the biblatex package) or … . The rc files that are read in create the necessary dependencies and rules for quite a few packages so the user doesn't have to it themselves.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
Howdy,

They are single files but they may have things in them that require multiple runs of pdflatex, e.g., table of contents, references to equations or tables or tikz-figures. If there is a need for multiple files (e.g., graphics inclusion) I do make a project folder to keep the files together.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https
军其 胡
2018-10-20 11:48:34 UTC
Permalink
Through a custom latexmkrc, all of your needs will be realized.
Post by Herbert Schulz
They are single files but they may have things in them that require multiple runs of pdflatex, e.g., table of contents, references to equations or tables or tikz-figures.
I hope that there would be a method of using latexmk in TeXShop, which is independent of the local file variable, i.e. TEX TS-program.
Loading...