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

8 ビュー (過去 30 日間)
Edgar Souza
Edgar Souza 2021 年 7 月 16 日
コメント済み: Edgar Souza 2021 年 7 月 24 日
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 Center および File ExchangeData Type Conversion についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by