-
Notifications
You must be signed in to change notification settings - Fork 31
weave setup
The weave setup
command is borrowed from weaver
package and is used for defining the path to third-party software (e.g. Pandoc, wkhtmltopdf, pdfLaTeX) permanently. If you prefer to install the third-party software manually, this command comes very handy to avoid specifying the paths to these software anytime you call markdoc
. To define permanent paths to these software, type:
weave setup
This command opens a file in your Stata where you can define file paths in it. The file has complete instructions written in it that you can follow. Inside the file, there are a few global macros that you can define the permanent file paths or change the behavior of markdoc
package. To edit this file, insert the path to the executable file inside the
quotations to define the global macro. Here is an example for defining the file path to pdfLaTeX on Windows (Note that the file path might be different on your machine):
global pathPdflatex "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe"
If you wish to remove a path, make sure not to leave an empty space between the quotation marks. for example you can remove the example above by making the global macro NULL (i.e. no string character is defined):
global pathPdflatex ""
The changes made in this file are permanent and do not get replaced with the
next package update. But you can always access them using the weave setup
command.
Here are the list of globals you can define in weave setup
:
// -----------------------------------------------------------------------------
// Path to executable third-party software, required by Weaver and MarkDoc
// =============================================================================
// wkhtmltopdf
// -----------------------------------
global pathWkhtmltopdf "" //example: "C:\wkhtmltopdf\bin\wkhtmltopdf.exe"
// pdfLaTeX
// -----------------------------------
global pathPdflatex "" //example: "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe"
// MathJax
// -----------------------------------
global pathMathJax "" //example: "C:\Users\haghish\Downloads\MathJax-master"
// Pandoc (for MarkDoc)
// -----------------------------------
global pathPandoc "" //example Win: "C:\Pandoc\pandoc.exe" //example Mac: "/usr/local/bin/pandoc"
// -----------------------------------------------------------------------------
// Settings for Weaver and MarkDoc
// =============================================================================
// markup language for MarkDoc
// -----------------------------------
global markdocDefault "" //example: "markdown" or "html" or "latex"
// Default paper size
// -----------------------------------
global doc_paper "" //example: "a4" or "letter"
The second part of the file is used for defining the default markup language and the paper size (for weaver
only). For example, if you intend to use LaTeX as your primary markup language, you can change the default settings of markdoc
.