Listings & Code
You are encouraged to include relevant code, such as snippets or pseudocode, within the body of your disquisition. If your disquisition contains large amounts of code, we recommend placing it in a public repository and including a link in your disquisition. Alternatively, you may also place your code in one or more appendices. Listings (code blocks) should follow the same guidelines as other non-text items, with some exceptions.
Guidelines: Listings and Code
Page Content
- Guidelines
- Frequently Asked Questions
- Troubleshooting
- Border Missing
- Border Extends into Margin
Related Pages
Quick Answers
Issue: Border Missing or Incorrectly Formatted
Requirements:
- A listing should be enclosed in a border.
- A listing should have one top and one bottom border, which appear at the beginning and end of the listing.
Resolution:
- Apply the NDSU Listing/Code style from your document, if available.
- Create a border around the entire listing with the border tool.
Use the "NDSU Listing/Code" style in our Word template to format the listing with a border. If you do not have this style, you can copy it into your document from our templates.
To add a border directly, select all lines in the listing then use the Border tool (Home tab -> Paragraph group) to place an outside border around the listing. You will need to adjust the left and right indentation of the listing to keep the border within the 1" page margins. If the listing continues across multiple pages, ensure there is only one top border, on the first page, and one bottom border, on the last page.
Issue: Listing Border Extends into Page Margin
Requirement:
- All content in the disquisition must fit within the 1" margins of the page.
Resolution:
- Change the listing's paragraph settings to fit inside the page margins.
When adding a border to a listing, it may extend into the page margin. Select the code in the listing and open the paragraph settings, then set the left and right indentation to move the border inside the page margins. Use the same indentation for both the left and right.
|
|
Disquisition Site Map |
|
|---|---|---|
Preparing to Graduate |
Graduate School Policies • Templates & Forms • Pre-submission Requirements • Submit Your Disquisition | |
DQKB |
General Requirements | Accessibility • Section Order • Font • Headings • Page Numbers |
| Prefatory Material | Title Page • Approval Page • Table of Contents • List of Tables, Figures, Etc. • List of Abbreviations/Symbols • List of Appendix Tables, Figures, Etc. | |
| Disquisition Body | Paragraph Text • Equations • Tables, Figures, Etc. • References / Citations • Appendices • Landscape Pages | |