- Documentation
- Manuals
- Tutorials
- Presentations
- LyX Functions
- Troubleshooting
- Suggested reading
- Official web site
Edit Links |
Tips /
## OptionalEnvironmentArgumentsCategories: LyxTricks << | Page list | >>## How to add optional arguments to environmentsMany LaTeX environments accept optional arguments that influence their behavior. The theorem environment, for example, accepts an optional argument that is typeset after the theorem number, often used for the name of the theorem or to give credit to its discoverer. In LaTeX, this would be written thus: \begin{theorem}[Cohen, 1961] or \begin{theorem}[Schröder-Bernstein Theorem], with results like these: Theorem 1.1 (Cohen, 1961).
Theorem 1.2 (Schröder-Bernstein Theorem).
LyX offers no obvious way to do this, but in fact it is quite simple. All you need to do is enter the optional argument as ERT immediately following the appearance of "Theorem 1.2", or whatever, in LyX. It works because the optional argument In many instances, such as the theorem and proof environments, an even simpler technique applies. Immediately after the start of the enviroment right click and from the context menu choose "insert short title". |

Page last modified on 2012-09-27 05:34 CEST