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

6 views (last 30 days)
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.

Accepted Answer

Vineet Joshi
Vineet Joshi on 21 Jul 2021
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

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!