In the current document using xelatex, memoir class, my chapters are a compilation of a verse-commentary block. See attached code. [the text in bold face is in a different language and the text in serif is the english equivalent]
Is there a way to separate the verse portion that when I compile, the document only generates the list of verses and if I change a flag in the tex preamble, I am able to generate both the verse and accompanying commentary text block.
\documentclass[12pt]{memoir}
\usepackage{lipsum}
\usepackage{polyglossia} % the multilingual support package
\setromanfont[Ligatures=TeX]{Linux Libertine O}
\def\mverse{\ifhmode \par \fi
\goodbreak \addvspace{3ex} \refstepcounter{section}
\centerline{\textbf{Verse \arabic{section}}}\medskip}
\newenvironment{customtext}%
{\leftskip=1em \rightskip=1em }%
{\ifhmode \par \fi}
\newcommand\mstyle[1]{\begin{customtext}\setlength{\parindent}{0pt}{\large
\textbf{#1}} \\
{\sffamily #1}\end{customtext}\medskip}
\begin{document}
\mverse
\mstyle{This is a custom verse}
\lipsum
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
\mverse
\mstyle{This is verse 2}
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
The old fox jumps over the lazy dog.
\end{document}
I looked at both LaTeX conditional expression and How do I conditionally execute something based on a documentclass option? but my situation is different.

\inputon condition – Oct 01 '15 at 13:36