Re: Auto-reload pdf files on Mac?

2011-05-03 Thread Daniel Lohmann

On 31.01.2011, at 18:17, Murat Yildizoglu wrote:

> I confirm that Skim is able to autoload the pdf and keep the actual view of 
> the file. You have just tell it, the first time you update the PDF, that you 
> want it to auto-load it (I have not found a way to tell it to auto-load 
> without asking this question).

That's easy, there is a "hidden preference" for this:
   
http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=Hidden_Preferences#Auto_Reload

Basically, all you have to do to get rid of this question is to open a Terminal 
window and enter:
   defaults write -app Skim SKAutoReloadFileUpdate -boolean true

Daniel





smime.p7s
Description: S/MIME cryptographic signature


Re: Old Beamer Class Presentation Lost Navigation Links

2010-06-22 Thread Daniel Lohmann

On 22.06.2010, at 23:00, Paul Rubin wrote:

> Rich Shepard  appl-ecosys.com> writes:
> 
>> 
>>   Both source .tex and .log are attached.
>> 
>>   While the newest hyperref package does not include all the files of the
>> earlier versions and throws a warning, the error that halts compilation of
>> the file is \makebeamertitle.
> 
> That's where it halts, but not the problem.  The problem seems to be
> \thispdfpagelabel is an undefined control sequence.  It's supposed to be 
> defined
> in hyperref (I think).

Not by newer versions of hyperref, see

http://bitbucket.org/rivanvx/beamer/issue/8/beamer-should-generate-pdf-page-labels-using

Daniel

>>> You mentioned something about hyperref not having a .sty or .cfg file?? 
>>> Have you tried reinstalling/upgrading hyperref?
>> 
>>   After seeing complaints in an earlier log file about hyperref I downloaded
>> and installed the latest version from CTAN. There are no .sty or .cfg files
>> for hyperref in the latest release.
> 
> Well, your log indicates it seems to be loading hyperref (and, in particular,
> /usr/share/texmf/tex/latex/hyperref/hyperref.sty), version 6.74m, from 2003. 
> The config file (also found) has a 2002 version date.  That's not the latest
> version, so maybe you're not using what you installed -- or, worse yet, you've
> got a hybrid of old and new versions??
> 
> Your log shows hyperref loading a little earlier than mine does, but what 
> loads
> before it in mine and after it in yours looks pretty harmless to me.  The one
> other major discrepancy between our logs is that yours indicates some ConTeXT
> macros are loading where mine does not:
> 
> (/usr/share/texmf/tex/context/base/supp-pdf.tex
> (/usr/share/texmf/tex/context/base/supp-mis.tex
> loading : Context Support Macros / Miscellaneous (2004.10.26)
> 
> Dunno if that would muck things up.  I think I'd try straightening out the
> questions about hyperref first.  The latest release comes as .ins and .dtx
> files, although there's supposed to be a .zip version somewhere or other.  If
> you grabbed the .dtx and .ins files, did you run 'tex hyperref.ins' to 
> generate
> the .sty file(s), and then distribute stuff around your TDS tree?  (And did 
> you
> texhash it?)
> 
> Nag, nag, nag ...  :-)
> 
> /Paul
> 



Re: Negative indent in an enumerated list inside a theorem?

2010-06-15 Thread Daniel Lohmann

On 15.06.2010, at 15:19, Paul A. Rubin wrote:

> On 6/14/2010 7:35 PM, Paul Elliott wrote:
>> 
>> How do I do in lyx, a negative indent on an enumerated list inside a Theorem?
>> 
>> I have a math book where sometimes the theorems are written like this:
>> 
>> --
>> Theorem.
>> If all cows are spherical and either:
>>  (1) the moon is made of green cheese,
>>   or (2) there are canals on Mars
>> then pluto is a planet.
>> --
>> 
>> How do I copy this style in lyx, specificly the negative indent
>> on the "or".
>> 
>> 
> 
> Crude hack attached.  Due to the way LaTeX spaces enumerations (the anchor 
> point is the start of the item text), you can easily wind up with "or" 
> violating the left margin, hence my use of a box with horizontal space 
> stuffed in front of it.

Alternative approach with \llap to typset the "or" to the left (subject to the 
danger of margin violation as mentioned by Paul).

Daniel



pluto.lyx
Description: Binary data


Re: Reducing the number of pages in an article

2010-06-15 Thread Daniel Lohmann
If you compile with pdflatex to pdf, you might also consider loading the 
microtype package in your preamble:

\usepackage{microtype}

Not only this improves the typographical aesthetics of your document, I have 
also found it reducing the number of pages slightly (by about a quarter page 
per ten pages in a two-column style, that is by about 2-3%, which might be 
enough in your case.)

More "evil" hacks include:

- explicitly putting negative vskips (e.g., \vskip{-2ex}) to reduce the spacing 
between certain figure floats and the following text or between the figure and 
its caption.

- explicitly enlarging the one or other page by a single line 
(\enlargethispage{\baselineskip}) 


Daniel

Re: Custom Insets with multiple arguments

2010-06-11 Thread Daniel Lohmann

On 10.06.2010, at 11:02, stephen's mailinglist account wrote:

>>> On 06/02/2010 10:59 AM, Rob Oakes wrote:
 Dear LyX-Users,
>> 
 I am in the process of creating a custom of modules for personal use
> 
 p  and another for the creation of epigraphs).  For the epigraph
 module to work correctly, it is important that I be able to use multiple
 input arguments.  For example, the LaTeX code for the epigraph command
 has the form \epigraph{Quotation}{Source}.
>> 
 \epigraph{If a picture isn't worth a thousand words, the hell with
 it.}{Ad Reinhardt}
>> 
 Is anyone aware of a way to create an inset that could support this type
 of macro?  I've looked through several of the examples shipped with LyX
 and wasn't able to find a similar example.
>> 
>> The dinbrief.layout uses the following workaround in a similar case::
>> 
> I have created a module for epigraph using the style of workaround
> suggested by DINbrief
> 
> http://wiki.lyx.org/uploads/Modules/epigraph/epigraph.module
> 
> it uses 3 terms (text, source and typeset) because I wanted to make
> the source italic.
> 
> I would be interested in comments and feedback as to how to do this
> better/more elegantly

An alternative approach might be to exploit plain tex to delimit the arguments 
in a way that is opaque to LyX. Hence, from the viewpoint of LyX and LaTeX, we 
pass a single argument, which then is internally parsed to split it up to 
whatever you need. Minimal example (LaTeX):

\documentclass{minimal} 

\newcommand*{\epigraph}[1]{%
  \def\parsearg##1+##2+{\def\one{##1}\def\two{##2}\relax}
  \parsearg#1+
  \emph{\one} (\two)
}

\begin{document} 
 
  \epigraph{Das Leben ist des Lebens Ziel+unbekannt}

\end{document}

Note that \epigraph gets just one argument, which is then internally split into 
two. In the example I have used the plus symbol (+) as delimiter to split the 
arguments; the delimiter itself is not printed.  However, you might use 
whatever you want to delimit the arguments, even complex tokens:

\documentclass{minimal} 

\newcommand*{\epigraph}[1]{%
  \def\parsearg##1 QUOTE OF ##2\end{\def\one{##1}\def\two{##2}\relax}
  \parsearg#1\end
  \emph{\one} (\two)
}

\begin{document} 
 
  \epigraph{Das Leben ist des Lebens Ziel QUOTE OF unbekannt}

\end{document}

Some additional work is required if you want the second part to be optional, 
though this should be possible as well.

Daniel

Re: Beamer multitude problems with lyx

2010-06-09 Thread Daniel Lohmann

On 08.06.2010, at 11:00, E. Kaplan wrote:

> Thanks, Daniel, for sharing this solution.  

> Which style file are we talking about?  

The beamer theme I have developed for my department. Its a complete own theme 
that is included with \usetheme{i4} in your preamble and has to be put 
somewhere in your texmf-tree (or side by side to the presentation). I have 
zipped it together with a small example:
  http://www4.informatik.uni-erlangen.de/~lohmann/download/i4beamer.zip

As a (somewhat bigger) example I have also provided the Puma-Talk:
  http://www4.informatik.uni-erlangen.de/~lohmann/download/puma-slides.zip

Here I have put the style side by side to the presentation, as I was 
collaborating with a colleague on that.
DISCLAIMER: As most of my talks, this one went through some "last-minute 
optimization" that partly lead to, well, not so nice code.

> Since examples are the best teachers, could you please upload (or point to) a 
> Lyx file to produce (part of?) the very nice presentation of PUMA that was 
> showcased on your last message?

Sorry, there is no LyX file. I considered the discussion to be already at a 
point how to achieve such things with beamer at all.

I personally do not consider LyX to be the right front end for beamer. In my 
presentations, I tend to use a lot of visual effects and as little "plain text" 
as possible. The visual effects are mostly achieved with TikZ and some LaTeX 
(and sometimes even plain TeX) coding, which means that within LyX I would end 
up with 80% ERT, which would be a PITA. LyX is definitely not my editor of 
choice for LaTeX code.

Even though I never have tried it: the theme should be usable together with LyX 
as good (or as bad) as any Beamer theme, so feel free to experiment with it.


On 08.06.2010, at 20:29, Steve Litt wrote:

> Daniel, your solution inspired me to solve the other Beamer problem I'd been 
> having. I enjoy having text blocks in my presentations where the text block 
> is 
> maybe 60% of the width, and centered. The width of a Beamer block can be 
> altered by a \setlength{\textwidth}, but no matter what I did with \center, 
> \centering, \hskip, \leftskip, I couldn't center it.

Yeah, this LaTeX center commands are all a bit strange wrt when they work and 
when not; I have never really understood it. The one that works for me is the 
center *environment*. I usually combine it with minipages to achieve the 
desired text width:

 \begin{center}\begin{minipage}{0.8\textwidth}
  < BLOCK >
\end{minipage}\end{center}


> Ehud and Daniel, what other Beamer difficulties can you think of? I'm having 
> a 
> lot of trouble getting onto the Beamer-Latex mailing list, so this is the 
> most 
> authoritative Beamer knowledge source I have.


There is probably plenty to say that (even more probably) I have forgot 
meanwhile. So, to just get this started:

** absolute positioning of elements.
IMHO an essential for presentation slides, but not "natively" supported by 
beamer. I ended up with using TikZ pictures with the [overlay] option and the 
(current page) node to achieve this (see the puma-slides example). In fact, 
TikZ has come to my rescue in many more cases, so I use it quite a lot in 
conjunction with beamer. A major downside of employing TikZ quite a lot, is, 
however...

** long compilation times.
I use the comment package (\begin{comment} ... \end{comment} to uncomment 
during authoring those parts of a presentation I am currently not working on.

** reusability of frames.
This is an issue I do not yet have found a good solution for. In theory, beamer 
frames should be simply reusable, that is, just copy the \begin{frame} ... 
\end{frame} block into your new presentation  -- right? 
In practice, this only works for the most trivial slides. LaTeX is all about 
easing your life with macros, packages, styles, and so on and I use all of it 
quite a lot. The downside is that after a while it is no longer obvious on 
which packages, listing-styles, tikz-styles, color definitions, custom macros, 
and so on -- all that stuff one usually puts (or has to put) in the preamble -- 
a certain frame depends. Things become even worse in a collaborative 
environment, where each of your colleagues has her own tool kit in this 
respect. An attempt to reuse just three slides from a colleague in one of my 
lectures turned out to be multi-hour project, because of such subtle 
dependencies, especially those that do not show up at compilation time, but 
just make the result looking weird, are hard to debug. 
 
Daniel

Re: Beamer multitude problems with lyx

2010-06-08 Thread Daniel Lohmann

On 07.06.2010, at 19:41, Steve Litt wrote:

> On Wednesday 02 June 2010 19:18:37 Ehud Kaplan wrote:
>> Steve,
>> To place a logo (or any other element of a template)  with vfill, hfill,
>> etc. is way too much work, since you have to do it on every slide,
>> dodging the other important stuff that the slide is to carry-- that is
>> what a template is supposed to do.
>> I'd be pretty happy with Beamer if they only added to the \logo{}
>> statement, in addition to the [height=..] option, a position argument.
>> It seems like it should be a rather small thing for them.
>> 
>> EK
> 
> Ehud,
> 
> I'm trying to join the Beamer-LaTeX mailing list in order to find a solution 
> to this problem. As you correctly pointed out, there's no obvious way to use 
> \vskip within either \logo or \footer -- it won't compile. Unfortunately it's 
> a very hard list to join (yeah, I know that's weird).
> 
> You've identified a serious shortcoming of Beamer, and I'm trying very hard 
> to 
> find a way around it, because I plan on using Beamer a lot.

Steve (and others),

I know that you a are a friend of pragmatic solutions (recalling the recurring 
discussion on how to do the front matter), so here is mine with respect to 
beamer, which kind of resembles your front-matter approach :-)

I tried for about a day to implement my group's slide style with beamer, 
including a logo on every slide, of course, but also some other graphical 
elements. (If there is one thing I really dislike about beamer than it are the 
standard styles. I have seen them just too many times, they look all the same. 
IMHO, it should not be overly obvious to the audience which tool the presenter 
has used to create her presentation!)

After fiddling around just too long with pgfimage and Co I gave up and went for 
the brute force approach. I "draw" the slide style with my graphics program of 
choice into an PDF image of exactly 128x96 mm (the dimensions of a beamer 
slide). Then I install this as the "background" image on every page. I do not 
use any additional beamer style stuff, and -- voila, there we are. In the style 
file this looks as follows:

%
% background image setup
%
% This is the real trick :-) All graphical elements of the i4-layout are just
% in the background image. To support the "plain"-option for frames, we actually
% need two different background images (and probably a third one for the title
% slide, don't know yet)
%
%
  \usebackgroundtemplate{
\ifbea...@plainframe%
  \includegraphics[width=\paperwidth]{beamerthemei4_bgplain}%
\else %
  \includegraphics[width=\paperwidth]{beamerthemei4_bg}
\fi%
  }

Of course, this approach is not really the "beamer philosophy". You cannot 
combine it as smoothly with outer styles, inner styles, and all this stuff ... 
but what the heck -- I do not need (pseudo-) variety, I need just ONE style 
"done right". 

Here is a link to an example presentation:

http://www4.informatik.uni-erlangen.de/Publications/2010/urban_10_aosd-slides.pdf

Daniel

Re: Save Date vs. Print Date

2010-05-28 Thread Daniel Lohmann

>> Nice trick. But wouldn't the  final result be identical to the print date, 
>> since pdftex checks the modification date of a tex file created on the fly 
>> by lyx at print time? Or there is something more involved I don't understand?
> 
> Stefano, you are right, of course!
> 
> We need the path to the LyX-File, not to the generated .tex file:
> 
> \date{\expandafter\parsedate\pdffilemoddate{/Users/lohmann/test.lyx}\empty}
> 
> However, I would prefer not to hard-code the absolute path to the LyX file. 
> Fortunately, LyX defines \in...@path in the preamble as the file path to the 
> LyX-file directory:
> 
> \def\in...@path{{/Users/lohmann//}}
> 
> However, the following does /not/ work:
> 
> \date{\expandafter\parsedate\pdffilemoddate{\in...@path\jobname.lyx}\empty}
> 
> Apparently, the problem is the double curly braces that LyX uses in the 
> definition of \in...@path and that somehow influence the TeX-internal 
> scanning; with the following definition it /would/ work: 
> 
> \def\in...@path{/Users/lohmann//}
> 
> Does anybody know, how to expand \in...@path in a way that the double curly 
> braces do not cause these troubles?


I have found the xstring package, which provides a \StrRemoveBraces command 
that helps here:

\usepackage{xstring}
\strremovebraces{\in...@path\jobname.lyx}[\lyxfilepath]
\def\parsedate #1:20#2#3#4#5#6#7#8\empty{20#2#3/#4#5/#6#7}
\date{\expandafter\parsedate\pdffilemoddate{\lyxfilepath}\empty}

Attached is a .lyx-file that demonstrate this.

Nevertheless, I would prefer a solution that does not employ xstring.

Daniel




moddate.lyx
Description: Binary data


Re: Save Date vs. Print Date

2010-05-28 Thread Daniel Lohmann

On 28.05.2010, at 21:24, stefano franchi wrote:

> 
> 
> On Fri, May 28, 2010 at 5:33 AM, Daniel Lohmann 
>  wrote:
> 
> On 28.05.2010, at 00:30, Tim Wescott wrote:
> 
> 
> Assuming you are compiling with pdftex as backend (which is most probably the 
> case, as all more or less recent LaTeX-Distributions use it by default -- 
> even when compiling to dvi), you can use the  \pdffilemoddate{} 
> built-in command to retrieve the "last modified" date of .
> 
> LyXically and applied for the own source file this comes down to the 
> following two lines, which should be inserted into your document's preamble:
> 
> \def\parsedate #1:20#2#3#4#5#6#7#8\empty{20#2#3/#4#5/#6#7}
> \date{\expandafter\parsedate\pdffilemoddate{\jobname.tex}\empty}
> 
> (You can alter the display format, e.g., to use full stops instead of hyphens 
> as separators, by modifying the \empty{} part of the first line.
> 
> 
> Nice trick. But wouldn't the  final result be identical to the print date, 
> since pdftex checks the modification date of a tex file created on the fly by 
> lyx at print time? Or there is something more involved I don't understand?

Stefano, you are right, of course!

We need the path to the LyX-File, not to the generated .tex file:

\date{\expandafter\parsedate\pdffilemoddate{/Users/lohmann/test.lyx}\empty}

However, I would prefer not to hard-code the absolute path to the LyX file. 
Fortunately, LyX defines \in...@path in the preamble as the file path to the 
LyX-file directory:

\def\in...@path{{/Users/lohmann//}}

However, the following does /not/ work:

\date{\expandafter\parsedate\pdffilemoddate{\in...@path\jobname.lyx}\empty}

Apparently, the problem is the double curly braces that LyX uses in the 
definition of \in...@path and that somehow influence the TeX-internal scanning; 
with the following definition it /would/ work: 

\def\in...@path{/Users/lohmann//}

Does anybody know, how to expand \in...@path in a way that the double curly 
braces do not cause these troubles?

 Daniel

Re: Save Date vs. Print Date

2010-05-28 Thread Daniel Lohmann

On 28.05.2010, at 00:30, Tim Wescott wrote:

> Under the 'Article' document type, the title page will list the print date of 
> a document.
> 
> But I vastly prefer to insert my own date, or to list the save date of the 
> file -- it just makes more sense for tracking changes.
> 
> Is there a way to get LyX to do this? I didn't see it in the menus.

Assuming you are compiling with pdftex as backend (which is most probably the 
case, as all more or less recent LaTeX-Distributions use it by default -- even 
when compiling to dvi), you can use the  \pdffilemoddate{} built-in 
command to retrieve the "last modified" date of . 

LyXically and applied for the own source file this comes down to the following 
two lines, which should be inserted into your document's preamble:

\def\parsedate #1:20#2#3#4#5#6#7#8\empty{20#2#3/#4#5/#6#7}
\date{\expandafter\parsedate\pdffilemoddate{\jobname.tex}\empty}

(You can alter the display format, e.g., to use full stops instead of hyphens 
as separators, by modifying the \empty{} part of the first line.

I have found the basics of this trick on the net some time ago, so I do not 
want claim authorship for it. Note that in its current form \parsedate only 
works for the years 2000 -- 2099.

Daniel
 

Re: General Question

2010-05-19 Thread Daniel Lohmann

On 18.05.2010, at 17:02, RIchard Heck wrote:

> 
> Sending this to user's, too
> 
> On 05/18/2010 10:24 AM, Wes Lakenan wrote:
>> 
>> Hi,
>>  
>> My company is looking into switching from MS Word to a less stressful 
>> program to create textbook-like binders.  My company is a government 
>> contractor that teaches program management courses that utilize both printed 
>> text and PowerPoint presentations.  Right now, we create PowerPoint files 
>> and copy/paste them into a Word document.  This allows the students to 
>> follow along with the printed text and use the inserted PowerPoint slides to 
>> follow the presentation.  However, every time a slide is changed or deleted, 
>> every slide needs to be reinserted.  Is it possible to insert individual 
>> slides throughout the document one by one?  I appreciate any help you can 
>> give me. 
>>  
> I have only a very vague sense what you are trying to do, but I think this 
> kind of thing would be possible. Is the idea that the slides from the 
> presentation appear as images in the text, so that the student can see them 
> there with the text?
> 
> If so, then I would think the workflow could look like this. You create two 
> separate documents: a LyX document for the text, and a presentation document, 
> for which you could use OpenOffice Impress or LyX itself, via the Beamer 
> class, or you could stick with PowerPoint. You print the presentation 
> document as a PDF and then use something like pdftoppm to convert the pages 
> of the pdf to images. The images themselves can then be inserted into the LyX 
> document in the usual way. Since all of this is just running a bunch of 
> programs, it could all be automated, even, though you might have to check the 
> image names manually, as they could change if you'd added or removed pages.

It's even easier than that as LyX/Latex (\includegraphics) can directly embed a 
certain page of a PDF file as graphics. 

The general idea is to have the slides as external material that is *referenced 
from* the textbook document instead of *copied into* it, so that whenever a 
silde changes, it also changes in the textbook. Note: While I surely would like 
to convince you to use LyX, this should be possible with Word as well (at least 
it used to be possible ten years ago).

Daniel

  



Re: Bibtex question. How do I insert scans of covers.

2010-03-02 Thread Daniel Lohmann


On 02.03.2010, at 09:04, mario wrote:


Il giorno lun, 01/03/2010 alle 22.29 +0100, Daniel Lohmann ha scritto:

On 01.03.2010, at 21:33, mario wrote:





Just an untested idea: Have you tried (mis-)using the "note" field  
for

this purpose?

@book {...

note={\includegraphics{...}}
}

This probably won't work within LyX, as LyX would not copy the image
files to the temporary generation directory. However, with plain  
LaTeX

it might do the trick.


Daniel


I get the following error:
./myfile.bbl:4:Undefined control sequence $\includegraphics



You have to include some graphics package (e.g.,  
\usepackage{graphicx}) in your preamble.


Daniel


Re: Bibtex question. How do I insert scans of covers.

2010-03-01 Thread Daniel Lohmann


On 01.03.2010, at 21:33, mario wrote:


Hi

thanks for your reply.

Il giorno lun, 01/03/2010 alle 17.14 +0100, Uwe Stöhr ha scritto:

mario schrieb:


My question is: I would like to include scans of covers and selected
pages within my bibtex entrie (and final output), how do I do?


Personally, I use the BibTeX entry type "misc" for such cases.


yes, but  then how do you get the scan image in the final .dvi  
(or .pdf)

output?


Just an untested idea: Have you tried (mis-)using the "note" field for  
this purpose?


@book {...

note={\includegraphics{...}}
}

This probably won't work within LyX, as LyX would not copy the image  
files to the temporary generation directory. However, with plain LaTeX  
it might do the trick.



Daniel

Re: Convert "Comment" into "Marginal Note"

2010-02-16 Thread Daniel Lohmann

Hi Diego,

I did something similar for "lyxgreyedout" in my dissertation. The  
caveat is that both., "lyxgreyedout" and "comment" are environments,  
whereas marginpar is a command. So actually you are looking for a  
technique to grab the content of an environment in a way it can be  
passed to a command.


After hours of googling I had found the trick. The amsmath package  
provides  a fairly magic macro called \coll...@body to perform this  
task.


I have added the respective lines from my thesis preamble. I developed  
three variants to typeset the comments, but don't know if the  
marginpar variant ever really worked. The tikz variant was way  
cooler :-)



Have fun,

Daniel

%*
%** handling of notes  

% LyX typesets "greyed out" notes in an LaTeX environment  
"lyxgreyedout". By

% redefinition of this environment, we can control how notes are printed
% out in the PDF.
%
% The \coll...@body (provided by amsmath) trick was taken from
% 
http://groups.google.com/group/comp.text.tex/browse_thread/thread/4cc1379654f40925/2316a38e9912fe23?lnk=st&q=+%5Ccollect%40body+1995+&rnum=1#2316a38e9912fe23
% Basically, it can be used to pass all content of an enviroment to a  
command.


%%   % Variant 1: typeset notes as \marginpar (yet to be completed)
%%  \makeatletter
%%  \renewenvironment{lyxgreyedout}{\coll...@body\@NOTE}{\global 
\...@ignoretrue}

%%  \newcomma...@note[1]{\marginpar{#1}}
%%  \makeatother
%%  \addtolength{\textwidth}{-5cm}



%%  % Variant 2: typeset notes as footnotes. We use the bigfoot package
%%  % to define our own footnote stack for the notes
%%
%%
%%  % The following replaces the default \footnote command by an own
%%  % to ensure that ordinary footnotes are always printed first
%%  \DeclareNewFootnote{A}
%%  \renewcommand{\footnote}{\footnoteA}
%%
%%  % This defines the \footnoteNOTE command for the extra stack.
%%  % "greyed out" are printed as sans-serif, red colored footnotes
%%  % with captial arabic numbering
%%  \DeclareNewFootnote[para]{NOTE}[Alph]
%%  \renewcommand{\footnoteNOTE}{%
%%\stepcounter{footnoteNOTE}%
%%\textcolor{red}{\Footnotemark\thefootnoteNOTE} \FootnotetextNOTE 
\thefootnoteNOTE}

%%
%%  % redefine the lyxgreyedout environment
%%  \makeatletter
%%  \makeenvironment{lyxgreyedout}{\coll...@body\@NOTE}{\global 
\...@ignoretrue}
%%  \newcomma...@note[1]{\footnotenote{\begin{minipage}[t]{\textwidth} 
{\scriptsize\sffamily{\textcolor{red}{#1}}}\end{minipage}}}

%%  \makeatother

%%   % Variant 3: typset notes with tikz as marginpars
   \usepackage{tikz}
%%   \makeatletter
%%   \makeenvironment{lyxgreyedout}{\coll...@body\todonote}{\global 
\...@ignoretrue}%

%%   \makeatother
%%
%%   \newcommand{\todoNOTE}[1]{%
%% \begin{tikzpicture}[remember picture, baseline=-0.75ex]%
%%   \node [coordinate] (inText) {};%
%% \end{tikzpicture}%
%% \marginpar{%
%%   \begin{sffamily}%
%%   \begin{scriptsize}%
%%   \begin{tikzpicture}[remember picture]%
%% %  \draw node[draw=Orange_4, fill=Orange_4!50, text width =  
3.4cm ] (inNote)
%%   \draw node[draw=Gray_40, fill=Gray_10, text width =  
3.4cm ] (inNote)

%%   {#1};
%%   \end{tikzpicture}%
%%   \end{scriptsize}%
%%   \end{sffamily}%
%% }%
%% \begin{tikzpicture}[remember picture, overlay]%
%%   \draw[draw = Gray_40, thick]
%% %  \draw[draw = Orange_4, thick]
%%   ([yshift=-0.2cm] inText)
%% -| ([xshift=-0.2cm] inNote.west)
%% -| (inNote.west);
%% \end{tikzpicture}%
%%   }%

  % Variant 4: ignore them at all -- for the final print
  \makeenvironment{lyxgreyedout}{}{}


On 13.02.2010, at 19:51, Diego wrote:

Hi, using LyX I'm trying to convert the "comments" into "marginal  
notes".


I tried several things but without luck.

The best shot was like this:

\makeatletter
\...@ifundefined{comment}{}{%
\renewenvironment{comment}[1]%
{\begingroup\marginpar{\bgroup#1\egroup}}%
{\endgroup}}
\makeatother

or like this:

\...@ifundefined{comment}{}{%
\renewenvironment{comment}%
{\marginpar{}%
{}}%

But what I get is only the first character of the text converted.  
Like in the attached image.


I searched a lot trying to find how to solve this but without luck.  
I found the explanation of what is happening here:http://theoval.cmp.uea.ac.uk/~nlct/latex/csed/solutions/fonts.html


Unexpected Output
Only one character is in the new font
You thought you changed font over a selection of text, but only the  
first character has come out in the new font.
You have most probably used a command instead of a declaration. The  
command should take the text as its argument. If you don't group the  
text, only the first character will be passed as the argument.


What I don't know and wasn't able to find is how to group the text.

Hope someone could help me :-)

Many thanks.

Best Regards,
Die

Re: export pdf only in certain pages

2010-01-21 Thread Daniel Lohmann


On 22.01.2010, at 06:13, Waluyo Adi Siswanto wrote:


Dear All

I am going to export lyx file to pdf, but not all pages.
What I usually do: File>export>pdf(pdflatex)
but it will export all pages.

Is that possible to chose only at specific pages, for example page 13
to 14 only.


This is not possible directly from within LyX or pdflatex. However,  
you can easily use an external tool to extract the pages you want from  
the final pdf, such as the free pdftk tool kit (pre-installed on most  
Linux distros, easily to get via macports/fink on Mac and most  
probable also available for windows):


(1) Export from lyx to doc.pdf

(2) run the following command in a command shell:

pdftk doc.pdf cat 14-14 output doc-selected-pages.pdf


Daniel


Re: Why this list refuses small zip / 7z archives ?

2010-01-21 Thread Daniel Lohmann
I can recommend DropBox (http://www.dropbox.com) for this purpose.  
They offer 2GB of free space and their software (Linux/Mac/Windows)  
seamlessly integrates this storage into your file system: You just  
copy your files to the local "Dropbox/Public" folder (via command  
line, Explorer, Finder, or whatsoever), from which it is transparently  
synchronized with the server. Right-clicking on an item gives you the  
option to copy the "public URL" in the clipboard you can then paste  
into the e-mail.


I have been using it for quite a while under OS X without any  
complaints so far. No spamming/advertising, no service dropouts, and  
really easy to use.


Daniel


On 20.01.2010, at 18:14, Steve Litt wrote:


On Wednesday 20 January 2010 11:37:38 John Coppens wrote:

On Wed, 20 Jan 2010 09:14:18 +0100

Olivier Ripoll  wrote:
I'm not planning to attach the images individually, there are more  
than
100 files (including variants and some xcf)! How can I send them  
to the

list. Should I change the extension to pretend it's something else ?


Hi Olivier,

A rather simple solution is using one of the file share sites such as
rapidshare.com, hotfile.com, megaupload.com, upload.to, or one of
many others. For small files, the service is free, and they'll  
delete the

files after some time automatically.

John


Yeah, and that way you don't have to take the time to mess around  
with the
wiki. I'm like you Oliver -- my days are too short to be wikiing  
around just

to distribute a few files.




Re: Table Challenge

2010-01-20 Thread Daniel Lohmann


On 20.01.2010, at 11:25, Steve Sidney wrote:


Rob

Thanks. Although I haven't used the longtable package, I am aware of  
its exsistence.


My report is already some 30 odd pages and if I allow each table to  
take 2 pages it will make it even more bulky.


There seems to be two alternatives.
1) Carry on preparing the table by hand as I currently do and then  
importing it directly into Lyx.

2) Attempt to create the table in R.

Do you think it's worth the effort to do this in R.



Another quick shot idea: Use longtables in combination with multicol  
to let your table break over two columns on the same page.


Don't know if this exactly works, though.

Daniel



Re: floats and subfloats with longtables SOLVED

2010-01-14 Thread Daniel Lohmann

Hi Rob,

a clean solution might be possible using the afterpage package.  
Basically it provides the \afterpage{} command, which  
causes the expansion of  to be postponed until LaTeX has  
shipped out the current page. If you insert your long table this way,  
it should (theoretically) appear on the beginning of the next page  
without interrupting the flow of text on the current page.



Daniel


On 14.01.2010, at 16:20, Rob Oakes wrote:


Hi Helge,

You make good  points, but there is a third use case that I am  
currently struggling with (and which Liviu's solution appears to  
address, at least in part).  What do you do with long tables that  
you don't want to disrupt the flow of the text?


Let me give you an example.  I am currently working on a book about  
writing with open source tools.  One of the chapters in this book is  
an overview of the different LaTeX classes and their options.  For  
some of the classes (like Memoir and Beamer), there are many  
different options that control the appearance of headers, footers  
and chapter headings.  In trying to describe the options, I've found  
that the most space efficient way is to create a long-table.  Some  
of these tables can stretch over two, or sometimes even three pages.


However, I want them to work like floats, in that the table will be  
started at the top of a new page without disrupting the flow of the  
other text.  The current long-table approach doesn't work very well  
in that I have to manually calculate the page breaks and move the  
environment to an appropriate place in the text.  This is similar to  
how I would need to work with Word and is very frustrating.


Are you aware of a method to position long tables so that they  
combine the best featrues of the float environment (e.g. semi- 
automatic displacement so that they don't disrupt the flow of the  
text) and the long-table environment (so that you can have page  
breaks at appropriate places)?


For me, getting the sort of sub-labeling described by Liviu is not  
something I am concerned about.  In fact, I would prefer to maintain  
the standard labeling scheme (Table ChapNum.TableNum).


Cheers,

Rob Oakes





Re: Lining up text and graphics in tables?

2010-01-13 Thread Daniel Lohmann



Thanks Daniel,

Yeah, I tried a minipage containing three minipages just before I  
wrote the

original email. It walked waay off the right side of the page.

Hmmm, but I didn't try the textwidth and hfill. Where would I place  
the
\textwidth, and how would I back it out once all these triples are  
complete?




Hi Steve,

the width of the minipage can be set up in its settings; the hfill can  
be entered in LyX via "Insert->Formatting->Horizontal Space...".  
However, never mind -- the "hfill trick" works only with two columns,  
for three we need to do something different.


Attached is a LyX file with three minipages in a row. I have set the  
width of each minipage to 0.3\textwidth (30 textwidth% in the LyX  
minpage settings) and inserted a horizontal space of 0.05\textwidth (5  
textwidth%) in between, so the complete row should sum up to 100  
textwidth%.


The spacing has to be done via ERT, as LyX does not allow to enter  
relative dimensions in the "Horizontal Space" dialog.


It's pretty obvious -- once you have seen it. Well LyX and LaTeX tend  
to be like that :-)


Have fun,

Daniel



3minipages.lyx
Description: Binary data




Re: Lining up text and graphics in tables?

2010-01-12 Thread Daniel Lohmann


On 12.01.2010, at 07:05, Steve Litt wrote:


Ugh!

I wanted rows with 3 columns. Column 1 is the name of the graphic.  
Column 2 is
the graphic itself. Column 3 is a short explanation of the graphic.  
I used
individual 1 row, 3 column tables to save room and make sure pages  
broke

reasonably.

Trouble is, no matter how I set cell alignment in any of the  
columns, the
graphic always rises to the top, and the text (in other columns/ 
cells mind
you) always starts just below where the graphic ends, thereby  
costing a lot of

space, looking ugly, and causing confusion.

Does anyone have an idea how to get the graphic and text to line up  
correctly,
vertically, within their respective cells? Does anyone have any idea  
what

would cause the behavior I describe?


Hi Steve,

have you tried using minipages instead? In my experience they tend to  
be less fragile than tables. I have never tried 3 columns (just 2 so  
far), but that shouldn't matter. Just insert 3 minipages side by side  
with a width of 33% \textwidth and a \hfill in between.


Daniel 


Re: input preamble with biblatex?

2010-01-06 Thread Daniel Lohmann


On 06.01.2010, at 10:58, Jürgen Spitzmüller wrote:


Guenter Milde wrote:

In older LyX versions, you could choose to compile without temporary
directory. Is this still supported?


I don't think so.


Which is a pity, IMHO.

Not only this would be an easy workaround for all problems related to  
not natively supported external material (and we have many cases for  
that), I also really liked the fact, that I always had the latest PDF  
version of the document at hand without having to explicitly export it  
first.


Daniel

Re: calender

2010-01-05 Thread Daniel Lohmann


On 29.12.2009, at 19:55, Paul Sutton wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Lohmann wrote:


The PGF/TikZ package contains a quite decent calendar library. Within
LyX you have to use ERT as it is a LaTeX package, but its relatively
easy to use.

Daniel

Ok thanks

I have found http://www.texample.net/tikz/examples/ to give a few good
examples,  i have pgf installed but do I need to install TikZ as a
separate package, under ubuntu ?

or are they one package.


Hm... usually they are shipped as one package. However, historically  
PGF was first and previous versions of PGF were also shipped with  
latex-beamer (by the same author), so I am not completely sure.


Will have a read of the tutorial and information files.

TikZ comes with an impressive amount of documentation and examples;  
there are several calendar examples in  pgfmanual.pdf.


Daniel


Re: LyZ: LyX plugin for Zotero

2010-01-02 Thread Daniel Lohmann


On 30.12.2009, at 01:57, Pavel Sanda wrote:


Petr Šimon wrote:
Currently the citation key can be made out of 'author', 'year',  
'title' and
optionally from separators like '_'. I will add another keyword,  
'zotero'

that will create the cite key from unique identifier in zotero db.


yep, this was the main complaint in bug #6300. i expect two usecases -

* users who dont care a about citekeys and just want to externally  
push
 citations and need to keep bitex keys stable. for these zotero ID  
is the way.


* users who care about keys and need the stable bibtex keys too. for  
those
 the "customizable" citekey is the way. in this case is expecting  
users to

 be intelligent about the keys certainly in order.



Hey Petr,

Thanks for all the hard work on LyZ. I haven't checked out Zotero for  
a while; liked it a lot, but the integration with LyX was odd and it  
tended to corrupt my bibtex databases. However, with LyZ I will give  
it another try.


I just want to put emphasize the importance of customizable citation  
keys! Many of us work in collaborative environments with shared bibtex  
databases and specific "home grown" requirements on how the keys are  
made up. For instance, in our group this is:
 :: (with  being an  
abbreviation for the conference or journal the paper appeared.)
In fact, in my group this it has always been the number one argument  
against bibtex frontend XYZ that it does not get the keys right.


Having said that, I would appreciate an even better configurability of  
the key generation. What I would really like is the option to enter an  
advanced formatting string to generate the keys, including besides the  
variables for author, year, etc. various formatting specifiers and  
conditionals, such as:

- number of digits (e.g., use only the two last digits of the year)
- upper case/lower vase (very important, unfortunately very few tools  
support this)
- conditionals (e.g., @book entries do not have a ; URLs do not  
have a year and the  is 'site')

- ...

Another important point in which most, if not all, bibtex frontends  
fail miserably is the requirement to be "minimally invasive" on the  
bibtex database. Some collaborators still prefer editing the database  
with a text editor. What I expect from  a good frontend is that it  
leaves all entries alone in the file that have not been modified in  
the current session,  including formatting, LaTeX comment lines  
beginning with %, and so on. Basically, if I use your tool to add or  
edit an entry 'foobar' and update the bibtex file underneath, the the  
diff to the previous version of the bibtex file should contain only  
lines that are related to the 'foobar' entry.


Just my 2 items on the long-term wish list :-)

Daniel



Re: calender

2009-12-29 Thread Daniel Lohmann


On 27.12.2009, at 00:41, Steve Litt wrote:


On Saturday 26 December 2009 18:02:09 Paul Sutton wrote:

Hi

Is it possible to produce a calender in LyX, I am looking for some  
sort

of plug in or style to do it.

thanks

Paul



I'm sure it's possible, probably with a series of tables, one for  
each month.


But I can sure see a lot of easier tools to use for a calender,  
especially if

you know a little bit of scripting language programming.


The PGF/TikZ package contains a quite decent calendar library. Within  
LyX you have to use ERT as it is a LaTeX package, but its relatively  
easy to use.


Daniel


Re: Option Clash with hyperref

2009-09-11 Thread Daniel Lohmann


On 10.09.2009, at 22:58, Rob wrote:


Hi,

I want to use backref, but I'm getting an options clash.  I read in  
a past post
that there is some mess when trying to specify the options in  
hyperref since
they're already set but that a work around is to add a \hyperset  
argument to the

preamble.  In this case, I tried the following without any success:

\hyperset{pagebackref=yes}


AFAIK the backref options cannot be set by \hyperset, but have to be  
passed when hyperref is loaded.


Daniel


Re: How to get a preview for "custom" graphics format?

2009-08-25 Thread Daniel Lohmann


On 14.08.2009, at 15:56, Pavel Sanda wrote:


Daniel Lohmann wrote:
Or am I mistaken here? I am still seeking for a definite answer  
regarding
the conversion route that to my understanding is automatically  
deduced by
LyX (TiKZ --> PDF | PDF --> Preview). It seem that (newer?)  
versions of LyX
just pass everything right through to ImageMagik and do not bother  
with

deducing a conversion route?


without looking into the code, creating tikz->png convertor wont help?
pavel


Just to close this thread:

Defining an additional tikz->png converter does indeed solve the  
problem. Another possible solution is to extend the convertDefault.py  
script to recognize "TikZ:" as input format. For convenience reasons,  
this is the route I have been taking.



If others would like to try this:  Here are the step-by-step  
instructions:


-- Under [File Handling --> File formats] add a new file format "TikZ"  
as Vector graphics format,Short Name: "Tikz", Extension: "tikz",  
and Editor: "vim".


-- Under [File Handling --> Converters] add a Converter Definition  
"TikZ --> PDF (ps2pdf)"with Converter: "pdflatex - 
interaction=nonstopmode $$i"


-- Replace the convertDefault.py script by the attached version.

Disclaimer: This are my very first lines of Python code!

Note: According to the docs, it should be enough to put the customized  
version of convertDefault.py into $LYXUSER/scripts (~/Library/ 
Application Support/Lyx-1.x on the Mac). However, on my system (Mac OS  
X, LyX 1.6.3) it seems to remain unrecognized in this position, so I  
ended up with replacing the default version.



Daniel



#!/usr/bin/env python
# -*- coding: utf-8 -*-

# file convertDefault.py
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.

# \author Herbert Voß
# \author Bo Peng

# Full author contact details are available in file CREDITS.

# The default converter if no other has been defined by the user from the
# Conversion->Converter tab of the Preferences dialog.

# The user can also redefine this default converter, placing their
# replacement in ~/.lyx/scripts

# converts an image from $1 to $2 format
import os, re, sys

# We may need some extra options only supported by recent convert versions
re_version = re.compile(r'^Version:.*ImageMagick\s*(\d*)\.(\d*)\.(\d*).*$')
fout = os.popen('convert -version 2>&1')
output = fout.readline()
fout.close()
version = re_version.match(output)
major = int(version.group(1))
minor = int(version.group(2))
patch = int(version.group(3))
version = hex(major * 65536 + minor * 256 + patch)

opts = "-depth 8"

# DL: If input format is "TikZ" convert it to pdf first by calling pdflatex 
# then use the generated pdf as input to ImageMagik's convert
if sys.argv[1][:5].lower() == 'tikz:':
if os.system(r'pdflatex -interaction=nonstopmode "%s"' % (sys.argv[1][5:])) != 0:
print >> sys.stderr, sys.argv[0], 'ERROR'
print >> sys.stderr, 'Execution of "pdflatex" failed.'
sys.exit(1)

# Now use the generated pdf as input format.
sys.argv[1] = "pdf:"+sys.argv[1][5:-4]+"pdf"

# If supported, add the -define option for pdf source formats 
if sys.argv[1][:4] == 'pdf:' and version >= 0x060206:
opts = '-define pdf:use-cropbox=true ' + opts

# If supported, add the -flatten option for ppm target formats (see bug 4749)
if sys.argv[2][:4] == 'ppm:' and version >= 0x060305:
opts = opts + ' -flatten'

if os.system(r'convert %s "%s" "%s"' % (opts, sys.argv[1], sys.argv[2])) != 0:
print >> sys.stderr, sys.argv[0], 'ERROR'
print >> sys.stderr, 'Execution of "convert" failed.'
sys.exit(1)






Re: How to get a preview for "custom" graphics format?

2009-08-13 Thread Daniel Lohmann


On 13.08.2009, at 11:22, Pavel Sanda wrote:


Jürgen Spitzmüller wrote:

Pavel Sanda wrote:
- to make a python script which would take the parent document  
dumps the
preamble, then inputs tikz, latex it and returns figure for both  
preview

and output.


Here is such a python script (although it is a bit too UNIX-centric):
http://kogs-www.informatik.uni-hamburg.de/~meine/tikz/process/


in a case some of the intersted people write and test the external  
template

we could include it with this script in a proper lyx release.


The real problem is to get the preamble right. Because TikZ is a huge  
package that has a noticeable impact on LaTeX compilation times (and  
memory consumption), it is pretty well modularized into multiple  
libraries. A typical preamble for a TikZ figure looks as follows:


\usepackage{tikz}
\usetikzlibrary{fit,positioning,shapes,shapes.multipart, what you actually use in the figure>}


With the external-template mechanism, as far as I understand it, the  
additional stuff for the preamble can only be hard-code in the  
template and not be examined (e.g. by invoking some script) for the  
actual TikZ figures to embed.



Daniel 

Re: How to get a preview for "custom" graphics format?

2009-08-13 Thread Daniel Lohmann


On 12.08.2009, at 09:53, Guenter Milde wrote:


On 2009-08-11, Pavel Sanda wrote:

Daniel Lohmann wrote:
that mean that it is *not possible* to achieve goal (1) (the  
preview in

LyX, everything else works) via file formats and converters only?



unless imagemagick convert utility knows how to deal with it (i think
it doesn't) i'm not aware of such a plain route.


As the tkiz -> PDF (ps2pdf) conversion seems to work, the problem  
should be

solvable with a definition for PDF (ps2pdf) -> PNG.



I think I am going to try this. The point is that I still do not  
understand why this possibly could help!


- As far as I understand "PDF (ps2pdf)" is just the "default" PDF- 
Format (pdf1).
- LyX is able to create previews from files in this format  
"automagically".


Or am I mistaken here? I am still seeking for a definite answer  
regarding the conversion route that to my understanding is  
automatically deduced by LyX (TiKZ --> PDF | PDF --> Preview). It seem  
that (newer?) versions of LyX just pass everything right through to  
ImageMagik and do not bother with deducing a conversion route?


Daniel


Re: How to get a preview for "custom" graphics format?

2009-08-13 Thread Daniel Lohmann


On 13.08.2009, at 06:47, Paul Johnson wrote:


On Fri, Aug 7, 2009 at 9:52 AM, Daniel
Lohmann wrote:

Hi,



So here is what I want to achieve:

I have some TikZ figures (which are actually stand-alone LaTeX- 
documents
with the extension .tikz) that I want to embed (not the source, but  
the
PDF/EPS via \includegraphics) into my LyX document in a way that  
(1) the
LyX-Preview does work (2) PDF generation does work, and (3)  
the .tikz-file

is opened in vim when I select "Edit externally..."


I am sorry if I am telling you something you already know, but...

It seems to me you are throwing away the value of TikZ by doing this.




Recall that one of the strengths of TikZ/pgf is that the fonts and
such in the figure will match the document. If you persist in keeping
the TikZ as stand alone latex documents, you are destroying that
possibility.
I don't think the document will ever compile because of
the duplicate preambles and such that the latex system encounters.
On the  other hand, if the TikZ file is just the TikZ figure, then I'd
be more optimistic.

But I don't think it is wise to convert the tikz to pdf and embed that
with includegraphics.
Rather, I think you just want to include the tikz code itself. You can
just use input on the TikZ figure itself. If you put that inside a LyX
floating graphic or a minipage, it "just works" in the final
processing. In Lyx, choose "Insert" "File" "Child Document" and then
choose your tikz text file.  As long as it is just the figure, it is
all good. I've just tested it, and it does work.

But you won't get an in-document preview in LyX without a  bit of
messing about.  I think that's where the other guy who refers you to
the Dia code has a good idea.  I've tried to figure that part out, but
no solution yet. We need a way to tell LyX to pass the Tikz figure
code straight through to LaTeX, but we also want an on-screen preview
of what that will be like.  But it is inherently impossible to get a
preview of what that will be like without compiling the whole
document.  A conundrum for me.


Paul,

Your comments are very valid, but I intentionally want to have the  
possibility to compile the TikZ-figures externally and embedd them as  
PDF:


- TikZ can increase compilation times *dramatically*. If you embed  
dozens of nontrivial TikZ figures "as code" into your document,  
compilation of your LyX document may take minutes instead of seconds.
- During the development of the TikZ figures (a time-consuming process  
of its own) I need to compile and debug them "stand alone" with short  
roundtrip times.

- PDF images are much easier to scale (to, e.g, pagewidth)
- Regarding the font (and styles and colors...) issue: I solve it by  
setting that up in a common preamble that is \input'ed into the LyX  
document and the TikZ figures. However, on some (rare) occasions I  
*want* to have different fonts in the figure than in the document.  
This, again, is easy to achieve via the PDF route, but requires quite  
same hacking if the figure is embedded into the source.


In fact, I can imagine only one situation I would prefer embedding  
TikZ figures by source: If they contain references into other parts  
of  the document (such as clicking on a TikZ node should bring you to  
page 212 or you refer to some bibliography item within the figure).


Daniel


Re: How to embed a spreadsheet in LyX or LaTeX?

2009-08-13 Thread Daniel Lohmann


On 11.08.2009, at 23:48, Phil wrote:



You might also try excel2latex




I can also recommend excel2latex. I used it quite a lot when I was  
writing my thesis. The nice thing about it is that it also preserves a  
sensible part of the formattings (e.g., bold headlines, right aligned  
data, ...). The following process worked pretty well for me:


(1) Open an empty, but compilable LaTeX document (ou may export an  
empty LyX document to LaTeX to get one) in your favorite text editor.


(2) Use excel2latex  to copy the marked part of the Excel table as  
LaTeX code into the clipboard.


(3) Paste the table into the LaTeX document and save the document.

(4) Import the LaTeX document into LyX.

(5) Copy the table from the imported LyX document into the target  
document.



Daniel


Re: How to get a preview for "custom" graphics format?

2009-08-11 Thread Daniel Lohmann


On 09.08.2009, at 17:31, Pavel Sanda wrote:


Daniel Lohmann wrote:

Your  help is highly appreciated!


try to mimic http://www.lyx.org/trac/changeset/27914
and ask for inclusion if you succeed. you may also
want to comment on bug 4882.


Hi Pavel,

Thanks for your answer!

However, I have to admit that I don't really get what you suggest me  
to do. As I read 27914, this introduces "Dia" support via  
external_templates. Does that mean that it is *not possible* to  
achieve goal (1) (the preview in LyX, everything else works) via file  
formats and converters only?  Do I have to go the external_templates  
route?


Thanks!

Daniel




Hi,

Even though I consider myself a "LyX master" in many respects, the  
exact usage of "File Formats", "Converters" and "External  
Material..." have always remained a mystery to me. Today I gave it  
another try (LyX 1.6.3-mac) -- and failed again.


So here is what I want to achieve:

I have some TikZ figures (which are actually stand-alone LaTeX- 
documents with the extension .tikz) that I want to embed (not the  
source, but the PDF/EPS via \includegraphics) into my LyX document  
in a way that (1) the LyX-Preview does work (2) PDF generation does  
work, and (3) the .tikz-file is opened in vim when I select "Edit  
externally..."


So far I got (2) and (3) working, but not (1):

-- Under [File Handling --> File formats] I have added a new file  
format "TikZ" as Vector graphics format,Short Name: "Tikz",  
Extension: "tikz", and Editor: "vim".


-- Under [File Handling --> Converters] I have added a Converter  
Definition "TikZ --> PDF (ps2pdf)"with Converter: "pdflatex $$i"


If I now embed a .tikz-file, external editing and PDF generation  
works fine, but LyX is not able to show a preview. As I interpret  
the output of "lyx -dbg graphics", LyX does not know how to  
generate a pixmap  from the input format ("TikZ"). Do I have to  
define a converter to some pixmap format as well?  How to do so?


This is pretty confusing. As I understand the manuals (don't  
remember where exactly I have read this) LyX should be able to  
deduce its route through conversion rules automatically, that is,  
to convert from TikZ to PDF first  and then from PDF to the pixmap  
required for the preview functionality.


How to get a preview for "custom" graphics format?

2009-08-07 Thread Daniel Lohmann

Hi,

Even though I consider myself a "LyX master" in many respects, the  
exact usage of "File Formats", "Converters" and "External Material..."  
have always remained a mystery to me. Today I gave it another try (LyX  
1.6.3-mac) -- and failed again.


So here is what I want to achieve:

I have some TikZ figures (which are actually stand-alone LaTeX- 
documents with the extension .tikz) that I want to embed (not the  
source, but the PDF/EPS via \includegraphics) into my LyX document in  
a way that (1) the LyX-Preview does work (2) PDF generation does work,  
and (3) the .tikz-file is opened in vim when I select "Edit  
externally..."


So far I got (2) and (3) working, but not (1):

-- Under [File Handling --> File formats] I have added a new file  
format "TikZ" as Vector graphics format, 
Short Name: "Tikz", Extension: "tikz", and Editor: "vim".


-- Under [File Handling --> Converters] I have added a Converter  
Definition "TikZ --> PDF (ps2pdf)" 
with Converter: "pdflatex $$i"


If I now embed a .tikz-file, external editing and PDF generation works  
fine, but LyX is not able to show a preview. As I interpret the output  
of "lyx -dbg graphics", LyX does not know how to generate a pixmap   
from the input format ("TikZ"). Do I have to define a converter to  
some pixmap format as well?  How to do so?


This is pretty confusing. As I understand the manuals (don't remember  
where exactly I have read this) LyX should be able to deduce its route  
through conversion rules automatically, that is, to convert from TikZ  
to PDF first  and then from PDF to the pixmap required for the preview  
functionality.


Your  help is highly appreciated!

Daniel



lyx.log
Description: Binary data


converter.lyx
Description: Binary data


image.tikz
Description: Binary data



 

Re: Sty to Layout problem

2009-07-27 Thread Daniel Lohmann


On 24.07.2009, at 02:25, Luis F. Amorim França wrote:


Thanks Daniel!

I tried to create a document with a ERT like

\title(Paper Title)
\author{Luis}

but when I compile it, the document is empty. Trying to use the Lyx  
Title

and Author, I get this message:

\author{Luis}\maketitle

The control sequence at the end of the top line of your error  
message was
never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I'  
and the
correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll  
forget

about whatever was undefined


Depending on the peculiarities of the latex class, more or less stuff  
has to be given in ERT - maybe even the abstract. The example I have  
attached, for instance, uses the "IOS-Book" class, which  requires the  
abstract to be defined within a special frontmatter environment.  
Because I did not want to bother with getting the peculiarities of  
this class right into a LyX layout, I ended up with a big ERT box in  
the beginning and only the real content is written in LyX.


The process: I usually use the latex example file that comes with the  
paper class as template, activate source preview in Lyx ("View->View  
Source", then check "Complete Source") to see what LyX would generate  
and then copy parts or larger chunks of the LaTeX example into ERT  
until the result looks compilable.


Daniel


is-book-example.lyx
Description: Binary data







Hi Luis,

This may not be exactly the answer you are looking for :-)

IMHO the front matter (the stuff that is rendered by \maketitle) is  
the
most difficult part to get right into a LyX layout, especially with  
paper

styles. Every paper style uses different concepts on how authors,
institutions, multiple authors per institution, authors with multiple
institutions,  "thanks"-titlenotes, and so on have to be specified.  
So even
with the well-designed paper layout files that ship with LyX (LNCS,  
IEEE,
...) I usually end up using ERT in the front matter to get what I  
need.


So if you are not going to write dozens of articles using that  
style, I
would just not bother in getting everything right into the layout  
and use

ERT in the paper to specify the front matter.


Daniel


On 23.07.2009, ad 01:43, Luis Amorim wrote:

Hi,


I'm trying to write an article at Lyx, but I had some problems  
when I

tried
to use a .layout I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3)  
but it


doesn't work at Lyx, especially when I try to add a Title (it says  
is a
\maketitle problem). Searching the mailing list I found someone  
who had

almost the same problem, and added

Style TitleERT
   InTitle 1

End

in the .layout to solve it. I tried to do that, but I still can't  
compile

my
files.

I attached the .sty and .layout files, and a .tex which is an  
example of

use.

Thanks!

Luis Amorim










Re: Sty to Layout problem

2009-07-22 Thread Daniel Lohmann

Hi Luis,

This may not be exactly the answer you are looking for :-)

IMHO the front matter (the stuff that is rendered by \maketitle) is  
the most difficult part to get right into a LyX layout, especially  
with paper styles. Every paper style uses different concepts on how  
authors, institutions, multiple authors per institution, authors with  
multiple institutions,  "thanks"-titlenotes, and so on have to be  
specified. So even with the well-designed paper layout files that ship  
with LyX (LNCS, IEEE, ...) I usually end up using ERT in the front  
matter to get what I need.


So if you are not going to write dozens of articles using that style,  
I would just not bother in getting everything right into the layout  
and use ERT in the paper to specify the front matter.



Daniel

On 23.07.2009, ad 01:43, Luis Amorim wrote:


Hi,

I'm trying to write an article at Lyx, but I had some problems when  
I tried

to use a .layout I created from the .sty file provided by the
conference. I've followed the Customization Instructions (5.2.3) but  
it


doesn't work at Lyx, especially when I try to add a Title (it says  
is a
\maketitle problem). Searching the mailing list I found someone who  
had

almost the same problem, and added

Style TitleERT
 InTitle 1

End

in the .layout to solve it. I tried to do that, but I still can't  
compile my

files.

I attached the .sty and .layout files, and a .tex which is an  
example of

use.

Thanks!

Luis Amorim






Re: [Figure embedding] An easy way to share lyx documents

2009-04-26 Thread Daniel Lohmann


On 17.04.2009, at 15:25, Niko Schwarz wrote:

On Fri, Apr 17, 2009 at 8:53 AM, Rainer M Krug   
wrote:


1) I like the lyx format as it is BECAUSE it is not compressed, so I
would definitely not change the default format.



Ok, maybe I didn't make myself clear: you can have self-contained  
archives
with no compression at all on OSX. It works like this: you make a  
directory
and in that directory you dump a special file that tells finder to  
display

the directory as a package.

But from the command line, it is still a directory. And in finder,  
you can
look into the package by choosing "Show Package Contents" from the  
pop up

menu.

Now Pages files for example come as such "packages", you can copy that
directory around, send it through email (yea, email clients handle it
surprisingly well), and it still works.

Now, other operating systems see a directory and not a package.  
People using
something other than OSX would have to be reminded to copy the  
directory

around the .lyx file around, which would be managed by lyx.

The file would still be accessible, no performance penalty, but  
complete
send-aroundability, and while it might feel a little alien on other  
OS's, on

OSX it's the standard way to do such things, so OSX users will cheer.


No, they won't.

The thing is that OSX -- or at least the OSX applications that use  
this concept, with Pages being a good (well, bad) example -- do *not*  
treat packages as true directories, but as a "personal container".  
Whenever you save a Pages document, for instance, Pages deletes  
everything in the "directory" that was not created by itself. This can  
be quite surprising!  Pages might also decide to rename its files in  
the directory. And so on.


All tools that need to manage side-by-side metadata in directories  
(such as CVS and SVN) are inherently unusable with OSX apps that use  
the package format. You just cannot put a Keynote presentation into an  
svn repository...


Packages are one of those OSX standards that are conceptually nice,  
but unfortunately seriously broken in the actual implementation.


Daniel


Re: Bibdesk and mutated vowels (Umlaut)

2008-12-17 Thread Daniel Lohmann


On 17.12.2008, at 20:32, jezZiFeR wrote:

Thank you, this works well! But now I noticed, that "›" and "‹" in  
BibDesk-references also could not be used. Could you tell me the  
code therefore? Where could I find such codes? (Sorry, I´m new to  
this…)


Hi Jess,

Sorry, I do not the codes for these quote symbols. I also send this  
mail to the list, maybe somebody there can help you.


(Generally, I would like to encourage you to send your questions to  
the list instead of to individual people. The chance that somebody  
could help you is just so much bigger, as is the chance that somebody  
else would profit from an answer.)


And is there a possibility to replace the english terms (like  
"volume", "chapter", etc.) with german ones?


I think this is possible by choosing a German BibTeX style (in the  
dialog that pops up if you click on the "BibTex generated  
Bibliography" inset. I have never used them, but I would guess that  
the "gerXXX" styles are for German bibliographies.


Daniel









2008/12/17 Daniel Lohmann 

On 17.12.2008, at 14:08, jezZiFeR wrote:

Hello,

I´m using Lyx 1.6.1 on OSX 10.5.5 with BibDesk 1.3.18 in german  
language. Is
there any possibility to use mutated vowels in the BibDesk- 
references in a
way that Lyx could handle them? When I enter them the plain way I  
get errors
in Lyx. (For example: »Package inputenc Error: Keyboard character  
used is

undefined«).


The safest way is to encode them in the bibtex file in a form TeX  
can handle directly:


   author = {Danilo Beuche and Ant{\^o}nio Augusto Fr{\"o}hlich  
and Reinhard Meyer and Holger Papajewski and Friedrich Sch{\"o}n and  
Wolfgang Schr{\"o}der-Preikschat and Olaf Spinczyk and Ute Spinczyk},



Daniel





Re: Bibdesk and mutated vowels (Umlaut)

2008-12-17 Thread Daniel Lohmann


On 17.12.2008, at 14:08, jezZiFeR wrote:


Hello,

I´m using Lyx 1.6.1 on OSX 10.5.5 with BibDesk 1.3.18 in german  
language. Is
there any possibility to use mutated vowels in the BibDesk- 
references in a
way that Lyx could handle them? When I enter them the plain way I  
get errors
in Lyx. (For example: »Package inputenc Error: Keyboard character  
used is

undefined«).



The safest way is to encode them in the bibtex file in a form TeX can  
handle directly:


author = {Danilo Beuche and Ant{\^o}nio Augusto Fr{\"o}hlich  
and Reinhard Meyer and Holger Papajewski and Friedrich Sch{\"o}n and  
Wolfgang Schr{\"o}der-Preikschat and Olaf Spinczyk and Ute Spinczyk},



Daniel

Re: Using pdfpages with LyX?

2008-11-12 Thread Daniel Lohmann


On 12.11.2008, at 12:07, Jürgen Spitzmüller wrote:


bigblop wrote:

Does anybody know if its possible to use pdfpages in lyx with  
relative

paths?


LyX 1.6 has pdfpages support in External Insets.


Another  trick is to additionally insert the PDF as image under a  
relative path,  but put the image inset inside a LyX-Note. This  
ensures that LyX copies the "image" to the temporary working directory  
it creates for compiling the document; however, as the image is inside  
a note it would not appear in the output.


Daniel

@Jürgen: Any recent changes on your e-mail setup? Since this morning,  
the Umlauts in your full name (FROM name) are scrumbled, at least when  
using Apple Mail. All former mails from you (including the one from  
yesterday) show the expected full name, though.





Re: Automagically reduce the spacing between "++" in the word "C++"

2008-10-22 Thread Daniel Lohmann


On 23.10.2008, at 00:00, Andre Poenitz wrote:

Since I started to waste the evening with TeX, the final version:

  \def\plus{+}
  \def\gobble#1{}
  \catcode`\+=\active

  \def\checknextchar{%
\ifx\nextchar+%
   \raisebox{0.6ex}{\tiny\plus\kern-.3ex\plus}%
   \let\next\gobble%
\else%
   \plus%
   \let\next\relax%
\fi%
\next%
  }

  \def+{\futurelet\nextchar\checknextchar}

It starts getting readable, so I better stop now.


Andre', thanks a lot!

*That* is quite impressive -- and actually readable. I think I even  
understand it!


I applied it immediately to my thesis document -- and had to learn  
quickly that my clever-to-be idea wasn't actually that clever.  
Apparently, I use "C++" in quite some label texts. Well, that would be  
easy to fix, wouldn't it? However, not so easy to fix would be the  
listings package. You cannot  imagine how many times the string "C++"  
is used internally when you apply lstlisting to typeset C++ listings...


Turning characters into active characters is a really good way to shot  
oneself into the knee :-)


I nevertheless kept this code as a comment in my preamble, just to  
keep the reference. It really is the most readable application of  
catcodes I have ever seen and I have learned a lot from it!


Daniel



Re: Automagically reduce the spacing between "++" in the word "C++"

2008-10-22 Thread Daniel Lohmann


On 22.10.2008, at 14:07, Konrad Hofbauer wrote:


Daniel Lohmann wrote:

Any TeX gurus on this list who might help me?


If you don't get any answer here, try in the comp.text.tex newsgroup.


Thanks Konrad!

Daniel,

who is hoping nevertheless to find an expert here :-)


Re: Automagically reduce the spacing between "++" in the word "C++"

2008-10-22 Thread Daniel Lohmann


On 22.10.2008, at 14:12, Charles de Miramon wrote:


Daniel Lohmann wrote:
[...]

occurrences with some ERT box is not an option, as this would cause
too much hassle and would not work in external material, such as
bibliographic entries. I am looking for a more elegant solution.

The easiest way would be to process your latex and bib files through  
a sed

script to replace C++ to \C++ and define a \C++ macro with the correct
space between C and +


Thanks Charles!

However, I am editing and working in LyX, not LaTeX. Replacing C++ in  
the lyx files by the correct ERT boxes is somewhat more complicated,  
as it requires inserting some extra begin_inset and  end_inset lines.  
Moreover, this would not cover the occurrences of C++ in the  
bibliography.





I think that I remember to have read about so-called  catcodes (or
whatever?) in TeX, which apparently make it possible to declare
certain characters as "active" so that further processing is possible
whenever the TeX scanner reads such character. I wonder if it is
possible this way to declare in the preamble that
"C" followed by "+", followed by "+"
is "active" and should be inherently substituted with something like
"\mbox{C+\hspace{-.5ex}+}}"


It is possible to redefine in TeX the letter C catcode and then test  
if it

is followed by two +. But it is a lot of work (TeX macros are not very
easy) and maybe it is like using a hammer to kill a fly.


Well, I really do like hammers! :-)

Daniel


Automagically reduce the spacing between "++" in the word "C++"

2008-10-22 Thread Daniel Lohmann

Hi,

I am currently in the process of polishing the typesetting of my  
thesis. One of the things I would like to achieve is to reduce the  
spacing between "++" in the words C++ and AspectC++, as this looks  
somewhat "strange" with the font I am using.


This question is somewhat related to the thread

http://www.mail-archive.com/lyx-users@lists.lyx.org/msg66864.html

where the original poster asked for a way to reduce the space between  
the two slashes in hyperlinks. However, the original solution does not  
work in my case, as C++ and AspectC++ are not typeset by any kind of  
(La)TeX command, but are just ordinary words. Replacing all  
occurrences with some ERT box is not an option, as this would cause  
too much hassle and would not work in external material, such as  
bibliographic entries. I am looking for a more elegant solution.


I think that I remember to have read about so-called  catcodes (or  
whatever?) in TeX, which apparently make it possible to declare  
certain characters as "active" so that further processing is possible  
whenever the TeX scanner reads such character. I wonder if it is  
possible this way to declare in the preamble that

"C" followed by "+", followed by "+"
is "active" and should be inherently substituted with something like  
"\mbox{C+\hspace{-.5ex}+}}"


Any TeX gurus on this list who might help me?

Thanks!

Daniel




Re: Importing texinfo files

2008-10-20 Thread Daniel Lohmann


On 20.10.2008, at 14:11, Keith Roberts wrote:


On Mon, 20 Oct 2008, Keith Roberts wrote:


To: lyx-users@lists.lyx.org
From: Keith Roberts <[EMAIL PROTECTED]>
Subject: Importing texinfo files
Is it possible to import a Linux textinfo document and then convert  
it to PDF for viewing and printing out in LyX please?


Woops! It's actually a Linux man page - tree.1.gz

I'm need a way to typeset it for printing out.

I copied and pasted the screen text to a text file and printed that.  
The line length has messed up the output though.


If you just need a nice printed version of the man page:

man -t 

dumps a man page in nicely formattted postscript to stdout. You can  
pipe this directly into lpr, gv, pstopdf or whatever.


Daniel


Re: Lyx 1.5.4 lof caption length

2008-09-23 Thread Daniel Lohmann


On 23.09.2008, at 04:43, Fil wrote:


Hi Daniel,

Thanks for your quick reply. Your suggestion is what I was hoping  
for and i added it to the

preamble, but I get a lot of errors which I otherwise didn't have.

My setup is I have a main file the calls up all my other chapters.  
I'm assuming that the
modifications only need to be done for the main call up file, I did  
try to include it in the other

files just in case but it didn't have any effect.


Yes, it is supposed to be in the master document's preamble.

The errors I get are listed below and checking the latex log it  
looks like a lot of undefined
references are missing }, I have references listed in the figure  
captions to so maybe its not

recognising this properly?


I just tried, references in the captions are no problem here. It may,  
however, have to do with the LaTeX class and how it defines \caption  
and so on. I am using koma-script (srcbook).



About 40 errors, mostly -paragraph ended before \takeshort was  
complete
Latex log say suspect forgotten } ...which may be related to the  
references in caption as a lot of

these are listed.


Are you sure you have a full stop (".") somewhere in the caption? I  
only get the "paragraph ended before \takeshort was complete" when I  
forgot to add a full stop. Maybe you have to adapt the \takeshort  
macro definition to better reflect your situation.




Also- latex error: not in outer par mode, in latex log says  
\begin{figure}[h] you've lost some text


And -latex error:\begin{figure} on imput line 485 ended by  
\end{document}


If it looks like its going to be a lot more complicated then I may  
just do the longer method

previously mention in my first email.


Well, having to manually change 60 or more captions might well be  
worth the effort to look for a more engineering-like solution :-)


Daniel


Re: Lyx 1.5.4 lof caption length

2008-09-22 Thread Daniel Lohmann


On 22.09.2008, at 16:51, Fil wrote:


Hi,

Please could you advise if you can set the caption length in LOF in  
the TOC?? . I'm using lyx 1.5.4.


I'd prefer to use the float figure caption(box) if possible so  
really I need to know if there is a
command to cut off the text in the figure box so after that point  
the lof does not list it in the
toc (but still under the figure) as I have some long descriptions  
and references listed.


I know \caption [thing to go in tof]{thing to go under figure  
\cite{book}} works, however I prefer
the figure float presentation. Plus I didn't realise this issue  
earlier and if I change I'll have to

edited 60 or so captions now.


Hi Fil,

The following might help you if you put it in the preamble.

It redefines \caption so that everything until the first period (.) is  
taken, without the period,  as "short caption".


So:

  \caption{Man on moon. This picture shows Neil Armstrong, the first  
man on the moon.}


effectively becomes:

 \caption[Man on moon]{Man on moon.\\ This picture shows Neil  
Armstrong, the first man on the moon.}


Daniel


%*
%** float captions  
***

% We redefine \caption to support long figure texts. The captions
% are typesetted with indented label in \sffamily\footnotesize. The  
first
% sentence (everything up to the first period) is considered as the  
actual
% caption (typesetted in boldface and used in the toc). The remaining  
part,

% if any, is taken as figure text and typesetted below the "caption".
%
% Note that captions now have to end with a period. However, if  
nothing follows

% the period (no figure text) it does not appear in the output.
%
  \let\oldcaption\caption
  \def\takeshort#1.#2\next{\gdef\short{#1}\def\two{#2\relax}%
  \gdef\everything{\if\two\relax {\bfseries #1}\else{\bfseries  
#1.}\\#2\fi}}

  \def\caption#1{\takeshort#1\next\oldcaption[\short]{\everything}}



LyX OS-X AppleScript

2008-09-19 Thread Daniel Lohmann

LyX 1.5.5, Mac OSX 10.5.5

Hi,

I found some nice AppleScripts to move windows around and attached it  
to a Quicksilver trigger to have window movement with the keyboard (a  
feature that unfortunately is totally missing in OS X...).


This works with all applications I have tried, but LyX. The script  
gets executed (I can here the "beep"), but nothing happens with the  
LyX window.


Any ideas?

Thanks!

Daniel


set cur_app to (path to frontmost application as Unicode text)
beep
tell application cur_app
tell front window
set {x1, y1, x2, y2} to (get bounds)
set y1 to (y1 + 15)
set y2 to (y2 + 15)
set bounds to {x1, y1, x2, y2}
end tell
end tell



Re: List of cross references for a label

2008-09-18 Thread Daniel Lohmann


On 18.09.2008, at 15:13, rgheck wrote:


Martin Görg wrote:

On Thu, 18 Sep 2008 13:27:31 +0200, Abdelrazak Younes wrote:


is it correct that there is no functionality in LyX to show all  
cross

references pointing to a specific label? [...]
I'll file a feature request in case this functionality is really  
missing.



No need to, this feature is coming soon in 1.6.0 :-)



Great, is it already included in the current RC?



Yes.


And will it work across child documents (given that the master is  
loaded, so LyX knows about the relationship)?


Daniel,

who just had to write a sed script to get several labels renamed  
throughout his thesis. 

How to add a table column left of the first column?

2008-09-16 Thread Daniel Lohmann

LyX 1.5.6, MacOSX

Hi,

I have a (big and complicated) table which I need to extend by an  
additional column on the left side (the new column is to become the  
first column of the table). As far as I have figured out, the "Add  
column" button always inserts the new column right of the current one.


I know that I could just add the column on the right side and then use  
copy&paste to move the content from the current first column to the  
new one. Unfortunately, multicolumn settings do not survive such  
action in LyX and many cells from the current first column span  
multiple columns. Hence, I would have  to manually restore multicolumn  
settings, cell by cell.


Is there a better trick?

Thanks!

Daniel


Re: Generating PDF/A from LyX/LaTeX

2008-09-12 Thread Daniel Lohmann


On 11.09.2008, at 15:55, Ernesto Posse wrote:


PS: I'm not sure how the hyperref package could help, as the document
doesn't have any hyperrefs; even the minimal file I posted earlier
fails...


Besides dealing with hyperlinks, the hyperref package provides an  
interface for many other aspects  of "PDF magic" (such as  PDF  
metadata, physical page size, etc.). I don't know about hyperref's PDF/ 
A capabilites, but definitely would give it a try.


Daniel


Re: lyx 1.60cr2 issues

2008-09-09 Thread Daniel Lohmann


On 09.09.2008, at 11:25, G. Milde wrote:


On  9.09.08, Konrad Hofbauer wrote:

G. Milde wrote:
Besides the bug mentionend in another reply: The default settings  
will

use the extension ".lyx15" for the exported file and the file-open
dialogue in LyX-1.5 will not show it, as it expects a ".lyx"  
extension.



At least here on the Mac LyX-1.5.6 DOES show the .lyx15-files.


Here at Debian Linux; LyX 1.5.6 the file-open dialogue does

* NOT show *.lyx15   with the default filter
 setting "LyX files (*.lyx)",



IMHO it should be configurable via a preferences setting that a new  
LyX version uses by default the file format of the previous one, still  
named with the extension .lyx.   (MS Word has such an option, which is  
quite useful.)


Of course, using the old file format may imply that some new features  
are not available or do not become permanent in the saved file.  
Nevertheless, it would be of tremendous help to restrict newer LyX  
versions to the older format -- especially during transition times  
(e.g., while trying out release candidates or when not all co-authors  
have already updated to the newest version.)


Daniel 


Re: references between child documents

2008-09-02 Thread Daniel Lohmann


On 02.09.2008, at 01:22, Joao P Leitao wrote:


Hi,

I'm using Lyx for a few weeks and have a few child documents. I'd  
like to reference a Chapter of "child document A" in "child document  
B".


I've a label in the chapter "of child document A" the one I want to  
reference.


Just open both documents in the LyX editor. In the "Insert reference"  
window, you can then choose in a drop-down box the document that  
contains the label you want to refer to.


LyX automatically "merges" the references from all child documents in  
this window if you also open the master document.


Daniel


Re: old questions: no error message

2008-09-01 Thread Daniel Lohmann


On 01.09.2008, at 14:58, wangyq wrote:


Dear all:
I found it is really boring that the lyx system outputs no error  
message.
I am working a book with lyx. Now I want export it to pdf and  
forward it to others. But I found all export functions in lyx are  
dead, including exporting to dvi, pdf, ps, latex etc.  After I run  
these export functions, they immediately dies without error message.
Someone suggest that I delelte some paragraphs and find errors.  
Of course the method can not work well for a long long book.
Why not let lyx output error messages? The module is very  
important for all programming language.


Wang,
I usually solve this kind of problems by starting LyX in debug mode.
Just start it from the console with:

lyx -dbg feature[,feature]...

Where features can be taken from the following list (printed out by  
just invoking "lyx -dbg"):


List of supported debug flags:
 0 none  No debugging message
 1 info  General information
 2 init  Program initialisation
 4  key  Keyboard events handling
 8  gui  GUI handling
16   parser  Lyxlex grammar parser
32lyxrc  Configuration files reading
64kbmap  Custom keyboard definition
   128latex  LaTeX generation/execution
   256   mathed  Math editor
   512 font  Font handling
  1024   tclass  Textclass files reading
  2048lyxvc  Version control
  4096lyxserver  External control interface
  8192 roff  Keep *roff temporary files
 16384   action  User commands
 32768   lyxlex  The LyX Lexxer
 65536   depend  Dependency information
131072   insets  LyX Insets
262144files  Files used by LyX
524288 workarea  Workarea events
   1048576insettext  Insettext/tabular messages
   2097152 graphics  Graphics conversion and loading
   4194304  changes  Change tracking
   8388608 external  External template/inset messages
  16777216 painting  RowPainter profiling
2147483648debug  Developers' general debug messages
4294967295  any  All debugging messages



You probably should start with "lyx -dbg latex", if that does not help  
try "lyx -dbg any". However, in the latter case, LyX will dump tons of  
messages to the console.


 Daniel


Re: Bug in listings inset (Lyx 1.5.6, OS X)

2008-08-29 Thread Daniel Lohmann


On 29.08.2008, at 20:12, Georg Baum wrote:

Both problems would be fixed by a sane parameter handling that would  
not
store all parameters in one string, but one parameter after the  
other in
the .lyx file. Preservation of order would then be easy to implement  
as

well.


If you prefer I will add my suggestions there, otherwise I would open
a new bug (with a reference to 4884).


Do as you like, I don't really care. There are good reasons for both
alternatives.


Thanks Georg,

I have opened a new bug and added crossref comments to 4484 and 5203

http://bugzilla.lyx.org/show_bug.cgi?id=5203

Daniel


Re: Installing pgfplots on the Mac

2008-08-28 Thread Daniel Lohmann


On 28.08.2008, at 21:02, Graham Smith wrote:


OK, this seems to be linked to my newness with the Mac.

I have now managed to find where the the package should go, but I  
don't seem to have permissions to add a folder and copy the the  
package into it.


I shall have a search for Mac help.



Hi Graham,

If you have at least very basic knowledge about how to use a UNIX  
command prompt this shouldn't be that difficult:


Open a Terminal window and type the following:

sudo -i
mkdir /path/to/latex/installation/pgfplot
cp -R /source/of/pgfplot/* /path/to/latex/installation/pgfplot

Depending on your LaTeX-Installation you might have to copy certain  
parts of the pgfplot-source to different target directories.



Hope that helps.

Daniel


Re: Bug in listings inset (Lyx 1.5.6, OS X)

2008-08-27 Thread Daniel Lohmann


On 27.08.2008, at 19:59, Georg Baum wrote:


Daniel Lohmann wrote:


Hi,

I just discovered a "feature" of the listings inset that actually
should be considered as a bug: Additional options given on the
advanced page are implicitly sorted alphabetically. However, if using
listing styles, the order of options is relevant. Consider the
following example:


Yep, this is a known bug, caused by the manner how the parameters are
stored: http://bugzilla.lyx.org/show_bug.cgi?id=4884

Maybe you just add your suggestions there?



Thanks Georg,

Are you sure?

Actually, I had searched  bugzilla and found bug 4884 before asking on  
the list, but to me it does not really describe the problem of  
sorting. Now after re-reading the entry I  see that it is somewhat  
related, but that is not really obvious.


If you prefer I will add my suggestions there, otherwise I would open  
a new bug (with a reference to 4884).


Daniel



Bug in listings inset (Lyx 1.5.6, OS X)

2008-08-27 Thread Daniel Lohmann

Hi,

I just discovered a "feature" of the listings inset that actually  
should be considered as a bug: Additional options given on the  
advanced page are implicitly sorted alphabetically. However, if using  
listing styles, the order of options is relevant. Consider the  
following example:


In my preamble, I have defined a custom listings style:

  \lstdefinestyle{acstyle}{
...   % many, many  settings
mathescape=true 
  }

Now I want to apply this style, but set mathescape to false. So I type  
in the "Advanced" settings of the inset:


style=acstyle
mathescape=false

However, when I press "Apply", LyX immediately sorts the options  
alphabetically,  which results in:


mathescape=false
style=acstyle

And hence, the mathescape=true  from the style "wins" :-(


IMHO this problem also shows a more general issue: When combining main  
settings and advanced settings, the order of application remains  
unclear. It seems that the same sorting rules apply here, which might  
as well yield surprising effects.


The best possible solution for this problem I can imagine would be:

  (a) to not sort options, but respect their order; and
  (b) to reflect all main settings on the "Advanced" page as well.

The idea behind (b) works as follows: When I activate an option in the  
"Main Settings", its string representation is automatically added to  
the end of the advanced settings; when I deactivate it, it is removed.  
When I manually add an option in the advanced settings for which a  
checkbox exists in the main settings, the checkbox is activated.


Thereby,  *all* settings become visible and editable on the "Advanced"  
page, on which they can (because of (a)) be ordered in whatever order  
the user prefers.


However, just implementing (a) would already be a suitable workaround  
for most cases.


Daniel


Re: LyX for MAC: problems in handling file images

2008-08-26 Thread Daniel Lohmann


On 26.08.2008, at 04:15, Bennett Helm wrote:


On Mon, Aug 25, 2008 at 4:18 PM, Pierfranco Minsenti <
[EMAIL PROTECTED]> wrote:


I have checked my installation of ImageMagick: 6.3.3.
Most elements are in the .usr/local/lib
Maybe I installed it when I installed the full MacTeX package  
containing

the texlive2007 package.



It *is* installed with MacTeX.

If you can, you might want to wait a week or so (it should be out  
"real soon
now") to download MacTeX based on texlive 2008; installing that will  
give
you a new installation of ImageMagick. Alternatively, you could use  
MacTeX

2007 to do it again.

But these are big downloads, and I'm not even sure if this will  
solve the

problem.



Pierfranco,

I have had problems with ImageMagick, too, they disappeared after  
installing the newest version.


I can really recommend MacPorts for this type of software  
installations. There are good chances that you already have installed  
MacPorts on your box. If not, it is anyway a good idea to get it. Most  
OpenSource programs and tools are provided as a MacPorts package for  
OSX; installing and  especially upgrading such software via MacPorts  
is very convenient.


So open a terminal window and type the following commands:

sudo port selfupdate
sudo port install ImageMagick

This may take a while. If "sudo" moans that "port" can not be found,  
you have to install MacPorts first. AFAIK you can find it on the  
second DVD that comes with Leopard. Otherwise look at http://www.macports.org



Daniel


Re: Lyx cross platform compatability - is there a problem?

2008-08-20 Thread Daniel Lohmann


On 19.08.2008, at 21:21, Graham Smith wrote:


On 19 Aug 2008, at 19:57, Christian Ridderström wrote:


On Tue, 19 Aug 2008, Graham Smith wrote:

As you will see, from my other post, the issue was a leading comma  
in the preamble, setting the Komascript options.


It seems that both the Mac and Linux are forgiving of this syntax  
error, but Windows is not.


So it isn't a Windows issue


Hi Graham,

I'm glad you solved the problem.


I want to add a word of encouragement here: In out group we have been  
co-writing papers and documents using LyX on Windows/Linux/OSX for  
years:


- There never, ever has been a problem with LyX itself.
- Only occasionally (2 or 3 times) we had compatibility issues with  
different versions of one of the supporting tools. Usually,  different  
versions of ImageMagik were the cause.


Overall, I can truly recommend LyX as a cross-plattform document  
processor!


Daniel

Re: Koma-script letter error on Windows but not on Mac

2008-08-18 Thread Daniel Lohmann


On 18.08.2008, at 18:27, Graham Smith wrote:


I have a letter set up on a Mac, which works fine, but copying it to
Windows and trying to compile gives me the following error:
--
}

You have used \KOMAoptions to set `',
but KOMA-Script does not know any option named `'.
See the KOMA-Script manual for more informations about options and
their values.
-

Is  there something obviously different between the Mac and Windows  
that

could help me solve this problem.



Mac prefers to store text files in UTF-8, while Windows tends to use   
either 16 bit unicode or ISO with codepages. Another issue are line  
endings. So you often need to convert text files when moving from one  
system to another.


Open the files with a text editor (such as TextWrangler) that can  
"translate" them  to Windows.


Daniel 


Re: Links to external images in PDF generated by LyX.

2008-08-15 Thread Daniel Lohmann


On 15.08.2008, at 21:12, Rudi Gaelzer wrote:

I'd like to generate a PDF file where the figures/images are not  
incorporated into it, but rather
have links that points to  external image files (jpeg, eps, and  
whatnot).


Doing that, I can restrict the size of each individual size instead  
of generating a large PDF file

with everything in it...

Is it possible to do something like this using LyX/LaTeX?



Hi Rudi,

I am not sure if I understand your question correctly:

(1) Do want to have links in the PDF (like URLs) the user can click  
onto to open the (external) material, which can be an image or  
whatever? Well, this can be achieved with the hyperref LaTeX package  
and LyX's  built-in support for simple URLs  (Insert->URL). More  
sophisticated things are possible with using hyperref commands in ERT.  
Take a look at the LyX manuals and the hyperref package documentation.


(2) Or do you want the figures to be visible in the PDF, but  
nevertheless loaded from external files when the PDF file is opened  
(like an external graphics in Word)?
I have never seen something like this. To my best knowledge,  PDF  
files have to be self-contained. So this is most probably not possible.



Daniel


Re: I'm unable to add a language to the listing package

2008-08-11 Thread Daniel Lohmann


On 10.08.2008, at 18:24, Paul A. Rubin wrote:


Steve Burton wrote:


I tried using ERT. If I got it wrong Lyx crashed.


If that's reproducible, it should probably be entered into bugzilla.


If I got it right it
worked until I closed Lyx. When the document was re-opened Lyx  
spotted

the  listings stuff but didn't understand the language. Return to Go,
go directly to Go, do not collect £200!


When you reopened the doc, did LyX convert your ERT listings stuff  
to a listings inset??  If so, that can probably be worked around.   
You could load the listings package in the preamble and add a new  
environment (say "mylistings") that simply begins/ends a listings  
environment with your new language selected.  Then use  
\begin{mylistings}...\end{mylistings} in ERT.  I doubt LyX would  
make any attempt to convert that.


I do not think that this is the problem. I used to use listings in ERT  
all the time and LyX never converted it "automagically". I only  
recently switched to the listings inset, so in many of my documents  
ERT-based listings and listing insets now happily co-exist. I also use  
an own language.


A better workaround:

Load (or define) your language in the preamble. In the listings inset  
select "No language", go to the "Advanced" page and directly pass the  
language= parameter to listings.


Daniel

Re: Conflict with Hyperref + Floats?

2008-08-08 Thread Daniel Lohmann


On 08.08.2008, at 08:03, Ryan Cross wrote:


HI,
I posted a message yesterday about a problem I was having with  
algorithm
floats. I did a lot of debugging and finally (after very long line  
by line
debugging) found that the problem seems to be some sort of conflict  
when
using the hyperref package. Can anyone else confirm this? Does  
anyone know

of a work around? Any other advice/help is very welcome!


Do you include hyperref last in your preamble, that is, after all  
other packages that potentially define new float types?


I remember cases where I got very strange errors if new float types  
were defined after hyperref has already been loaded.



Daniel


Re: Interesting thread on Slashdot

2008-07-31 Thread Daniel Lohmann


On 31.07.2008, at 08:55, Andre Poenitz wrote:


On Wed, Jul 30, 2008 at 04:17:29PM -0500, Denné Reed wrote:

[..]
I've also had problems with journal and book editors, one of which
insisted I convert a book chapter written in LyX into Word format
despite the fact that the publisher  (Elsevier) has a LaTeX document
class available.


Elsevier seems to have a funny way to handle .tex. Even though they
accept .tex and even provide .sty for that, they seem to send the
submissions to India and have them re-typed _manually_ in whatever
system they use for the final typesetting. That's my only explanation
for them being able to remove typos, introduce new ones and messing up
tables ;-} Given that the result looks pretty TeX-ish that's...  
"wierd".


That explains a lot...

I also had problems with getting them to accept  my paper as LaTeX  
document. Dozens of e-mails where we literary had to explain the woman  
on the other side (with an elsvier.com e-mail address) that our  
document does not open in Word, that a ZIP-Archive has to unpacked  
before doing some with it, that postscript does also not open in word,  
how to produce a postscript file... I could not believe that we were  
actually interacting with a professional publisher. In the end we did  
send her the postscript file, which obviously got re-typed for the  
journal. The result was horrible.



Daniel

Re: Lyx functions

2008-07-28 Thread Daniel Lohmann


I really like lyx. I just find something a bit hard. Some things  
are easier
to be done via the keyboard (otherwise it's back to MS point and  
click
nightmare). I mean in an equation it is much easier to just do \pi  
for Pi or
\neq for the not equal sign. What about in standard mode when I am  
writing
text? Can I use lyx as a non WYSIWYG editor? I heard some people  
say using
vim and then compiling the document but I really don't have time  
learning
the whole lot of things about TeX/Latex and I would like partial  
WYSIWYG
with options of inputing source directly and the application  
substituting it

with the appropriate symbols. Can Lyx do that?


Note that in LyX equations you actually can type math commands (like  
\pi), Lyx then automagically replaces them by the corresponding symbol  
-- IMHO a really cool features!


 Daniel


Size of preview image

2008-07-27 Thread Daniel Lohmann

Hi,

Is there any way to change the size LyX uses internally when creating  
the bitmaps for preview images? In many cases, the default size of the  
preview image is to small. I know that I can specify a preview scaling  
factor in the graphics settings, however, that causes the *bitmap* to  
be scaled -- which then becomes rather unreadable.


Ideally, Lyx would create a new preview bitmap when the scale settings  
are changed. A maybe simpler way might be to create the bitmaps  
internally for a 200% scale factor and scale them down on screen.


Daniel


Re: Converting msword to LyX is ugly!

2008-07-20 Thread Daniel Lohmann


On 20.07.2008, at 05:44, Steve Litt wrote:


On Saturday 19 July 2008 19:57, Typhoon wrote:




This is by far the best solution, in my opinion.

Unfortunately for me, my only Windows machine is a 1997 Pentium
II/300 with 128MB of RAM, which would be painfully slow.


Steve,
What happens if you import the RTF file into OO and then follow the
procedures suggested?


I don't know. I don't trust OO Writer as far as I can throw my  
house. OO

Writer's not touching my book.

About 2 years ago, during one of my occasional "I'm mad at LyX"  
months, I
evaluated OO Writer as book writing software. What I would have lost  
in
typeset quality, I hoped to gain in faster creation of styles.  
However, OO

Writer kept changing styles all by itself. It was one of the most
untrustworthy pieces of software I've ever seen. That gave me an  
incentive to

learn a lot more about LyX style creation.


Steve,

Do not close this door to early. While I can understand very well that  
you actually do not like OO Writer, I think you should give it another  
try -- you do not have to really work with it.


Even if all that Writer2LaTeX stuff does not work, OO Writer might be  
a good transition format:


(1) OO Writer preserves the structure of styles when importing from  
Word (AFAIK).
(2) OO uses an XML-based document format (zips them on disk, but you  
can just use a common unzip tool to get the actual content)


The XLM-based representation is for sure a better source for script- 
based / structure-preserving transformation than RTF.



Daniel 
 


Re: Converting msword to LyX is ugly!

2008-07-19 Thread Daniel Lohmann

Hi Steve,

Have you already considered importing the Word document into  
OpenOffice Writer and letting one of the OO->LaTeX converters do the  
hard work?
(http://www.hj-gym.dk/~hj/writer2latex/ is one exmple, there might be  
others)


No, I have never tried or used one of those. However, I heard about  
success stories -- might be worth a try.


Daniel



On 18.07.2008, at 21:28, Steve Litt wrote:


Hi all,

I have a 300 page book written in MS Word version 97, and I have to  
convert it

to LyX in order to make the second edition.

I'll accept all condolences now :-)

Believe it or not, the MS Word version was written very much what  
you guys
would call WYSIWYM. I had styles for everything -- almost no  
appearance was
fine tuned. Obviously it's essential that all those styles transfer  
over into

the LyX version.

I'll accept all condolences now :-)

So heres what my plan, unless someone else has a better idea.

First, I'll export to RTF.

I'll accept all condolences now :-)

Then in Vim I'll do this:

:%s/}/}\r/g

Now the rtf file will have lines that are somewhat recognizeable as  
markup.


Next I'll look at the \stylesheet part of the RTF, and make a list  
of all

paragraph and character styles, sort of like this:

\fs20 Normal
\s1 heading 1
\s2 heading 2
\cs10 \additive Default Paragraph Font
\s16 myparagraphstyle
\cs17 mycharstyle
\cs18 mycharstyle2

Then, within Vim I'll run substitions so that the text referred to  
by the
numbers such as \s2 are prepended with my own tags such as phdr2,  
and better
yet that text has a proper ending tag appended. This is not so  
simple for

three reasons:

1) There's always a bunch of gobblety gook between the \s2 and the  
text to

which it refers, and that must eventually be deleted.

2) There's often gobblety gook before the \s2, and that gobblety  
gook must

eventually be deleted.

3) It's MUCH harder to reliably put end tags at the end of the text  
to which
it refers. If I don't put end tags, that means I'll have a much  
harder time

converting it to LyX.

Next, I'll re-import the rtf into MS Word. What should happen is it  
re-imports
the same as it originally was, only now it has my tags. From there I  
should
be able to export it to plain text, and use my tags to create the  
LyX file
with suitable scripts. Or maybe make scripts to directly manipulate  
the RTF.
Of course, for all my custom character and paragraph styles, I'll  
need to
create those styles within LyX, in a blank document, before  
appending the

actual content.

Then comes the cleanup. Stuff like tables and images won't convert  
-- I'll
need to manually do that cleanup and then run at least a rough  
proofread.


The good news is, because the original document used styles for  
almost every

appearance, fine tuning won't be necessary (hooray for styles!).

I'd estimate this to be about a week's job. That's a lot of time,  
but in the
end I'll have converted a 300 page book, style for style, from MS  
Word to

LyX.

If anyone has a better idea for converting a 300 page MS Word  
document to LyX,

style for style and word for word, please let me know.

Thanks

STeveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US




Re: importing spreadsheet rows and columns

2008-06-01 Thread Daniel Lohmann


A (late) follow-up on this:

I have got some good experience with an open-source Excel-Plugin  
named  Excel2LaTeX. This plugin provides a toolbar button to convert  
the selected parts of an Excel table into LaTeX source code that can  
then either be saved into a file or into the clipboard.


I use this to "copy" tables from Excel into an empty LaTeX document  
and then import this document into a new LyX document. From there I  
use again copy and paste to copy the LyX table into the final document.


Works like a charm and also preserves much of the formattings (e.g.  
bold font headers).


Daniel


Re: includepdf

2008-05-05 Thread Daniel Lohmann


On 05.05.2008, at 10:17, Mario Braun wrote:


I think this isn't the way pdfpages is supposed to be used. If you  
want a

caption, include a single pdf page via the graphics dialog.



well, I don´t really want a caption. I just want the 3 pages of my  
pdf-file
to start on the page where the section name is printed. Currently on  
page 7
there is nothing but the section name "Appendix A" and the document  
that
shall be included as Appendix A starts on page 8 . So page 7 looks  
pretty

awkward with only one line on it.


So you basically want an overlay, that is pdfpages should *merge* the  
first page of the embedded pdf with the current page? AFAIK this is  
not possible with pdfpages :-(


The new version (2.0) of the pgf/tikz package seems to have some pdf  
embedding support. I haven't looked into the details, just stepped  
over it in the manual. So I do not know if there is any support for  
PDF overlays. But might be worth a look.


Daniel 
 

Re: Trying to get pdflatex to produce letter size page with outline fonts...

2008-05-05 Thread Daniel Lohmann


On 02.05.2008, at 23:08, Paul A. Rubin wrote:


Rich Shepard wrote:

On Fri, 2 May 2008, David A. Case wrote:
1. an article with Document->Page layout set to "US Letter" (and  
Document->Page
Margins is set to "default") is likely to come out of pdflatex as  
A4 (unless,
unlike me, you know enough LaTeX configuration stuff to configure  
pdflatex to

do something different).

 Not for me. If I set the pagesize as letter, it comes out that size
regardless of compiler used.


Same here, but that may be because I have MiKTeX's default paper  
size set to "letter".  When you do as Dave said (select letter size  
in LyX but keep default margins), LyX emits  
\documentclass[letterpaper,english]{article} (give or take the  
language) and, barring some other reason to call it, doesn't load  
geometry.  If you use nondefault margins, LyX adds a call to the  
geometry package for the margins and moves the paper size argument  
to the geometry call.  I vaguely recall a problem with pdflatex  
ignoring paper size in the document options but paying attention to  
the geometry settings.


Now whether LyX should force a call to geometry just to set the  
paper size is another question.  Does geometry conflict with any  
other LaTeX packages?


Well, at least it does not seem to work to well with some document  
classes.  In the identical case I consulted the list on a couple of  
months ago (http://www.mail-archive.com/lyx-users@lists.lyx.org/msg58912.html 
) geometry did not only change the paper size, but also the margins  
and many other elements of the page layout. Probably this is because  
the ACM LaTeX classes are crappy, but well, many people have to use  
them.


Loading hyperref with the package option "letterpaper" solved it for me.


Daniel




Re: Trying to get pdflatex to produce letter size page with outline fonts...

2008-05-02 Thread Daniel Lohmann


On 02.05.2008, at 05:45, adam_taylor wrote:



Folks,

I am a new LyX user, and have a very basic question.  I am using Lyx  
1.5.1

under Ubuntu 7.10.  I believe the TeX system is TeXLive.

I created a new document (of class article), wrote a few lines in  
it, and

then wanted to make a PDF.  I selected View > PDF (pdflatex), and then
looked at the resulting document in Evince.  It seems to have two  
problems

(as least, problems for me).  First, the paper size is A4, and I would
prefer Letter.  Second, it seems to be using bitmap fonts  
(Postscript Type
3, I think), rather than outline fonts.  I tried to fix the A4  
problem by

setting the paper size in Document > Settings... to "Letter" and then
re-making the PDF, but it still seems to be A4.  I tried the two  
other ways
of producing PDFs, dvipdfm and ps2pdf, and both solve the page size  
problem,

but not the bitmap font problem.  Nevertheless, I like the fact that
pdflatex goes directly from the source LaTeX file to a PDF, so it  
would be

nice to get the page size right with pdflatex...

Does anyone have any suggestions about how to fix these things?



Yeah, I remember this problem - quite confusing.

http://www.mail-archive.com/lyx-users@lists.lyx.org/msg58912.html

Short summary: The document size options in LaTeX (hence LyX) just  
specify the *logical* paper size for which the output should be  
rendered. LaTeX does not deal with *physical* paper sizes, which are  
in the responsibility of the backend driver. Hence, the phyiscal paper  
size has to be passed by some /special commands or magic options to  
pdflatex. (AFAIR pdflatex uses defaults that probably depend on your  
locale settings. I would assume that there is a config file somewhere  
under /etc.)


IIRC, I solved the issue with the help of the hyperref package. I  
guess it was the "letterpaper" option that let hyperref generate the  
necessary \special commands for pdflatex.



Daniel




Re: Inconvenience: Loss of custom styles during document class reversion

2008-04-30 Thread Daniel Lohmann


On 29.04.2008, at 19:28, Steve Litt wrote:


On Tuesday 29 April 2008 13:11, rgheck wrote:

Steve Litt wrote:

On Tuesday 29 April 2008 09:00, you wrote:

But I've done a little experimenting, and here's one way this can
happen. First, you have to be using a "local" layout file, that  
is, a
layout file that is not in your LyX user directory but instead in  
the

directory with the source file.


I'm using a layout file in the source file directory. However,  
there's a

symlink to a the same name in /home/slitt/.lyx/layouts.


OK, then that is definitely related. LyX won't see the one in
.lyx/layouts if there is one in the document directory with the same
name. At least, there are circumstances under which it won't use it.
What happens, I think, is that

One more thing that might provide a hint. At least some of the  
times I
observed this automatic switching away from my custom document  
class,
when I scanned the list of available document classes to "put it  
back",
my custom document class was listed twice in the document class.  
This
document class switching is intermittent, and while I can't say  
for sure
a correspondence between it appearing twice and it evaporating, I  
cannot
remember a time it disappeared when it was not listed twice, and I  
cannot

remember a time when it did not disappear when it was listed twice.


This is again a consequence of using the local layout. It's listed  
twice

because one of them is the local layout and one of them is the system
version. See my post to the devel list for ideas about who this could
have caused the problem.

rh


Thanks Richard,

I doubt it's that simple, because I've been using the exact same  
layout in

book dir, symlink in /home/slitt/.lyx/layouts since "Troubleshooting
Techniques of the Successful Technologist" in 2001, and the problem  
did not
routinely occur. Furthermore, I'm using it right now, and right now  
the
problem is not occurring. There must be other factors, and right now  
I just
don't have the time to investigate this intermittent. I'm trying to  
get my
new book out this week. However, if I see it happen again, I'll try  
to get

every bit of information I can.


I guess this behavior is new to Lyx 1.5.x and you probably did use LyX  
1.3.x by the time :-)


Richards answer also  explains a related problem I had a couple of  
days ago: As Steve, I had a layout side by side to my  master  
document, but also sym'linked from my .lyx/layouts directory. (Before  
Lyx 1.5 this was basically the only way to maintain the layout  
together with the documents in a source control system such as svn.)


The actual chapters are input'ed as child documents into the master  
lyx file. On disk, they are located in a "part" subdirectory.  When I  
tried to compile the master (I had not done so for many weeks, so this  
was the first time trying it with 1.5), I got a lot of funny error  
messages; something similar to:


"ERROR: Layout 'thesis' used by child document is incompatible to  
layout 'thesis' used by master document"


It took me quite a while to figure out that LyX uses the side-by-side  
layout file for the master, but the one from .lyx/layouts for the  
children and that this caused the problem. (I would consider this as a  
bug, as both layout files were actually identical, so not incompatible  
at all!)


I solved the issue by renaming the layout file so it is no longer  
considered as one by LyX and all files (master and children) refer to  
the same layout in my .lyx/layouts folder.



Daniel

Daniel


Re: multiplatform vector drawing program to use

2008-04-07 Thread Daniel Lohmann


On 07.04.2008, at 18:51, Walter H. van Holst wrote:



Of course, there are also other vector drawing programs (besides
Xfig), so
what is outlined here is not the only option you have.


If only Linux and Windows are required, I'd recommend Inkscape. It is
much more polished and user friendly than Xfig whose UI is a bit
daunting.



I would recommend OpenOffice Draw. It is one of the few programs that  
are multi-platform and that provide excellent export to the UNIX world  
(saying: EPS) as well as to the Windows world (saying: WMF). We have  
been using it for cross Windows/Linux projects with LyX and some other  
programs for years.


Daniel


Re: ERT to inline by command

2008-04-07 Thread Daniel Lohmann


On 07.04.2008, at 16:01, Ethan Metsger wrote:
On Mon, 07 Apr 2008 09:04:16 -0400, Daniel Lohmann <[EMAIL PROTECTED] 
> wrote:



AFAIK there is, unfortunately, no LFUN for this
I too would really appreciate a keyboard shortcut.


I was under the impression that using CTRL-I would do the job.  I  
just tested it on 1.5.2/Ubuntu and it seems to work just fine.


Hm... Not on my system. Could you figure out the LFUN that is bound o  
CTRL+I?


Daniel


Re: ERT to inline by command

2008-04-07 Thread Daniel Lohmann


On 07.04.2008, at 12:44, Salát Máté wrote:

Hi!

What command makes the "Display" option of the active ERT to  
"Inline"? I want to create a key binding to this function.


AFAIK there is, unfortunately, no LFUN for this
I too would really appreciate a keyboard shortcut.


Daniel

Re: LFUN to open label / reference inset dialog

2008-03-23 Thread Daniel Lohmann


On 23.03.2008, at 22:53, Pavel Sanda wrote:

Anybody an idea?


Yes: next-inset-toggle (Ctrl-i with cua.bind)


this behaviour is intended? i find the naming confusing.
wouldn't be better to have clear distinction between toggling and
dialog showing?
also what is the relation to dialog-show lfun?



Pavel is probably right...

Before posting, I did look through the list of LFUNs (as offered by  
the Alt+X command bar). However, I couldn't imagine next-inset-toggle  
as the one I was looking for.


Luckily, we have a great  community on the lyx-users list willing to  
help!



Daniel 


Re: LFUN to open label / reference inset dialog

2008-03-23 Thread Daniel Lohmann


On 23.03.2008, at 13:50, Jürgen Spitzmüller wrote:

Daniel Lohmann wrote:

Anybody an idea?


Yes: next-inset-toggle (Ctrl-i with cua.bind)


Otherwise I might add a feature request. Changing an already inserted
(bibliographic) reference is a quite common task. It should be, IMHO,
possible to do this without having to leave the keyboard.


Definitely.



That's it, thanks Jürgen!

Daniel

LFUN to open label / reference inset dialog

2008-03-23 Thread Daniel Lohmann

Anybody an idea?

Otherwise I might add a feature request. Changing an already inserted  
(bibliographic) reference is a quite common task. It should be, IMHO,  
possible to do this without having to leave the keyboard.


Thanks,

Daniel  

Begin forwarded message:

From: Daniel Lohmann <[EMAIL PROTECTED]>
Date: 20. März 2008 19:58:10 MEZ
To: LyXFolks User 
Subject: How to open the dialog for label / reference inset by  
keyboard


Hi,

Is there any LFUN or pre-assigned shortcut to open the settings  
dialog for the label / reference / bib reference inset under the  
cursor?


Thanks!

Daniel




How to open the dialog for label / reference inset by keyboard

2008-03-20 Thread Daniel Lohmann

Hi,

Is there any LFUN or pre-assigned shortcut to open the settings dialog  
for the label / reference / bib reference inset under the cursor?


Thanks!

Daniel


Re: Experiences with biblatex?

2008-03-19 Thread Daniel Lohmann


On 19.03.2008, at 10:26, Dominik Waßenhoven wrote:


Daniel Lohmann schrieb am 19.03.2008:

After finding myself spending more and more time with tweaking and   
customizing bibliography handling I am considering switching to   
biblatex.



[...]



1) Do you have to change your .bib-files?


Yes, slightly. biblatex introduces some new field types (like  
maintitle, subtitle, titleaddon etc.). In order to get your  
bibliography properly formatted, some changes to the bib file will  
be necessary. I used jurabib previously, and it took me about 2-3  
hours with a >1000 entries bib file.


I see. Are these new fields "backward compatible" in the sense that  
they do not interfere with old-fashioned bibtex and both work smoothly  
on the same database?


(Our group uses a global svn-managed bibtex database which is included  
as svn:externals into every paper or thesis project. I doubt that I  
would get through with a "big bang" transition to biblatex.)



Thanks Dominik!


Daniel

Experiences with biblatex?

2008-03-19 Thread Daniel Lohmann

Hi,

After finding myself spending more and more time with tweaking and  
customizing bibliography handling I am considering switching to  
biblatex.


According to the wiki (http://wiki.lyx.org/BibTeX/Biblatex) and a  
thread from last December (http://www.mail-archive.com/lyx-users@lists.lyx.org/msg60714.html 
) this seems to be not overly difficult -- it can't be more  
complicated than my current bibtex, multibib, and child-/master mode  
tweaks. Before really digging into all this, I am, however, curious  
about other users' experience with biblatex:


1) Do you have to change your .bib-files? I remember that this was an  
issue when I first read about biblatex, but did not find a comment or  
hint into this direction in the documentation of the current version.


2) Does it work well with hyperref (including backref support and so  
on)? The documentation states so -- but with respect to hyperref many  
oddities arise in practice. (I had, for instance, all my requirements  
fulfilled with  bibunits and some tweaks when I finally figured out  
that with bibunits reference no longer become hyperlinks - a show  
stopper.)


3) Do I really have to use the natbib options? I know, everybody  
recommends natbib, but I prefer the simple alpha style.


4) Why is it the case that the path to the bib-files has to be either  
absolute or the bib-file has to be in texmf? I really would like to  
avoid both.


5) Even though I never heard any complaints about the 0.7 version of  
biblatex, it is still considered as "beta". Did you experience any  
problems while using it?


Thanks a lot!

Daniel


Re: Literal monofont underscores?

2008-03-19 Thread Daniel Lohmann


On 19.03.2008, at 03:01, Paul A. Rubin wrote:


Doh!

And here's why it worked for me and not you:  I typed in the  
underscores, and LyX cleverly escaped them as \_\_ (ad nauseum).   
I'm guessing you pasted them in or imported them as text, and got  
just underscores, no escapes.




Hm...

LyX really should behave identically in both cases. It should not  
produce a different output from *typing" weather *inserting* some text.


According to my experience  LyX 1.5 versions (it may as well be just a  
Mac problem...) generally suffer from strange effects that something  
that looks identically in the LyX editor in fact produces different  
LaTeX code, which is "surprising" at best for the user. I am still  
suffering twice a day from the "funny invisible chars" problem without  
really understanding how these chars make it into my document:


http://www.mail-archive.com/lyx-users@lists.lyx.org/msg62392.html

Maybe it is time to open a bugzilla entry for this?


Daniel


Re: Use pdf figures without converting.

2008-03-11 Thread Daniel Lohmann


On 11.03.2008, at 08:30, G. Milde wrote:


On 11.03.08, Klaus Unger wrote:

I am using PDF figures. Lyx does convert them to png before and  
chops them

incorrectly.


When?

* display in the LyX window?
* view as/export to Postscript?
* view as/export to PDF (ps2pdf)?



Well, I had exactly this one:


* view as/export to PDF (pdflatex)?   <- rather unlikely!


It had driven me mad - why the heck LyX tries to convert a PDF  
graphics to PNG when using pdflatex. In the end I switched to EPS as  
graphics format.




I would like to use the pdf figures directly, is it possible?



How?


Set the right converter in Tools>Preferences>Converters

I have e.g. here on my Debian Gnu/Linux system:

 PDF (ps2pdf) -> EPS   pdftops -f 1 -l 1 -eps $$i $$o



Well, in the case of using PDF images in a document compiled with  
pdflatex there should be no converter, right?


I guess, my problem was more related to the "Document format" and  
"Vector graphics format" check boxes in the "File formats" preferences  
pane. I have checked them for *all* PDF formats  -- now it seems to  
work.


However, I would like to understand the algorithm behind all this. I  
understand the general: if a graphics format is attributed as some  
"Vector format" the back-end compiler is able to understand, LyX gives  
its precedence over conversion to a bitmap format.


However, what exactly is the format here? I have at least four  
different "file formats" defined for PDF.  Which one is taken into  
account for the decision?


Daniel


Re: LyX mac customized icon

2008-03-05 Thread Daniel Lohmann

On 05.03.2008, at 14:54, Julio Rojas wrote:


Can you post a JPG?


Apparently there is a JPG or GIF on Dianas blog:

http://ailoan.free.fr/blog


Daniel


Re: new lines disappearing in program listings

2008-03-04 Thread Daniel Lohmann


On 05.03.2008, at 05:55, Bo Peng wrote:

Have you checked out the support for lstlisting in LyX 1.5.x?  I  
gather

from the wiki that Bo Peng is responsible for it (props to Bo).  It's
not on the environment roster; you get it with Insert -> Program
Listing.  Right click the widget handle to see all the controllable  
stuff.


I know the mentioned problems with listings but they are not easy to
solve. I also recommend using a listings child document for long
listings.


I have been using the listings package quite a lot. Since LyX 1.4 it  
works perfectly if used in ERT boxes (pre 1.4 versions added an extra  
new-line after every hard line break, which required some trickery  
with negative linkeskip values to yield a good result.)


I never used the new listings inset, though. In my opinion, ERT boxes  
are just perfect for in-text listings of code. Listings clearly is one  
of the best documented packages available in the LaTeX world and has a  
very convenient interface, so "hand coding" listings options is not at  
all painful. All one should do is to define a listings style with all  
necessary default settings in the preamble (a good practice anyway).  
Then only two actual LaTeX lines have to be in each ERT box:


\begin{lstlisting}[style=ac]
#include "Win32Error.h"
aspect ThrowWin32Errors {
  advice call( win32::Win32API() ) : after() {
if( win32::IsError( *tjp->result() ) {
  throw win32::Exception();
}
  }
};
\end{lstlisting}

Keeping (short) listings in ERT boxes this way has a some clear  
advantages:


- The on-screen formatting is easy, as within ERT a typewriter font is  
used.
- The spell checker skips ERT boxes, hence the listings do not get  
spell checked (that always annoyed me with LyxCode)
- Extra options can easily be passed as additional optional parameters  
in the square brackets.


For longer listings I recommend to not input them as  LyX child  
documents, but keep them in ordinary  text files  using the  
\lstinputlisting command in ERT:


\lstinputlisting[style=aclisting]{../src/win32eh-app.cpp}


Just my two cents,

Daniel


Re: Inserting graphics of the "appropriate" type: how to?

2008-03-04 Thread Daniel Lohmann


On 04.03.2008, at 22:40, Rich Shepard wrote:


On Tue, 4 Mar 2008, Paul A. Rubin wrote:


For many plots in a sub directory "PlotFigures", I have 2 versions,
one in eps version and  one in pdf version.


Have you tried specifying a clipping region in LyX?  Might be  
there's an
issue with reading the bounding box info from the PDF (or EPS) (or  
both).


 I often need to clip pdf images when inserted into a LyX/LaTeX  
document.
Also, when there's a .pdf in the document I use pdflatex to view it  
as well

as when generating the final output.


I experienced the same problem. If I save an image with bounding box  
from, e.g., CorelDraw or OpenOffice Draw as PDF, the bounding box  
seems to be neither used in the LyX preview nor in the pdflatex  
output. Acrobat Reader displays the image correctly, though.


The only thing that really helped me in these cases is to set the PDF  
page size in the drawing tool to  reflect the intended size of the  
bounding box. As this is PITA on the long term, I eventually got back  
to EPS.  I save only those images as PDF that use transparency, which  
does not work so well with EPS.


Daniel


Re: LyX won't compile my document any more

2008-02-29 Thread Daniel Lohmann

Hi Maximilian,


Text line contains an invalid character.

M^^F
  An1oz:8 #^^82^^Sr6'GE^^89N^^94A^^IK^^93}: 
4*^^Ye:;[EMAIL PROTECTED]

A funny symbol that I can't read has just been input.
Continue, and I'll forget that it ever happened.





I assume that you have somehow auto-magically entered illegal,  
invisible characters in the LyX document. Since I switched to Mac this  
happens all the time to me (once or twice a day),  in many cases funny  
"^^" characters are involved. I have been thinking about reporting  
this as a bug, but  still have not figured out exactly how it happens.  
I have the impression it is somehow connected to pasting text from the  
clipboard, though.


In most cases the LaTeX compiler (pdflatex in my case) complains about  
an "illegal character encoding" problem, but still compiles the  
document.


I usually resolve the issue as follows:

(1) Export to LaTex; compile manually to get the error message and  
line;  look them up the .tex document to figure out where exactly the  
problem is.


(2) Navigate in LyX to the figured location. Activate source view to  
see if the invalid characters appear there as well (usually they do,  
but not always).


(3) Delete and retype the words around the illegal characters.

Sometimes I also use a kind of "binary search" approach to figure the  
location by cutting larger parts of my text, recompile (to see if the  
error is still present), undo (to re-insert the cutted text), and  
continue the process with a smaller part.


Hope that helps. If it does, keep an eye on which steps lead to this  
kind of problems, so we can help to figure out the exact circumstances.


Daniel



On 29.02.2008, at 09:51, Maximilian Wollner wrote:


Dear LyX-Users,


I am working on my thesis with LyX 1.5.2 to LyX 1.5.4. It might seem  
a bit complicated but I use XeTeX (on OS X Tiger), the Memoir  
Document Class (for which I have also written some hints in the LyX  
wiki) and BibLaTeX, so that I have made a special version of the  
Memoir Class, everything according to hints on the list or in the  
wiki.


Until yesterday, everything worked really, really fine and I was  
about to write the most beautiful thesis my departement has ever  
seen -- coming from social sciences, Word seems to be a 99% must- 
have ;)


But all of a sudden, LyX won't compile my document anymore and  
instead gives me an error message like this:


›Eine leere Ausgabedatei wurde erzeugt.‹ (which means something  
like ›an empty output file was made...‹)



Unfortunately, the many error messages from the compiler are not  
readable at all, starting with eg.



LaTeX Error: Missing \begin{document}.


  ZGD0-z%^^8dyN^^8d^^89^^PcCF^^80^^80...



Text line contains an invalid character.

M^^F
  An1oz:8 #^^82^^Sr6'GE^^89N^^94A^^IK^^93}: 
4*^^Ye:;[EMAIL PROTECTED]

A funny symbol that I can't read has just been input.
Continue, and I'll forget that it ever happened.



You can't use `macro parameter character #' in horizontal mode.

M^^FAn1oz:8 #
   ^^82^^Sr6'GE^^89N^^94A^^IK^^93}: 
4*^^Ye:;[EMAIL PROTECTED]

Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.



Text line contains an invalid character.

M^^FAn1oz:8 #^^82^^S
  r6'GE^^89N^^94A^^IK^^93}: 
4*^^Ye:;[EMAIL PROTECTED]

A funny symbol that I can't read has just been input.
Continue, and I'll forget that it ever happened.



Too many }'s.

...n1oz:8 #^^82^^Sr6'GE^^89N^^94A^^IK^^93}
 : 
4*^^Ye:;[EMAIL PROTECTED]@...

You've closed more groups than you opened.
Such booboos are generally harmless, so keep going.



Text line contains an invalid character.

... #^^82^^Sr6'GE^^89N^^94A^^IK^^93}:4*^^Y
  
e:;[EMAIL PROTECTED]@^^@ ...

A funny symbol that I can't read has just been input.
Continue, and I'll forget that it ever happened.



Text line contains an invalid character.

[EMAIL PROTECTED]'^^81L^^N
 3^^E^^N^^N^^96^^V^^T^^\^^Iq4^^PQ^^84`^^98z^^...
A funny symbol that I can't read has just been input.
Continue, and I'll forget that it ever happened.



Misplaced alignment tab character &.

...^^9cn^^99^^92^^916]x^^8d^^Q&
 ^^85^^QrZ^^98...
I can't figure out why you would want to use a tab mark
here. If you just want an ampersand, the remedy is
simple: Just type `I\&' now. But if some right brace
up above has ended a previous alignment prematurely,
you're probably due for more error messages, and you
might try typing `S' now just to see what is salvageable.



LaTeX Error: Missing \begin{document}.

[EMAIL PROTECTED]@^^A
  [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@[EMAIL PROTECTED]




And so on. The er

Re: ftp.lyx.org down?

2008-02-26 Thread Daniel Lohmann


On 26.02.2008, at 16:14, Jürgen Spitzmüller wrote:


Daniel Lohmann wrote:

It seems that the ftp server on ftp.lyx.org is down. I can ping the
machine, but the ftp server does not answer requests.


The server is not really down, but rather slow and sometimes  
unrespondable

these days (it took me several attempts to upload the binaries).

I am still using 1.5.1 because of the "show stopper bugs" in the  
1.5.2
and 1.5.3 releases that, according to the change log, have been  
fixed.

Now I am desperately looking for LyX1.5.4-mac -- besides that
installing and trying a new version would give me a good excuse to  
not

work on my thesis ;-)

Any alternative download location for the Mac image?


Try one of the mirrors listed on the home page. This one seems to be  
up to

date:

http://lyx.cybermirror.org/bin/1.5.4/



Oh that was obvious, wasn't it?

Thanks Jürgen!

Daniel

ftp.lyx.org down?

2008-02-26 Thread Daniel Lohmann

Hi,

It seems that the ftp server on ftp.lyx.org is down. I can ping the  
machine, but the ftp server does not answer requests.


I am still using 1.5.1 because of the "show stopper bugs" in the 1.5.2  
and 1.5.3 releases that, according to the change log, have been fixed.  
Now I am desperately looking for LyX1.5.4-mac -- besides that  
installing and trying a new version would give me a good excuse to not  
work on my thesis ;-)


Any alternative download location for the Mac image?

Daniel


Re: backref

2008-02-26 Thread Daniel Lohmann


On 25.02.2008, at 11:48, Wolfgang Engelmann wrote:

I try to locate some references in my document by using the package  
backref. I

do, however, get only
pages (actually Seiten, since it is a german document)
behind the reference, no page number. What do I do wrong? I inserted
\usepackage[ngerman]{backref}
\usepackage{hyperref}
in the preamble.


Maybe you have to redefine the \backrefalt command? Another reason  
might be the interaction between backref and hyperref. If both are  
used, backref has to be loaded by hyperref.


Anyway, this is what I have in my preamble, works like a charm:

%*
%** hyperref and backref  
*
% The pagebackref option must be passed as package option to hyperref,  
otherwise

% backref is not loaded by hyperref (\hypersetup is to late)
%
% We also redefine the typesetting of backrefs.
%
  \usepackage[pdftex, pagebackref=true, hyperindex=true]{hyperref}
  \hypersetup{%
breaklinks= true,
colorlinks= true,
pdfcreator= LyX :-)
  }

  % simple backref command redefinition (not sure if it is necessary)
  \renewcommand*{\backref}[1]{}

  % redefinition of the actually used \backrefalt
  \renewcommand*{\backrefalt}[4]{%
\ifcase #1 %
% case: not cited
\or
% case: cited on exactly one page
\par \vspace{-6pt} \footnotesize (Cited on page~#2.)%
\else
% case: cited on multiple pages
\par \vspace{-6pt} \footnotesize (Cited on pages~#2.)
\fi}


Daniel


Re: Where is Tex documentation on Mac

2008-02-22 Thread Daniel Lohmann


On 22.02.2008, at 14:13, Bennett Helm wrote:


On Feb 22, 2008, at 3:31 AM, Graham Smith wrote:

Silly question I know, but I'm new to the Mac and I am trying to  
find the documentation for the Beamer class.


It depends on how you installed TeX. If you used MacTeX, it can be  
found at:


/usr/local/texlive/2007/texmf-dist/doc/latex/beamer/doc/ 
beameruserguide.pdf


Also how do I install extra classes. This all seemed failry obvious  
with MikTex on Windows but struggling to find my way around the Mac.


The standard location is ~/Library/texmf/tex/latex. (Note that LyX  
won't recognize extra classes unless you have an appropriate .layout  
file.)



Note that the beamer package contained in TeXLive 2007 is rather old.  
Unfortunately there seems not to be a simple package update option,  
like  in MikTeX. I download the newest versions of beamer/pgf and  
install them manually. It is not a big thing, though, you just have to  
use the shell to copy some files.



Daniel


Re: Memory use

2008-02-13 Thread Daniel Lohmann


On 13.02.2008, at 11:26, Nicolás wrote:


Hi!

LyX seems to make a good use of RAM just after it has been started  
up. When a file is closed the memory the file was using is released  
and when LyX is minimized, the memory used is reduced to a minimum.  
That's great! However, this is no longer true when LyX is running  
and I go into and come back from hibernation. I am using v1.5.2 on  
Windows XP. I wonder if this is a problem of LyX that could be  
solved, or whether it is a problem with hibernation that is out of  
the scope of LyX.


I doubt that this behavior has anything to do with LyX. Instead, I  
assume that changes in memory consumption you observed are related to  
the working set of the LyX process, which is under the control of the  
operating system.


In Windows, every process has a contingent of memory pages kept in  
RAM, called the working set. If this contingent of pages is exceeded,  
the least accessed pages are moved from the working set to the global  
system cache. They are still in RAM and could be restored quickly if  
the process accesses them again. However, If the system is getting  
short on physical memory, pages from the system cache are discarded  
and have to be swapped in from disk on the next time they are accessed  
again.


Depending on the global memory situation and the expected user  
activity, Windows heuristically extends or reduces the working sets of  
processes.  If you minimize a process, Windows reduces (trims) the  
working set as it does not expect you to actually work with a  
minimized process. This is the behavior you observed when minimizing  
LyX.


If the system is asked to go to hibernation, Windows aggressively  
reduces the working set of all processes. This is to reduce the number  
of RAM pages that have to be written to the hibernation file. After  
awaking back from hibernation, the working set of the LyX process is  
therefore still fairly small; depending on user activity it will grow  
over time to its previous limit. If, however, you minimize LyX or  
close a document immediately after the system came back from  
hibernation, the chance is high that the working set has still not  
been expanded to a value that would cause Windows to trim it again.


Long story, short conclusion: The behavior you described is most  
probably  caused by the OS.



Daniel 
 

Emedding PDF graphcis problem - missing converter

2008-02-12 Thread Daniel Lohmann

LyX 1.5.1, OS-X

Hi,

Whenever I insert some pdf graphics into my LyX document and compile  
it with pdflatex, Lyx complains about a missing converter:


"No information for converting pdf format files to png.
Define a converter in the preferences. "

Why is LyX trying to convert the graphics into png instead of directly  
using the pdf?


I guess there is something messed up with my formats  /  converters  
setup. Any help is highly appreciated.


Thanks,

Daniel


Re: Lyx keyboard shortcuts on mac

2008-01-16 Thread Daniel Lohmann


On 15.01.2008, at 19:40, Jens Noeckel wrote:



 Fortunately, on the Mac you can also access the menu bar by the  
system-wide shortcut "Control-F2" (which you can in turn customize  
in the System Preferences).




Well, yes - so lets hope that  bug 4446 gets fixed in the next  
release :-)


http://bugzilla.lyx.org/show_bug.cgi?id=4446

Daniel


Re: Lyx keyboard shortcuts on mac

2008-01-14 Thread Daniel Lohmann


On 10.01.2008, at 02:33, Bennett Helm wrote:

Better yet, look at the mac-bind.pdf file that is included with the  
LyX/Mac distribution. Insert footnote is not defined there, but you  
can define it yourself by creating a file with the following:


\bind_file mac.bind

\bind "S-C-F" "footnote-insert"


While it is certainly an option to add lots of shortcuts to the bind- 
file, it is also kind of dissatisfying  that on Windows and Linux we  
implicitly have *all* menu commands available as shortcuts (by the Alt 
+underlined letter, underlined letter, ... keyboard navigation through  
menus), whereas on Mac the user has to assign about a hundred  
shortcuts manually to achieve the same usability. Moreover, the multi- 
key shortcuts are not visible in the menu. (The latter is not an as  
big problem, as LyX has this great feature to print the shortcut of  
the last executed command in the status bar.)


I guess it is not LyX to blame here (and certainly not it's  
developers :-) ), but the Mac menu system in general or maybe  Qt for  
Mac. Nevertheless, I think it would be a good idea to offer Mac users  
the same level of comfort by adding *lots* of shortcuts to the  
standard mac.bind file and, maybe, looking for some other way to  
indicate multi-key shortcuts in the LyX menus.



Daniel 


Re: I'm writing a book in VimOutliner

2008-01-03 Thread Daniel Lohmann

Hi,

While I have neither used VimOutliner, nor am I a professional book  
writer, I usually do outline my texts before starting the actual  
writing. I use the mind-mapping tool FreeMind (http://freemind.sourceforge.net/ 
) to do the outlining, which supports links, keyboard navigation,  
folding/unfolding and so on. I then convert the FreeMind mindmap to  
LaTeX using a (slightly adopted) Ruby script (supposed to be available  
at http://www.duminil.info/doku.php?id=freemindtolatex, but currently  
down) and import the resulting LaTeX document into LyX.


Daniel


Re: Some LyX 1.5.3 issues (OS-X specific?)

2007-12-23 Thread Daniel Lohmann


On 22.12.2007, at 17:59, Jens Noeckel wrote:



On Dec 22, 2007, at 5:12 AM, Bennett Helm wrote:


On Dec 21, 2007, at 8:17 AM, Daniel Lohmann wrote:


And finally, on LyX OS-X related question:
How can I use the "Ctrl" key in LyX key bindings? "C" is  
apparently bound to the "Apple/Command" key and "M" is bound to  
the "Alt" key. All this makes sense, of course, I would just like  
to use the "Ctrl" key as well.


I believe this is a Qt/Mac limitation and so out of our control.

Bennett



When you say "use Ctrl as well", do you mean you want Ctrl and  
Command keys to be switched? If that's what you want, it requires  
modifying the file

src/gui/kernel/qkeymapper_mac.cpp
in the qt-mac-opensource source distribution. I've done that and  
have compiled LyX 1.5.3 with it. That way, LyX uses Apple/Command as  
a meta key, and Ctrl as the control key. I can put that binary  
online, and post more details on the QT patch, if anyone is  
interested. I hadn't done that because I haven't had a chance to  
work with the new version myself yet (my main LyX is still at  
version 1.4).


Jens


Thanks Jens,

However, what I actually want is to use *both* keys within LyX.   
Apparently (according to Bennett) this is not possible because of a  
MacQt limitation.


Daniel


Some LyX 1.5.3 issues (OS-X specific?)

2007-12-22 Thread Daniel Lohmann

Hi LyX folks,

On a longer train journey I had the opportunity to actually do some  
work with LyX on my new Mac. While doing so, I observed a couple of  
issues. Some of them might be related to the fact that I am still  
using it in a very Windows-like way, especially with respect to trying  
to do everything with the keyboard, but the mouse.


The environment is LyX 1.5.3 on OS X 10.5.1

1) wandering character styles
While typing in a paragraph where some parts of the text have  
character styles assigned, these parts  "wander" by a few pixels to  
the right on every keystroke, visually overriding other parts.  I have  
attached two images to illustrate the problem: img1 is before typing,  
img2 is after typing ten chars:

http://www4.informatik.uni-erlangen.de/~lohmann/tmp/img1.gif
http://www4.informatik.uni-erlangen.de/~lohmann/tmp/img2.gif

2) hidden cursor movements when navigating through the menu by keyboard
When I activate the menu with the keyboard (Ctrl+F2) and then use the  
cursor keys to navigate to the actual menu entry, the following happens:


- on Ctrl+F2, the menu is activated (as it should), but LyX also  
inserts a space character at the current cursor position (which it  
should not)


- on navigating through the menu, the cursor inside LyX moves as well.

The result is that if I place the cursor somewhere and then use the  
keyboard to select, e.g., Insert->Label from the menu, the  label is  
inserted roughly 5 chars to the right and 10 lines down from the  
actually intended position.


3) word-delete-backward deletes one extra words if used on text with  
character styles.
If I place the cursor behind a piece of text with an assigned  
character style and issue a "word-delete-backward" command, not only  
the char-style inset is deleted, but also the  word on its left.


4) cursor looks misplaced when editing text in char-style insets
Inside a char-style inset, the cursor seems to be rendered a few  
pixels more left than in the ordinary text. Visually this appears as  
the cursor being over the character instead of right of it. (This of  
course is not really an issue, just a bit surprising)


I currently do not have the ability to check if these issues are OS-X  
or 1.5.3 - specific or if they can be observed on Windows or Linux as  
well. Maybe somebody could check this?


And finally, on LyX OS-X related question:
How can I use the "Ctrl" key in LyX key bindings? "C" is apparently  
bound to the "Apple/Command" key and "M" is bound to the "Alt" key.  
All this makes sense, of course, I would just like to use the "Ctrl"  
key as well.


Thanks a lot!

Daniel









Re: Errors in LyX 1.5.3 installer for Mac

2007-12-19 Thread Daniel Lohmann

Similar problem here.

It seems to be a permissions problem.

In my case the lyx folder under Library/texmf/tex/latex was owned by  
root and the installer could not copy the "Lyx's additional classes  
and styles". I guess the reason is that he folder originally had been  
created by a LyX 1.51 installer, which required root privileges to run.


A simple "sudo chwon -R me Library/texmf/tex/latex/lyx" solved the  
issue.


Daniel


On 18.12.2007, at 17:34, Maria Gouskova wrote:


Dear LyX users,

On Dec 18, 2007 8:27 AM, Bennett Helm <[EMAIL PROTECTED]> wrote:


On Dec 18, 2007, at 4:45 AM, [EMAIL PROTECTED] wrote:


Dear Lyxers,

Yesterday I installed the new 1.5.3 binary for Mac on my MacBook  
Pro.

While running the installer, three errors showed up:

1) ERROR: Cannot install preview files

2) ERROR: Cannot install Srcltx files

3) Cannot install LyX's additonal LaTex.cls and .sty files

After thtat, the Installation reports says: No need to update TeX
installation.

My question is: As I don't have to update TeX installation... are
those
errors normal



I had the same problem. Details below.


I updated the installer in an attempt to remove the requirement of an
administrator's password. Consequently, all these files are now
installed in ~/Library/texmf/tex/latex. So the question is: why is
this change failing for you? -- Can you provide more details?

* Is this a first-time installation, or are you upgrading? If
upgrading, from which previous version of LyX?


Upgrading from 1.5.2.


* Do you have preview and srcltx folders in ~/Library/texmf/tex/
latex? If so, who owns these folders and accompanying files? (You?
root? some other user on your machine?)


Yes. The file preview.sty is read-only for me, but read+write for the
"system." When I tried changing the permissions on the folders and
files, Mac OS required entering the password.


* Are you installing LyX from an administrator's account?


Mine is an administrator account on the Mac, as in "Allow this user to
administer this computer" is checked in system prefs>accounts.


* When you run the installer, can you generate a report and send it
to the list? (There's a button to do this at the end of the
installation procedure.)


The installer script produced this:

1. Removing obsolete files 
... Done removing obsolete files.
2. Testing to see if old LyX user's folder should be moved to new  
location 

• Old LyX user's folder exists at ~/Library/'Application
Support'/LyX-1.4/. This was left untouched bec
LyX user's folder already exists at the new location,
~/Library/'Application Support'/LyX-1.5/.
... Done moving LyX user's directory to new location.
3. Tidying up your preferences file to reflect new location of LyX
user's directory 
... Done.
4. Installing default LyX templates 
... Done installing default LyX templates.
5. Installing LaTeX files 
• Found TeX installation at /usr/local/teTeX/bin/i386-apple-darwin- 
current.

• Local TeX directory set to ~/Library/texmf.
*** ERROR: Cannot install Preview files.
*** ERROR: Cannot install Srcltx files.
*** ERROR: Cannot install LyX's additional LaTeX .cls and .sty files.
• No need to update TeX installation.
... Done.

BTW, I don't know about the original reporter's OS, but mine is
10.5.1. I'd like to know if this is a general Mac problem or a
Leopard-specific one, but my guess is it's one of Leopard's many dark
spots.

Maria




Re: Koma-script report, Bibliography entry in Table of Contents un-bold?

2007-12-07 Thread Daniel Lohmann

David Hewitt wrote:


I'm not great with plain LaTeX, so could you post a piece of hacking that
would work just to drop the Bibliography to a section level?



Okay, the following should work with KOMA-script. Just put it in the 
LaTeX preamble of your document:


\makeatletter
[EMAIL PROTECTED]
  \section*{\bibname}%
  [EMAIL PROTECTED]
}
\makeatother

Note that this makes "Bibliography" an unnumbered section. If you want 
it to be numbered,  just remove the * (star) from the \section command.


Daniel


  1   2   >