在上传到JIRA时自动将LaTeX文档转换为PDF。
项目描述
此插件为Jirafs提供两个LaTeX功能——
在将PDF上传到JIRA之前自动将LaTeX文档转换为PDF文档。
您可以在评论和问题描述中使用{latex}宏块来嵌入内联图像或PDF。
安装
从PIP安装
pip install jirafs-latex
为问题文件夹启用
jirafs plugins --enable=latex
请注意,您可以通过在上面的命令中添加--global标志来全局启用此(或任何)插件
jirafs plugins --global --enable=latex
要求
需要xelatex。
使用自动LaTeX编译器
只需将一个以.tex扩展名命名的文件放在您的问题文件夹中。它将被自动编译成PDF,下次您推送更改到JIRA时,PDF将被上传到JIRA(而不是.tex文件)。
使用{latex}宏块
输入如下LaTeX块
{latex:name=somefilename.pdf}
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\title{Introduction to \LaTeX{}}
\author{Author's Name}
\maketitle
\begin{abstract}
The abstract text goes here.
\end{abstract}
\section{Introduction}
Here is the text of your introduction.
\begin{equation}
\label{simple_equation}
\alpha = \sqrt{ \beta }
\end{equation}
\subsection{Subsection Heading Here}
Write your subsection text here.
\begin{figure}
\centering
\includegraphics[width=3.0in]{myfigure}
\caption{Simulation Results}
\label{simulationfigure}
\end{figure}
\section{Conclusion}
Write your conclusion here.
\end{document}
{latex}
提交这些更改到JIRA时,上述内容将被替换为内联图像JIRA标记(在本例中为!somefilename.pdf!)。
您必须在您的打开{latex}标签中指定一个name参数;这是下次您提交更改时将上传到JIRA的文件名。此外,如果您已安装并使用standalone LaTeX插件,并将其用于将LaTeX文档转换为PNG图像,则应在name参数中指定以png结尾的文件名。
这可能对你来说并不重要,但如果你对它是如何工作的感到好奇:这里发生的情况是插件将你的LaTeX内容写入文件,然后请求xelatex编译你的文档,一旦这个过程完成,除了与您提交的名称匹配的那个文件之外,所有文件都将被删除。在此之后,一切都会像您上传普通文件时一样工作。
项目详情
关闭
jirafs-latex-2.0.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 3e03b7ded8f7ac59d149b148c173380094d99080c18d884ef38481b08570c010 |
|
| MD5 | b3fa0f4d5b7c49e4068ac64e49cf7ad0 |
|
| BLAKE2b-256 | 581cb15d66419582bade8f907b0e11c7c90119a5ff83f831d15d0e7278520f12 |