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

8 vues (au cours des 30 derniers jours)
Edgar Souza
Edgar Souza le 16 Juil 2021
Commenté : Edgar Souza le 24 Juil 2021
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.

Réponse acceptée

Vineet Joshi
Vineet Joshi le 21 Juil 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

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by