Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
reporting
Commits
8c32ea69
Commit
8c32ea69
authored
Jul 08, 2015
by
Houtan Bastani
Browse files
when latex option is passed, write page to its own file and include it in the report
parent
3cc756ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/@page/page.m
View file @
8c32ea69
...
...
@@ -38,6 +38,8 @@ o.titleTruncate = '';
o
.
orientation
=
''
;
o
.
footnote
=
{};
o
.
sections
=
{};
o
.
pageDirName
=
'tmpRepDir'
;
o
.
latex
=
''
;
if
nargin
==
1
...
...
@@ -82,6 +84,7 @@ assert(iscellstr(o.titleFormat), ...
assert
((
ischar
(
o
.
titleTruncate
)
&&
isempty
(
o
.
titleTruncate
))
||
...
isint
(
o
.
titleTruncate
),
...
'@page.page: titleTruncate must be empty or an integer.'
);
assert
(
ischar
(
o
.
pageDirName
),
'@page.page: pageDirName must be a string'
);
assert
(
ischar
(
o
.
latex
),
...
'@page.page: latex must be a string'
);
valid_paper
=
{
'a4'
,
'letter'
};
...
...
src/@page/write.m
View file @
8c32ea69
...
...
@@ -43,7 +43,19 @@ end
fprintf
(
fid
,
'\n'
);
if
~
isempty
(
o
.
latex
)
fprintf
(
fid
,
'%s'
,
o
.
latex
);
if
~
exist
(
o
.
pageDirName
,
'dir'
)
mkdir
(
o
.
pageDirName
)
end
pagename
=
[
o
.
pageDirName
filesep
'page_'
num2str
(
pg
)
'.tex'
];
[
fidp
,
msg
]
=
fopen
(
pagename
,
'w'
);
if
fidp
==
-
1
error
([
'@page.write: '
msg
]);
end
fprintf
(
fidp
,
'%s'
,
o
.
latex
);
if
fclose
(
fidp
)
==
-
1
error
(
'@page.write: closing %s\n'
,
pagename
);
end
fprintf
(
fid
,
'\\input{%s}'
,
pagename
);
else
fprintf
(
fid
,
'\\begin{tabular}[t]{c}\n'
);
for
i
=
1
:
length
(
o
.
title
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment