很抱歉,文件“test.lytex”不存在

很抱歉,文件“test.lytex”不存在

我正在跟随一段精彩的演练tex.stackexchange以及进行放射治疗调频(确实很好),但是我缺少了一些东西。

使用 OSX 10.10.5 - Yosemite。已安装最新版本的 TeXShop。TeX Live 不报错。

araraconfig.yaml我在我的主目录中创建了一个文件:

ls -l ~/ | grep arara
-rw-r--r--    1 mikekilmer  staff   218B Jul 26 21:50 araraconfig.yml

它看起来像这样:

!config
# Config file to use texmfhome as search path
# # author: Marco Daniel
# # requires arara 3.0+
 paths:
 - /Users/mikekilmer/Library/texmf/scripts/arara/rules

 filetypes:
 - extension: lytex
   pattern: ^(\s)*%\s+

里面有/Users/mikekilmer/Library/texmf/scripts/arara/rules一条 lilypond 规则:

$ ls -l /Users/mikekilmer/Library/texmf/scripts/arara/rules
total 8
-rw-r--r--  1 mikekilmer  staff   433B Jul 26 20:45 lilypond.yml

内容:

!config
# Mainfile rule for arara
# author: Marco Daniel
# requires arara 3.0+
identifier: lilypond
name: Lilypond
command: <arara> lilypond-book @{format} @{options} @{output} "@{file}"
arguments:
- identifier: format
  flag: <arara> --format=@{parameters.latex-programm}
  default: <arara> --format=latex
- identifier: options
  flag: <arara> @{parameters.options}
- identifier: output
  flag: <arara> --output=@{parameters.output}

最后是测试文件:

% arara: lilypond
% arara: pdflatex: { files: [ test.tex ] }
\documentclass{scrartcl}

\begin{document}
Text
\begin{lilypond}[staffsize=12]
\relative c' {
  c2^"Text" g'2 \times 2/3 { f8 e d } c'2 g4
}
\end{lilypond}
\end{document}

但:

$ arara test.lytex
  __ _ _ __ __ _ _ __ __ _ 
 / _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
 \__,_|_|  \__,_|_|  \__,_|

I'm sorry, but the file 'test.lytex [.tex, .dtx, .ltx]' does not
exist. Note that when you provide only the basename (i.e, the
filename without the extension) or with an unknown extension,
arara will try to look for files ending with the predefined
extensions [.tex, .dtx, .ltx] in that order. You can override the
order, the search pattern or even add support for new extensions
through the configuration file. Please refer to the arara manual
to learn more about this feature.

在目录中我运行命令:

$ ls -l | grep test
-rw-r--r--  1 mikekilmer  staff   231B Jul 26 21:52 test.lytex
-rw-r--r--  1 mikekilmer  staff   671B Jul 26 21:56 test.tex

有人能对进一步的故障排除提出建议吗?

答案1

答案最终很简单,因为arara 3.0YAML 文件的扩展名需要是.yaml,而不仅仅是.yml

测试你的配置文件是否被 Arara 看到的一种方法是简单地在其中使用一些错误的 YAML 语法。

例如如果你添加以下行:

x paths:

而不是paths:,那么如果 Arara看到它,它会返回一个错误:

 / _` | '__/ _` | '__/ _` |
| (_| | | | (_| | | | (_| |
 \__,_|_|  \__,_|_|  \__,_|

I'm sorry, but apparently your arara configuration file is
invalid, that is, it has invalid or missing YAML entries.
Unfortunately, arara cannot proceed until the error is fixed. I
tried my best to dump the error message, so here it is:

Problem: Can't construct a java object for
tag:yaml.org,2002:com.github.arara.model.AraraConfiguration;
exception=Cannot create property=x paths for
JavaBean=com.github.arara.model.AraraConfiguration@27082746;
Unable to find property 'x paths' on class:
com.github.arara.model.AraraConfiguration
Error found in line 0, column 0.
    !config

例如,如果您的文件已命名araraconfig.yml(从 arara 3.0 开始),则不会返回错误,因为 Arara 正在寻找具有扩展名的文件.yaml

相关内容