Export-ArXivArchive
SYNOPSIS
SYNTAX
Export-ArXivArchive [-Manifest] <Hashtable> [-RunNotebooks] [<CommonParameters>]
DESCRIPTION
Prepares a ZIP archive of a LaTeX-based project suitable for uploading to arXiv.org.
EXAMPLES
Example 1
#region Bootstrap PoShTeX
$modules = Get-Module -ListAvailable -Name posh-tex;
if (!$modules) {Install-Module posh-tex -Scope CurrentUser}
if (!($modules | ? {$_.Version -ge "0.1.7.3"})) {Update-Module posh-tex}
Import-Module posh-tex -Version "0.1.7.3"
#endregion
Export-ArXivArchive @{
ProjectName = "mlp";
TeXMain = "mlp.tex";
AdditionalFiles = @{
"fig/*.pdf" = $null;
"revquantum.sty" = $null;
"quantumarticle.cls" = $null;
};
RenewCommands = @{
"figurefolder" = "fig/";
};
Notebooks = @(
"nb/paper-figures.ipynb"
)
}
Run LaTeX on mlp.tex
, then save the TeX source and *.bbl
files
into a ZIP named mlp.zip
, along with all figures matching fig/*.pdf
and LaTeX dependencies.
PARAMETERS
-Manifest
Specifies which files should be included in the ZIP file generated by this cmdlet. The following keys are required:
ProjectName
: Used to determine the name of the generated ZIP file.TeXMain
: Name of the main TeX file to be compiled.AdditionalFiles
: Hashtable whose keys are filename patterns specifying additional files that should be included. If the value of a key is$null
, then matching files will be included at the same location as in the original project director. If the value is a directory (that is, ending in/
), then matching files will be placed in that directory. Finally, a specific file name can be given.
The following keys may optionally be specified:
RenewCommands
: Hashtable whose keys are LaTeX commands and whose values are new values for those commands. This may be needed, for instance, if figures and other LaTeX dependencies are located in a different folder within your project and in the final arXiv build.Notebooks
: An array of Jupyter Notebooks, each of which will be placed in theanc/
directory of the generated ZIP archive. If the-RunNotebooks
switch is present, nominated notebooks will also be executed before building the TeX project.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RunNotebooks
If present, Export-ArXivArchive
will use Jupyter Notebook to rerun all notebooks
listed in the Notebooks
key of the manifest before building the TeX project.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).