1. Changing and saving fonts and sizes and positions of your windows
You may find that you would like to change the fonts and display style of Stata’s windows, depending on your monitor resolution and personal preferences. At the same time, there could be requirements for font usage, say, when you submit graphs to journals. Stata accommodates both of these by allowing sets of preferences for how windows are displayed.
We will first cover what can be changed in each window and then talk about what you can manage with your preferences.
2. Graph window
The preferences for the Graph window can be changed by right-clicking on the Graph window and choosing Preferences… from the contextual menu. The settings can then be set for how graphs are displayed in Stata. The settings that should be used when printing can be set under the Printer tab. The behavior of the Clipboard is controlled under the Clipboard tab.
The Graph preferences allow different schemes that control the look of graphs. These schemes provide a quick way to optimize graphs for printing or to display on a screen. There are even schemes defined for The Economist and the Stata Journal so that you can get the details for these publications right without much fuss. Changing the scheme does not change the current graph—it applies the settings to future graphs.
3. All other windows
You can change the display font and font size for most types of windows in Stata.
If fonts and font sizes for a window can be changed, they can be changed by right-clicking on the window and selecting Font… from the contextual menu. Doing so will bring up the Font dialog, from which you can pick the font and size of your choice. The font lists for each of the Results, Viewer, Data Editor, and Do-file Editor windows are restricted to fixed-width fonts only. This restriction ensures that output and numbers line up properly and are readable. The other windows can have any font that you would like without any adverse consequences.
4. Changing color schemes
In addition to changing the fonts themselves, you can also change the background and foreground colors of text being displayed. In the Do-file Editor, you can choose the colors for syntax highlighting, allowing, say, Stata commands to be displayed in a different color from arbitrary text. You can control the overall color scheme by selecting a scheme in the General tab of the General preferences.
The Results and Viewer windows have color schemes that control the display of input, text, results, errors, links, and highlighted text. Each has its color scheme set in the same fashion: you can right-click on the window and select or design your own color scheme. The default setting for both the Results window and the Viewer is the built-in Standard scheme, which uses a white background and dark text. There are other built-in schemes as well as slots for custom schemes. The settings for the Viewer affect all Viewer windows at once. Choosing an overall scheme from the General tab will reset all custom settings to the settings determined by that scheme.
5. Managing multiple sets of preferences
Stata’s preferences are automatically saved when you exit Stata, and they are reloaded when Stata is launched. However, sometimes you may wish to rearrange Stata’s windows and then revert to your preferred arrangement of windows. You can do this by saving your preferences to a named preference set and loading them later. Any changes you make to Stata’s preferences after loading a preferences set do not affect the set; the set remains untouched unless you specifically overwrite it.
To manage preferences, open the Edit > Preferences menu, and do any of the following:
- Select a preference set from the Load preference set menu to load it. Several different preference sets come installed with Stata, some meant for small screens, others meant for giving presentations involving Stata. They are worth a look.
- Select Save preference set > New preference set… to save the current preferences to a set. Enter a name for the set, and click on OK.
- Select an existing set from the Save preference set menu to overwrite it with the current preferences.
- Select a preference set from the Delete preference set menu to delete it. Click on OK to verify that you wish to delete the set.
6. Closing and opening windows
You can close all windows but the Results and Command windows. If you want to open a closed window, open the Window menu and select the desired window.
Source: STATA (2021), Getting Started with Stata for Windows, Stata Press Publication.