On Thursday 01 January 2009 07:27:29 am Dieter Jurzitza wrote: > Dear Steve, > dear listmembers, > your answer tells me that I haven't been precise enough. Imagine you have a > section in your document you want to be centered rather than (i.e.) > flushleft. To achieve this in LyX, you have to mark the section and then > klick on the section menu, from where you can choose the appropriate > orientation of the text. > > Well, lazy me, what I would like to see are three little symbols for > flush-right, flush-left or center on the top-level menu bar that help me > avoid diving into a submenu in order to achieve this. > > Such an option is very common in other text processing systems and I must > admit that I like it because I need it every other time. So my question was > whether some guy shares my kind of laziness and probably readily did > something similar so I could just copy .... :-) > > Thanks again, > take care
Hi Dieter, I didn't even know about those menu options (more on why I didn't know about them later). Until the LyX developers put those functions on the buttonbar, I think you can create a hotkey to either do the justification, or else bring up the justification dialog. Now I'll explain why I didn't know about this feature. For the rest of this email, imagine me an elder in the Church of the Consistent Style, in my long red robe with my long white beard, giving a sermon as a rapt audience listens and murmers Amen :-) You said you use centering often. You must use it for a specific reason on those occasions. For instance, maybe you use center justification for tips and warnings. Let's say half way though your 300 page document you decide that you want warnings to be printed in red... If you had center justified tips and warnings using the justification dialog, you would need to go back through your document, eye-scan for every center justification, decide whether it's a tip or a warning, and then highlight the warning if it's a warning, and use the menu to assign a red color to the text. Ugh!!! Now imagine instead that the first time you came across the need to give a tip and/or warning, you recognized this was a specific situation --- a specific type of communication from you to the reader, and you made a style (called an "environment" in LyX and LaTeX) to represent a tip (call the environment Tip), and an environment to represent a warning (call it Warning). With those two environments coded, every time you needed to issue a tip or warning, you did so using the proper environment by clicking the environment dropdown right below the menu's "File", "Edit" and "View". All tips and warnings so made, when you want all the warnings red, you change the Warning environment to print both in the LyX environment and in the PDF output, go View->Pdf, and bang, every warning is red. But wait, there's more... When people format on the fly instead of with styles (environments), invariably in long books there's a "format creep", where early examples of tips are different from later ones, which can confuse the reader. Only with the use of styles is this problem conquered. None of what I've written here is specific to LyX. It applies to OpenOffice, MS Word, WordPerfect, or any other wordprocessor/textprocessor/typesetter. I always use styles, which is why I never knew about the justification dialog :-) In LyX, making new styles is much more difficult than MS Word or WordPerfect. The reason is that LyX is a front end for the LaTeX document processing language, which itself is a macro set for the TeX document processing language written by Donald Knuth. TeX and LaTeX were meant to be programming languages and were never intended to be mouse driven GUIs and were never meant to be simple writer (which is why LyX was invented). So, to make a LaTeX environment, you need to write some code. and to make a LyX environment, you need to code the LaTeX environment and then code the LyX environment. And then you need to test to see if your new environment broke something, and whether it produces the formatting you want. Coding LaTeX is the LAST thing you want to do while you're in the middle of writing something, and using 100% of your brainpower for the content you're writing. So luckily, LyX gives you a quick way of creating a dummy environment that you can use for tips or warnings or any other situation, until the time when you can devote brainpower to creating the format you really want. Here's the simplest dummy environment for warnings: Style Warning CopyStyle Standard End That's it -- three lines of code and you're done, and for the rest of your document the Warning style will appear in your environment dropdown. The only problem is that visually it will look no different from your regular writing. So you might choose to do something like this: Style Warning CopyStyle Standard Align Center End The preceding centers the text within the LyX front end, although in the PDF warnings will still appear identical to regular text. Learn as much as you can about LyX styles and LaTeX environments, including the following: * Linking a LaTeX environment to a LyX style * Details of LaTeX programming * Avoiding situations where a defective layout causes your custom styles to be erased. * Labels with LyX styles * Character styles * Character styles to implement a variable "label" HTH SteveT Steve Litt Recession Relief Package http://www.recession-relief.US