Kevin Pfeiffer wrote: > Andrew Sullivan writes: >> Couldn't you make a BibTeX style that'd do it? (I'm fiddling with >> such styles lately anyway, and it seems that LyX will do whatever >> your style tells it to. I don't understand the software >> completely yet, so I may be totally off the mark here.) > > Yes, I'm sure (hah) that one could, but having looked at a few... :-( > > Actually the complex part it seems is splitting the strings, tracking > lengths, etc.; to simply print out a field entry unabbreviated might not > be too much work. > > I'm also looking at Angus's suggestion again. It could be a bit more > automated (wish list hint) so that one could define one's one "text > objects" as he did and then call them up via a menu and/or via > autocompletion while typing (and and avoiding the ERT), but the idea > seems useful to me, even in the raw. For example, there are numerous > abbreviations being used where typos could easily slip in (and the actual > abbreviations are not yet firmly set); by using Angus's suggestion I can > keep this under control.
Another way would be to use BibTeX and some black magic :) Seriously. As Jürgen says, the jurabib package can do what you want "out of the box". LyX 1.4.x will support jurabib and \citetitle, but for now I'd suggest that you could set things up in LyX to use natbib and set your citations as \citeauthor say. If you abuse your BibTeX data base so that the authors are actually the magazine title then you're done. Alternatively, you could indulge in a little post processing of the latex file. Here's a suggestion I made earlier today to a similar question on the lyx-devel list. The idea in your case would be to swap "natbib" for "jurabib" and "citeauthor" for "citetitle". Let me know if you want ot persue this further. HTH, Angus Hossein Noorikhah wrote: > Hi > By default, when I want to use an alternative language beside English, I > can seperate it in the commands needed to switch to that language, ... . > But now my problem is that I want to use an arabic context(really > persian, that has somehow similar script to arabic), and I want to > seperate English text in my desired tags, when the actual TeX code is > generated. Even when I set my default language to arabic in LyX, I could > not reach to that goal. Could you please tell me how to do this? Or how I > can do something that has the same functionality? > > For example I want to reach this after the TeX code is generated: > (ARABIC-TEXT is some kind of arabic text, and ENGLISH-TEXT is english > text) > > > ARABIC-TEXT ARABIC-TEXT ARABIC-TEXT > .... > {\englishtext ENGLISH-TEXT ENGLISH-TEXT} > ... > ARABIC-TEXT ARABIC-TEXT ARABIC-TEXT > ... Hi, Hossein. I take it that you have already enabled "Right-to-left language support" in the "Language Settings->Language" pane of the "Edit->Preferences" dialog? If I export the attached lyx document to latex (File->Export->LaTeX) I see: \documentclass[arabic,english]{article} \usepackage[T1]{fontenc} \usepackage[unknown,latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother \begin{document} \selectlanguage{arabic} \inputencoding{unknown} ARABIC TEXT ARABIC TEXT ARABIC TEXT \L{ENGLISH TEXT ENGLISH TEXT ENGLISH TEXT ENGLISH TEXT} ARABIC TEXT ARABIC TEXT ARABIC TEXT. \selectlanguage{english} \end{document} The '\selectlanguage{LANG}' bit can be specified in the Edit->Preferences dialog. The '\L{...}' bit appears to be hard-coded inside LyX. I suspect that you'll need to post-process this to attain your desired output. If all you need is to replace '\L{' with '{\englishtext' then I'd suggest that you should write a little wrapper script #! /bin/sh # A wrapper script to invoke the LaTeX compiler, # first transforming the data, replacing all '\L{' with '{\englishtext' sed 's/\\L{/{\\englishtext/g' "$1" > "$1.$$" mv -f "$1.$$" "$1" latex "$1" # The end You should redefine your latex -> dvi converter (see the converters pane in the Edit->Preferences dialog) to use this script. Something like: From: LaTeX To: DVI Converter: my_latex $$i Extra Flag latex Press "Modify" and then "Save" If that's not enough, then feel free to come back ;) -- Angus