- Right click MATLAB editor file in folder directory panel and click "Open as Live Function". If the file is a live editor file, this step is not required.
- In toolstrip, navigate to Live Editor --> File --> Export --> Export to PDF
- Click "Show more" to expand the export options
- Change the paper size, orientation, and margins
- Finally click "Export"
How do I define the page size when using Publish
조회 수: 3 (최근 30일)
이전 댓글 표시
Please excuse the newbie question, but I am learning Matlab and want to use Publish to create an assignment report.
I'm using R2013a on a Mac, so don't have the option to publish to Word. Instead I'm publishing to PDF, but it appears to default to US Letter paper size when I need it to use A4.
Where do I specify the page size? I've looked in preferences and in Publish options but to no avail.
Thanks in advance.
댓글 수: 0
답변 (1개)
Aniket
2025년 5월 8일
As of R2024b, Publish does not provide an option to change the page size when creating a PDF for .m files.
However, the export option does provide this functionality for exporting Live Scripts and Functions. Kindly follow the below mentioned steps to change page margins:
You can find more information regarding export function in this documentation: https://www.mathworks.com/help/matlab/ref/export.html
Hope this helps achieve the functionality required!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!