Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide (latex and other commands') log messages #1036

Merged
merged 1 commit into from
Jun 19, 2018
Merged

Conversation

takahashim
Copy link
Collaborator

@takahashim takahashim commented Jun 18, 2018

Open3.capture2e ( https://docs.ruby-lang.org/ja/latest/method/Open3/m/capture2e.html ) を使って、コマンドを実行したときにエラーがでなければ標準出力・標準エラー出力へのアウトプットを行わないようにするものです。
なおエラーが出たときにはそれまでのログを全部まとめて吐き出します。

@kmuto
Copy link
Owner

kmuto commented Jun 18, 2018

よさそうですが、待っている間に不安になりそうなので、
#962 的な実行中命令を出しておくといいんでしょうか。「running ’コマンドと引数’」とか?

@kmuto
Copy link
Owner

kmuto commented Jun 19, 2018

ってもうINFO実行は入ってたからいいのかな

@takahashim
Copy link
Collaborator Author

現状では、成功すると、

review-pdfmaker config.yml
compiling nogeo.tex
INFO: extractbb cover.jpg
INFO: uplatex -interaction=nonstopmode -file-line-error book.tex
INFO: uplatex -interaction=nonstopmode -file-line-error book.tex
INFO: uplatex -interaction=nonstopmode -file-line-error book.tex
INFO: dvipdfmx -d 5 -z 9 book.dvi

といった出力になります。
エラーが出ると、

review-pdfmaker config.yml
compiling nogeo.tex
INFO: extractbb cover.jpg
INFO: uplatex -interaction=nonstopmode -file-line-error book.tex
ERROR: review-pdfmaker: failed to run command: uplatex -interaction=nonstopmode -file-line-error book.tex

Error log:
This is e-upTeX, Version 3.14159265-p3.7.1-u1.22-161114-2.6 (utf8.uptex) (TeX Live 2017) (preloaded format=uplatex)
 restricted \write18 enabled.
entering extended mode
(./book.tex
pLaTeX2e <2017/07/29u01> (based on LaTeX2e <2017-04-15>)
Babel <3.10> and hyphenation patterns for 22 language(s) loaded.

【……中略……】

./nogeo.tex:12: Undefined control sequence.
l.12   reutrn 1;  $a \bbb
                          c$

Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use
less on input line 34.

[1]

Package Fancyhdr Warning: \headheight is too small (14.22636pt): 
 Make it at least 16.0pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

[2] [3] [4]) [5]
Re:VIEWサンプル書籍
[6] (./book.aux)

Package rerunfilecheck Warning: File `book.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 )
(see the transcript file for additional information)
Output written on book.dvi (8 pages, 14048 bytes).
Transcript written on book.log.

rake aborted!
Command failed with status (1): [review-pdfmaker config.yml...]
lib/tasks/review.rake:71:in `block in <top (required)>'
Tasks: TOP => pdf => book.pdf
(See full trace by running task with --trace)

といった出力になります。

@kmuto
Copy link
Owner

kmuto commented Jun 19, 2018

よさそうです

@takahashim
Copy link
Collaborator Author

入れてみます

@takahashim takahashim merged commit b6f675c into master Jun 19, 2018
@takahashim takahashim deleted the hide-latex-output branch June 19, 2018 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants