How can I remove blank spaces in generated pdf using publish command?

6 次查看(过去 30 天)
Hi people,
Can you answer me if I can remove blank spaces in a generated pdf using publish command? This blank spaces appears between chapters 1-2 and between chapters 4-5, according images attached. I tried to eliminate it for hours, manipulating publish options, but I didn't get success. Aditionally, Is possible to format my document with font names, font sizes, break pages and others options? Publish page don't bring to us much information.

采纳的回答

Vineet Joshi
Vineet Joshi 2021-7-21
Hi
In order to reproduce your problem, I used the following code. This is taken from section 3 of your second image.
%% PDF Title
% Reproducing the error.
%% Section 1
clc,clf
fs = 1024;
n = -20;20;
k=10;
%% Section 2
X = 10;
Output:
You can see the result of after publishing below.
Based on this, it looks like the problem is arising due to the clc,clf commands beings used. Since after these you normally would expect a clear window, it looks like that is comming as a result.
There are two ways to address this.
Either you can remove all the redundant clc,clf, clear or similar commands. You can refer the following.
%% PDF Title
% Reproducing the error.
%% Section 1
fs = 1024;
n = -20;20;
k=10;
%% Section 2
X = 10;
Output:
The other thing you can do it to stop the evaluation before conversion to pdf. You can refer the following.
Hope this was helpful.
Thanks

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by