Listings and Code
You are encouraged to include relevant code snippets within the body of your disquisition, but we recommend placing large amounts of code in a public repository and including a link in your disquisition. 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.
Content
- Formatting Requirements
- FAQ
- Troubleshooting issues
Formatting Guidelines: Listings and Code
Quick Answers
Issue: Border Missing or Incorrectly Formatted
Requirements:
- The code should be enclosed in a border.
- There should only be one top and one bottom border, which appear at the beginning and end of the listing.
Select your code and use the Border tool found on the Home tab -> Paragraph group to place a border around your listing. If the listing continues for multiple pages, there should only be one top border on the first page and one bottom border on the last page that it appears.
Issue: Listing Border Extends into Page Margin
Requirement:
- All content in the disquisition must fit within the 1" margins of the page.
Word
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.