nb_util 0.3.8 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c481669cc7f54a88c0397da46a42150cb61b345dcdbc06d1a2a530b964249887
4
- data.tar.gz: 63de0433b90627754c066286dfc7e8bb52a2b3b8584cbd82a5e7a71923649910
3
+ metadata.gz: d67948debf7edb5fc3098821e2ec4f76afc094dc42a008d4a9aa7a4e242ea1fc
4
+ data.tar.gz: ee5ed185522dca88cfefce705770aa4a3b8f2546c9edf4b95f21488b39297ea6
5
5
  SHA512:
6
- metadata.gz: d9fe68971aeb2af907acf8474f8361618a7ece511ad0b145839bc58b99933df73fc9d6aecb8694b354e9c76784b861055899c280f429b65ad30a0a3400940231
7
- data.tar.gz: a3a41d88b3979c2463cf40254c71988af2b91c0cc1e40e16dbf3b9f901e49c560b41d1bbb0e964b5c242688c7835ed9b131b778e59f7b1a9ca943592c54d340d
6
+ metadata.gz: 4330f86300f183818de74d952990910f85cc1868ced42a54fdc9ce3fc978a0f1b97ccf63d442f2c2c7fb99f0b6edbe543ad2db9031fc3e900f6e6b690ade6988
7
+ data.tar.gz: 556db9c74899d232d134e84c1576f7489e33574dd22793b03af0fedac7a25ba1f4838cb52105b1ab43c25fde4c9021570afc2cf384ab05efb9fd8e2087e6dcb6
data/.DS_Store CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nb_util (0.3.7)
4
+ nb_util (0.3.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/.DS_Store CHANGED
Binary file
data/lib/cli.rb CHANGED
@@ -8,9 +8,17 @@ require 'thor'
8
8
  module NbUtil
9
9
  class CLI < Thor
10
10
 
11
- desc "red WORD", "red words print." # コマンドの概要(サンプル)
11
+ desc "red WORD [OPTION]", "red words print." # コマンドの概要(サンプル)
12
+ method_option :upcase, :aliases => '-u', :desc => "upcases the contents of str"
13
+ method_option :downcase, :aliases => '-d', :desc => "downcases the contents of str"
12
14
  def red(word) # コマンドはメソッドとして定義する
13
- say(word, :red)
15
+ if options[:upcase]
16
+ say(word.upcase, :red)
17
+ elsif options[:downcase]
18
+ say(word.downcase, :red)
19
+ else
20
+ say(word, :red)
21
+ end
14
22
  end
15
23
 
16
24
  desc "yaml2ipynb [input filename]", "convert yaml to ipynb" # コマンドの使用例と、概要
@@ -33,13 +41,14 @@ module NbUtil
33
41
  NbUtil.getcode(ARGV[1])
34
42
  end
35
43
 
36
- desc "ipynb2tex [filename]", "convert ipynb to tex" # コマンドの使用例と、概要
44
+ desc "ipynb2tex [filename]", "convert ipynb to tex's thiesis format" # コマンドの使用例と、概要
45
+ option :handout, :aliases => '-h', :desc => "convert ipynb to tex's handout format"
37
46
  def ipynb2tex(argv0) # コマンドはメソッドとして定義する
38
- NbUtil.ipynb2tex(ARGV[1])
39
- # NbUtil.revise_lines(ARGV[1])
40
- # NbUtil.split_files(ARGV[1])
41
- # NbUtil.replace_figs(ARGV[1])
42
- # NbUtil.your_informations(ARGV[1])
47
+ if options[:handout]
48
+ NbUtil.ipynb2tex_handout(ARGV[1])
49
+ else
50
+ NbUtil.ipynb2tex_thesis(ARGV[1])
51
+ end
43
52
  end
44
53
  end
45
54
  end
@@ -0,0 +1,19 @@
1
+ \documentclass[10pt,twocolumn,a4j]{jsarticle}
2
+
3
+ %setting format and calling packages
4
+ \input{../handout_pieces/usepackage}% pieces
5
+ \input{../handout_pieces/form00_style}% pieces
6
+ \input{../handout_pieces/tightlist_setting}% pieces
7
+
8
+ %表紙======================================================================
9
+ \input{../split_files/informations/informations}
10
+
11
+ %本文======================================================================
12
+ \input{./.splits_location.tex}
13
+
14
+ %参考文献===================================================================
15
+ \begin{thebibliography}{9}
16
+ \bibitem{}
17
+ \end{thebibliography}
18
+
19
+ \end{document}
@@ -0,0 +1,18 @@
1
+ %スタイル,パッケージの設定
2
+ \usepackage[dvipdfmx]{graphicx}%図の挿入のためのパッケージ
3
+ \usepackage{amsmath}
4
+ \usepackage{setspace}
5
+ \usepackage{amssymb}
6
+ \usepackage{ascmac}
7
+ \usepackage{framed}
8
+ \usepackage{wrapfig}
9
+ \usepackage{graphicx}
10
+ \usepackage{lineno}
11
+
12
+ \setlength{\textheight}{275mm}
13
+ \headheight 5mm
14
+ \topmargin -30mm
15
+ \textwidth 185mm
16
+ \oddsidemargin -15mm
17
+ \evensidemargin -15mm
18
+ \pagestyle{empty}
File without changes
@@ -0,0 +1,248 @@
1
+ This is e-pTeX, Version 3.14159265-p3.7.1-161114-2.6 (utf8.euc) (TeX Live 2017) (preloaded format=platex 2017.10.15) 26 DEC 2017 00:41
2
+ entering extended mode
3
+ restricted \write18 enabled.
4
+ file:line:error style messages enabled.
5
+ %&-line parsing enabled.
6
+ **thesis.tex
7
+ (./thesis.tex
8
+ pLaTeX2e <2017/09/26> (based on LaTeX2e <2017-04-15>)
9
+ Babel <3.14> and hyphenation patterns for 84 language(s) loaded.
10
+ (/usr/local/texlive/2017/texmf-dist/tex/platex/base/jreport.cls
11
+ Document Class: jreport 2017/09/19 v1.7g Standard pLaTeX class
12
+ \c@@paper=\count82
13
+ (/usr/local/texlive/2017/texmf-dist/tex/platex/base/jsize12.clo
14
+ File: jsize12.clo 2017/09/19 v1.7g Standard pLaTeX file (size option)
15
+ )
16
+ \c@part=\count83
17
+ \c@chapter=\count84
18
+ \c@section=\count85
19
+ \c@subsection=\count86
20
+ \c@subsubsection=\count87
21
+ \c@paragraph=\count88
22
+ \c@subparagraph=\count89
23
+ \c@figure=\count90
24
+ \c@table=\count91
25
+ \abovecaptionskip=\skip41
26
+ \belowcaptionskip=\skip42
27
+ \symmincho=\mathgroup4
28
+ LaTeX Font Info: Overwriting symbol font `mincho' in version `bold'
29
+ (Font) JY1/mc/m/n --> JY1/gt/m/n on input line 702.
30
+ \toclineskip=\dimen118
31
+ \@lnumwidth=\dimen119
32
+ \bibindent=\dimen120
33
+ \heisei=\count92
34
+ )
35
+ (../thesis_pieces/usepackage.tex
36
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphicx.sty
37
+ Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
38
+
39
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty
40
+ Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
41
+ \KV@toks@=\toks15
42
+ )
43
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphics.sty
44
+ Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
45
+
46
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/trig.sty
47
+ Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
48
+ )
49
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
50
+ File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
51
+ )
52
+ Package graphics Info: Driver file: dvipdfmx.def on input line 99.
53
+
54
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-def/dvipdfmx.def
55
+ File: dvipdfmx.def 2017/06/24 v5.0g Graphics/color driver for dvipdfmx
56
+ ))
57
+ \Gin@req@height=\dimen121
58
+ \Gin@req@width=\dimen122
59
+ )
60
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amsmath.sty
61
+ Package: amsmath 2017/09/02 v2.17a AMS math features
62
+ \@mathmargin=\skip43
63
+
64
+ For additional information on amsmath, use the `?' option.
65
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amstext.sty
66
+ Package: amstext 2000/06/29 v2.01 AMS text
67
+
68
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amsgen.sty
69
+ File: amsgen.sty 1999/11/30 v2.0 generic functions
70
+ \@emptytoks=\toks16
71
+ \ex@=\dimen123
72
+ ))
73
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amsbsy.sty
74
+ Package: amsbsy 1999/11/29 v1.2d Bold Symbols
75
+ \pmbraise@=\dimen124
76
+ )
77
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amsopn.sty
78
+ Package: amsopn 2016/03/08 v2.02 operator names
79
+ )
80
+ \inf@bad=\count93
81
+ LaTeX Info: Redefining \frac on input line 213.
82
+ \uproot@=\count94
83
+ \leftroot@=\count95
84
+ LaTeX Info: Redefining \overline on input line 375.
85
+ \classnum@=\count96
86
+ \DOTSCASE@=\count97
87
+ LaTeX Info: Redefining \ldots on input line 472.
88
+ LaTeX Info: Redefining \dots on input line 475.
89
+ LaTeX Info: Redefining \cdots on input line 596.
90
+ \Mathstrutbox@=\box42
91
+ \strutbox@=\box43
92
+ \big@size=\dimen125
93
+ LaTeX Font Info: Redeclaring font encoding OML on input line 712.
94
+ LaTeX Font Info: Redeclaring font encoding OMS on input line 713.
95
+ \macc@depth=\count98
96
+ \c@MaxMatrixCols=\count99
97
+ \dotsspace@=\muskip10
98
+ \c@parentequation=\count100
99
+ \dspbrk@lvl=\count101
100
+ \tag@help=\toks17
101
+ \row@=\count102
102
+ \column@=\count103
103
+ \maxfields@=\count104
104
+ \andhelp@=\toks18
105
+ \eqnshift@=\dimen126
106
+ \alignsep@=\dimen127
107
+ \tagshift@=\dimen128
108
+ \tagwidth@=\dimen129
109
+ \totwidth@=\dimen130
110
+ \lineht@=\dimen131
111
+ \@envbody=\toks19
112
+ \multlinegap=\skip44
113
+ \multlinetaggap=\skip45
114
+ \mathdisplay@stack=\toks20
115
+ LaTeX Info: Redefining \[ on input line 2817.
116
+ LaTeX Info: Redefining \] on input line 2818.
117
+ )
118
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/setspace/setspace.sty
119
+ Package: setspace 2011/12/19 v6.7a set line spacing
120
+ )
121
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsfonts/amssymb.sty
122
+ Package: amssymb 2013/01/14 v3.01 AMS font symbols
123
+
124
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/amsfonts/amsfonts.sty
125
+ Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
126
+ \symAMSa=\mathgroup5
127
+ \symAMSb=\mathgroup6
128
+ LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
129
+ (Font) U/euf/m/n --> U/euf/b/n on input line 106.
130
+ ))
131
+ (/usr/local/texlive/2017/texmf-dist/tex/platex/base/ascmac.sty
132
+ Package: ascmac 2017/07/22 v2.0d ascmac wrapper (community edition)
133
+
134
+ (/usr/local/texlive/2017/texmf-dist/tex/platex/base/tascmac.sty
135
+ Package: tascmac 2017/07/22 v2.0d ascmac package (community edition)
136
+ \@savetbaselineshift=\dimen132
137
+ \@saveybaselineshift=\dimen133
138
+ \scb@x=\box44
139
+ \scscb@x=\box45
140
+ \@bw=\dimen134
141
+ \@nbox=\box46
142
+ \@nbody=\box47
143
+ \@scw=\dimen135
144
+ \@itemh=\dimen136
145
+ \@iboxpos=\toks21
146
+ \@iboxstr=\box48
147
+ \@bwsp=\box49
148
+ \@@bwsp=\box50
149
+ \@bcal=\count105
150
+ \shaderule=\dimen137
151
+ ))
152
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/framed/framed.sty
153
+ Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
154
+ \OuterFrameSep=\skip46
155
+ \fb@frw=\dimen138
156
+ \fb@frh=\dimen139
157
+ \FrameRule=\dimen140
158
+ \FrameSep=\dimen141
159
+ )
160
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/wrapfig/wrapfig.sty
161
+ \wrapoverhang=\dimen142
162
+ \WF@size=\dimen143
163
+ \c@WF@wrappedlines=\count106
164
+ \WF@box=\box51
165
+ \WF@everypar=\toks22
166
+ Package: wrapfig 2003/01/31 v 3.6
167
+ )
168
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/caption/subcaption.sty
169
+ Package: subcaption 2016/05/22 v1.1-161 Sub-captions (AR)
170
+
171
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/caption/caption.sty
172
+ Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
173
+
174
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/caption/caption3.sty
175
+ Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
176
+ Package caption3 Info: TeX engine: e-TeX on input line 67.
177
+ \captionmargin=\dimen144
178
+ \captionmargin@=\dimen145
179
+ \captionwidth=\dimen146
180
+ \caption@tempdima=\dimen147
181
+ \caption@indent=\dimen148
182
+ \caption@parindent=\dimen149
183
+ \caption@hangindent=\dimen150
184
+ Package caption Info: Unknown document class (or package),
185
+ (caption) standard defaults will be used.
186
+ )
187
+
188
+ Package caption Warning: Unsupported document class (or package) detected,
189
+ (caption) usage of the caption package is not recommended.
190
+ See the caption package documentation for explanation.
191
+
192
+ Package caption Info: \@makecaption = \long macro:#1#2->\vskip \abovecaptionski
193
+ p \iftdir \sbox \@tempboxa {#1\hskip 1zw#2}\else \sbox \@tempboxa {#1: #2}\fi \
194
+ ifdim \wd \@tempboxa >\hsize \iftdir #1\hskip 1zw#2\relax \par \else #1: #2\rel
195
+ ax \par \fi \else \global \@minipagefalse \hb@xt@ \hsize {\hfil \box \@tempboxa
196
+ \hfil }\fi \vskip \belowcaptionskip .
197
+ \c@ContinuedFloat=\count107
198
+ Package caption Info: wrapfig package is loaded.
199
+ )
200
+ \c@subfigure=\count108
201
+ \c@subtable=\count109
202
+ ) (/usr/local/texlive/2017/texmf-dist/tex/latex/comment/comment.sty
203
+ \CommentStream=\write3
204
+
205
+ Excluding comment 'comment')
206
+ (/usr/local/texlive/2017/texmf-dist/tex/latex/lineno/lineno.sty
207
+ Package: lineno 2005/11/02 line numbers on paragraphs v4.41
208
+ \linenopenalty=\count110
209
+ \output=\toks23
210
+ \linenoprevgraf=\count111
211
+ \linenumbersep=\dimen151
212
+ \linenumberwidth=\dimen152
213
+ \c@linenumber=\count112
214
+ \c@pagewiselinenumber=\count113
215
+ \c@LN@truepage=\count114
216
+ \c@internallinenumber=\count115
217
+ \c@internallinenumbers=\count116
218
+ \quotelinenumbersep=\dimen153
219
+ \bframerule=\dimen154
220
+ \bframesep=\dimen155
221
+ \bframebox=\box52
222
+ LaTeX Info: Redefining \\ on input line 3056.
223
+ ))
224
+ (../thesis_pieces/form00_style.tex) (../thesis_pieces/tightlist_setting.tex)
225
+
226
+ ! LaTeX Error: File `../split_files/informations/informations.tex' not found.
227
+
228
+ Type X to quit or <RETURN> to proceed,
229
+ or enter new name. (Default extension: tex)
230
+
231
+ Enter file name:
232
+ ./thesis.tex:11: Emergency stop.
233
+ <read *>
234
+
235
+ l.11 ...{../split_files/informations/informations}
236
+ ^^M
237
+ End of file on the terminal!
238
+
239
+
240
+ Here is how much of TeX's memory you used:
241
+ 3071 strings out of 493648
242
+ 44180 string characters out of 6148805
243
+ 111942 words of memory out of 5000000
244
+ 6662 multiletter control sequences out of 15000+600000
245
+ 7905 words of font info for 33 fonts, out of 8000000 for 9000
246
+ 929 hyphenation exceptions out of 8191
247
+ 44i,0n,40p,322b,36s stack positions out of 5000i,500n,10000p,200000b,80000s
248
+ No pages of output.
@@ -1,17 +1,15 @@
1
1
  \documentclass[12pt,a4]{jreport}%chapterが使えるスタイル
2
- %フォーマットの設定,パッケージの呼び出し
3
- \input{../pieces/usepackage}% pieces
4
- \input{../pieces/form00_style}% pieces
5
- \input{../pieces/tightlist_setting}% pieces
2
+
3
+ %setting format and calling packages
4
+ \input{../thesis_pieces/usepackage}% pieces
5
+ \input{../thesis_pieces/form00_style}% pieces
6
+ \input{../thesis_pieces/tightlist_setting}% pieces
6
7
  %参考文献の設定===========================================================
7
8
  \renewcommand{\bibname}{参考文献}
8
9
 
9
10
  %表紙======================================================================
10
11
  \input{../split_files/informations/informations}
11
12
 
12
- %概要======================================================================
13
- %\input{../abstract/abstract}
14
-
15
13
  %目次======================================================================
16
14
  \tableofcontents
17
15
 
File without changes
@@ -0,0 +1,2 @@
1
+ %\tightlistの定義(箇条書きの際に必要)
2
+ \def\tightlist{\itemsep1pt\parskip0pt\parsep0pt}
@@ -0,0 +1,14 @@
1
+ %スタイル,パッケージの設定
2
+ \usepackage[dvipdfmx]{graphicx}%図の挿入のためのパッケージ
3
+ \usepackage{amsmath}
4
+ \usepackage{setspace}
5
+ \usepackage{amssymb}
6
+ \usepackage{ascmac}
7
+ \usepackage{framed}
8
+ \usepackage{wrapfig}
9
+ \usepackage{graphicx}
10
+ \usepackage[subrefformat=parens]{subcaption}
11
+ \usepackage{amsmath,amssymb}
12
+ \usepackage{comment}
13
+ \usepackage{lineno}
14
+