On Tue, Feb 11, 2014 at 9:36 AM, Liviu Andronic <[email protected]>wrote:
> On Tue, Feb 11, 2014 at 4:16 PM, stefano franchi > <[email protected]> wrote: > > > > > > > > On Tue, Feb 11, 2014 at 7:48 AM, Rich Shepard <[email protected]> > > wrote: > >> > >> On Tue, 11 Feb 2014, Liviu Andronic wrote: > >> > >>> Load the Logical Markup module, then select text, right-click, Text > >>> Style, > >>> Code. > >> > >> > >> Liviu, > >> > >> I was not aware of this module; I'll go look for it. Are modules > >> different > >> from packages? > >> > > > > > > I was not aware of this module either, good to know. But I am not sure I > > understand its advantages. All it does is to define 4 new commands > > such as > > > > \newcommand{\code}[1]{\texttt{#1}} and similarly for the other tree > styles. > > > > > > So if I apply the "code" command to, say "code fragment" I have > > > > > > \code{code fragment} > > > > > > instead of the "fingerpainted" > > > > > > \texttt{code fragment} > > > > > > The resulting Latex code seems more complex: I have a new command in the > > preamble (\code) that simply applies a "fingerpainting" command instead > of > > the fingerpainting command itself. Two commands instead of one. > > > It's the whole debate of fingerpainting vs styles. With a style (e.g. > using the Module), if you suddenly decide that your code bits should > be sans instead of monospace, you can easily redefine '\code' with one > touch in the Preamble; with fingerpainting, you have to do this > manually throughout the document as it is ill-advised to redefine > '\texttt'. See Emphasis vs Italic and Noun vs Small Capitals in LyX. > I am clear on that. What I don't understand is why the "no-fingerpainting" goal is achieved with LyX inventing new LaTeX commands and increasing the preamble's size. Shouldn't the semantic markup be achieved through a latex .sty files loaded by the module? Again, I may be missing something here. Cheers, S. -- __________________________________________________ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA [email protected] http://stefano.cleinias.org
