On screen math fonts

2014-11-23 Thread Ernesto Posse
Hi. I recently upgraded my LyX install to 2.1.2.1 on Mac OS X Mavericks,
and I noticed that the on-screen character for \otimes is now rendered
incorrectly as an A with umlaut, although the PDF output is correct. I
haven't noticed this with any other symbols so far. Is this a bug, or some
configuration issue?

Thanks.


-- 
Ernesto Posse
Zeligsoft.com


CopyStyle in layout files

2014-11-14 Thread Ernesto Posse
When defining a style, is it possible to copy more than one style? If so,
are values overridden?

This seems like it would be a good feature, when you want to create a style
that combines the features of two existing styles.

-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Ernesto Posse
I figured out the problem: on the Mac LyX stores the UserDir under
~/Library/Application Support/LyX-. I still had version 2.0 and
was editing my layout file in that folder, rather than the one in the 2.1
folder. I now works as expected.

Thanks again.


On Fri, Nov 14, 2014 at 3:46 AM, Jürgen Spitzmüller  wrote:

> Jürgen Spitzmüller wrote:
> > > Is it possible that LyX caches layout files somewhere and it's not
> picking
> > > up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
> > > worth).
> >
> > No. You are sure that you do not have a copy of the layout file which is
> > used  by LyX?
>
> Also assure that your document does not have a local layout that overwrites
> the layout definition.
>
> Jürgen
>



-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Ernesto Posse
Thanks. Comments inline below.

On Thu, Nov 13, 2014 at 9:57 AM, Jürgen Spitzmüller  wrote:

> 2014-11-13 15:38 GMT+01:00 Ernesto Posse:
>
>> Thanks. That is what I want to achieve and your example does accomplish
>> this, but I don't understand why using the first form of "Argument"
>> declaration in the layout file, without 'post:', the second argument to the
>> command is always the text from the work area, this is,
>>
>> \command{arg1}{work area text}{arg2}{arg3} ...
>>
>> I understand that's what 'post:' does, but without it, I obtain the same
>> result. What if I want to generate the following?
>>
>> \command{arg1}{arg2}{arg3}{work area text}
>>
>
> If you do not use post:, you need to stick with the pre numbering, that is
>
>  Argument 1
>
>Mandatory 1
>
>LabelString "CR number"
>
> EndArgument
>
>Argument 2
>
>Mandatory 1
>
>LabelString "Sub-Category"
>
> EndArgument
>
> Argument 3
>
>LabelString "Subject Descriptor"
>
> EndArgument
>
>
>


That's exactly what I tried but got exactly the same result as using
'post:'. I think that for some reason, when I reconfigure and restart, LyX
is not catching the changes in the layout file. I've tried running it from
the command-line with different debug options, but I don't see anything
about it, other than a comment saying that it's loading layout files, but
not mention of whether it was successful or not.

Is it possible that LyX caches layout files somewhere and it's not picking
up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
worth).




> In my particular case, it seems to me that there is no particularly good
>> reason why the "category" field should be treated differently than the
>> others (CR code, sub-category, subject).
>>
>
> Maybe you are looking for a flex inset rather than a style?
>
>

I've read a bit about those, but I don't think so. I just need a plain
command, and the documentation explicitly says that the output should be
such that the work area text is the last argument to the command.


>
>> Also, why doesn't the "Mandatory 0" flag work? I would expect it to
>> produce an argument enclosed in [...], not in {...}.
>>
>
>
> Works for me. Although it is superfluous (Mandatory is false by default).
>
>
In your example it seems to work. I've no idea why it's not working for my
other test files. The only difference seems to be that I'm not using a
local layout.




> Jürgen
>
>
>>
>> Thanks
>>
>> PS: The style I want to use is ACM small journals (
>> http://www.acm.org/publications/submissions/latex_style). I'm not sure
>> if it's the same as the one for SIG proceedings, but I'm guessing there
>> will be some differences.
>>
>
>


-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Ernesto Posse
Thanks. That is what I want to achieve and your example does accomplish
this, but I don't understand why using the first form of "Argument"
declaration in the layout file, without 'post:', the second argument to the
command is always the text from the work area, this is,

\command{arg1}{work area text}{arg2}{arg3} ...

I understand that's what 'post:' does, but without it, I obtain the same
result. What if I want to generate the following?

\command{arg1}{arg2}{arg3}{work area text}

In my particular case, it seems to me that there is no particularly good
reason why the "category" field should be treated differently than the
others (CR code, sub-category, subject).

Also, why doesn't the "Mandatory 0" flag work? I would expect it to produce
an argument enclosed in [...], not in {...}.

Thanks

PS: The style I want to use is ACM small journals (
http://www.acm.org/publications/submissions/latex_style). I'm not sure if
it's the same as the one for SIG proceedings, but I'm guessing there will
be some differences.

On Thu, Nov 13, 2014 at 4:01 AM, Jürgen Spitzmüller  wrote:

> 2014-11-12 21:14 GMT+01:00 Ernesto Posse:
>
>> Thanks. That's quite nice, but it doesn't work quite as expected.
>>
>> I tried the two forms, arguments with and without 'post:' and I get the
>> same result: the second argument of the command is the "body" (the text
>> that follows all arguments) and "Mandatory 0" seems to be ignored (the
>> generated argument is enclosed in {...} rather than [...]). For example, if
>> in the LyX work area I write the following (with text enclosed in <...>
>> representing the style name and <...>[ ... ] representing an argument inset)
>>
>>  [D.2.4.1] [Software Engineering]
>> [Software/Program Verification]  [Formal methods]
>> Some other text
>>
>> Then the resulting code is
>>
>> \category{D.2.4.1}{Some other text}{Software
>> Engineering}{Software/Program Verification}{Formal  methods}
>>
>> So it looks like all arguments after the first are treated as if they
>> where tagged with 'post:' and the optional flag seems to be ignored.
>>
>> Is this a bug or am I missing something?
>>
>
> Maybe I misunderstand you, but don't you want to achieve this output:
>
> \category{CR-Number}{Category}{Sub-Category}[Subject Descriptor]
>
>
> Whereas the second mandatory argument ("Category") is what is inserted in
> the main text?
>
> (I figured that you want to use this style:
>
> http://www.acm.org/sigs/publications/sigguide-v2.2sp)
>
>
> The attached document shows this (the definition is in Document > Local
> Layout).
>
>
> Jürgen
>
>


-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Ernesto Posse
Thanks. That's quite nice, but it doesn't work quite as expected.

I tried the two forms, arguments with and without 'post:' and I get the
same result: the second argument of the command is the "body" (the text
that follows all arguments) and "Mandatory 0" seems to be ignored (the
generated argument is enclosed in {...} rather than [...]). For example, if
in the LyX work area I write the following (with text enclosed in <...>
representing the style name and <...>[ ... ] representing an argument inset)

 [D.2.4.1] [Software Engineering]
[Software/Program Verification]  [Formal methods]
Some other text

Then the resulting code is

\category{D.2.4.1}{Some other text}{Software Engineering}{Software/Program
Verification}{Formal  methods}

So it looks like all arguments after the first are treated as if they where
tagged with 'post:' and the optional flag seems to be ignored.

Is this a bug or am I missing something?






On Wed, Nov 12, 2014 at 2:08 PM, Jürgen Spitzmüller  wrote:

> 2014-11-12 20:01 GMT+01:00 Jürgen Spitzmüller:
>
>
>> However, if you use LyX 2.1, you do not need an own command, since the
>> command in question is possible with the help of the new argument syntax:
>>
>> Style Category
>> InPreamble1
>> LabelTypeStatic
>> LabelString"Category"
>> LatexTypeCommand
>> LatexNamecategory
>> Argument 1
>> Mandatory 1
>> LabelString"CR number"
>> EndArgument
>> Argument 2
>> Mandatory 1
>> LabelString"Category"
>> EndArgument
>> Argument 3
>> Mandatory 1
>> LabelString"Sub-Category"
>> EndArgument
>> Argument 4
>> LabelString"Subject Descriptor"
>> EndArgument
>> MarginDynamic
>> Labelsepxx
>> LabelFont
>> FamilySans
>> SeriesBold
>> ShapeSlanted
>> SizeNormal
>> ColorBlue
>> EndFont
>> End
>>
>
>
> Sorry, this should be:
>
> Style Category
> InPreamble1
> LabelTypeStatic
> LabelString"Category"
> LatexTypeCommand
> LatexNamecategory
> Argument 1
> Mandatory 1
> LabelString"CR number"
> EndArgument
> Argument post:1
>     Mandatory 1
> LabelString"Sub-Category"
> EndArgument
> Argument post:2
> LabelString"Subject Descriptor"
> EndArgument
> MarginDynamic
> Labelsepxx
> LabelFont
> FamilySans
> SeriesBold
> ShapeSlanted
> SizeNormal
> ColorBlue
> EndFont
> End
>
>
> Jürgen
>
>


-- 
Ernesto Posse
Zeligsoft.com


Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Ernesto Posse
Hi. I'm trying to define my own layout file and I ran into this situation:
I need a style whose latex command must go into the preamble (as required
by the underlying latex class), but I need to define my own command for the
style because the one provided by the base class doesn't work well with the
way styles work in the LyX UI.

The problem is that styles which have been declared as "InPreamble 1" get
their code generated before the user preamble which defines the required
latex command, and therefore, when compiling, LaTeX will stop with an error
saying that the control sequence is not defined (because it is defined
later). The style in question is the following:

Style Category
InPreamble 1
LabelType Static
LabelString "Category"
LatexType Command
LatexName ACMCCScategory
RequiredArgs 3
Margin Dynamic
Labelsep xx
LabelFont
Family Sans
Series Bold
Shape Slanted
Size Normal
Color Blue
EndFont
Preamble
\newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}
EndPreamble
End

So as you see, the style uses the custom-defined command \ACMCCScategory,
but the generated code is this:

\makeatletter


%% LyX specific LaTeX commands.


\ACMCCScategory{D.2.4}{Software Engineering}{Software/Program
Verification}{Formal methods}


%% Textclass specific LaTeX commands.

\newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}


%% User specified LaTeX commands.

\usepackage{aadl}


\makeatother


So the problem is evident: the command is defined after it is being used.


Is there a way to tell LyX to produce the preamble commands before the "in
preamble" styles?




-- 
Ernesto Posse
Zeligsoft.com


Re: Logic: Tableau Proofs (trees)

2013-11-07 Thread Ernesto Posse
I asked about which logic because that determines which operators you will
need (I've only given you a few in my examples), but also because for some
logics the tableaux are not trees but directed acyclic graphs, (e.g., in
temporal logics). This of course has a big impact on how to draw the
tableaux. It can be done in tikz, but it needs additional constructs that I
have not shown in my previous examples. So the question is whether in your
modal logic the tableau construction rules create loops or not.

Since you want to be able to make your own tableaux you will need to learn
a little bit of LaTeX, as I said before. I will try to put together a mini
crash course on the things that you'll need, but in the end you'll need to
do a bit more than just copy-and-paste in order to get what you want. I'll
post the notes here later on. In the meantime you can try the examples, and
try tweaking bits of the code to see what happens.



On Wed, Nov 6, 2013 at 6:12 PM, William Hanson  wrote:

> Ernesto,
>
> I'm writing a paper using LyX, and I need to insert several specific
> tableaus into it.  Using your numbers:
>
> 1) I do not want to add just *any* tableau example.
>
> 2) I do want to add several specific tableaus containing particular
> formulas.  Probably just five or six such tableaus, each of which would
> occupy ten to twenty lines of text.  (By a line of text, I mean a
> horizontal line across the page in the finished, PDF version.  Such a line
> might of course include characters from more that one branch.  In the
> example called Sample Tableau, attached to an earlier message in this
> string, I count 12 horizontal lines of text in the leftmost branch (not
> counting the slanted lines that indicate branching).)
>
> 3) My original idea was indeed to learn to make my own tableaus so that I
> could accomplish 2.
>
> When you ask "which logic?" I assume you're asking which object-language
> formulas will appear (with some additional prefixes and suffixes) as items
> in the tableaus.  The answer is:  first-order modal logic plus a lambda
> operator for predicate abstraction.  That is the object language used in
> the Sample Tableau attachment, except that the formulas in the Sample
> Tableau don't happen to contain any modal connectives.  (The modal
> connectives I'm using are the box and the diamond.)
>
> I've been pressed for time the last few days, so I haven't yet had a
> chance to try the suggestions you made on Nov 4, or the ones you make today
> (Nov 6).  I'll do so tomorrow and let you know what happens.
>
> Thanks,
>
> Bill
>
>
> On Wed, Nov 6, 2013 at 12:46 PM, Ernesto Posse wrote:
>
>> Didn't my last suggestions help?
>>
>> I am still unsure about whether you want to 1) add *any* tableau example,
>> 2) add a specific tableau (i.e., a particular example that you have in mind
>> with particular formulas), or 3) be able to make your own tableaux. If it
>> is 1 or 2, which logic? Please clarify.
>>
>> In terms of tools, I'm afraid that there is no tool, to the best of my
>> knowledge, that allows you to make tableaux with absolutely no knowledge of
>> LaTeX. Even if you try to use a drawing program for this purpose, you'll
>> have to write at least the formulas in LaTeX, and it is quite tricky to
>> embed formulas in such drawing tools. So if you want to be able to create
>> your own, I'm afraid you'll have to learn a little bit.
>>
>> As for your example, try doing the following:
>>
>> 1. In LyX: open your file; go to "Document->Settings..->LaTeX Preamble"
>> and enter the following:
>>
>> \usepackage{tikz}
>>
>> \def\land{\wedge}
>> \def\lor{\vee}
>> \def\limp{\to}
>> \def\closed{\times}
>>
>> 2. Open Notepad and enter the following (keep the spaces at the beginning
>> of each line):
>>
>> \begin{minipage}{1\columnwidth}%
>> \begin{center}
>>  \begin{tikzpicture}
>> [level distance=1.5cm,
>>  level 1/.style={sibling distance=2cm},
>>  every child node/.style={anchor=north},
>>  every child/.style={parent anchor=south}]
>> \node {\begin{minipage}{4cm}%
>>  \begin{center}
>>  $1~\neg ((p \lor (p \land q)) \limp p)$\\
>>  $1~p \lor (p \land q)$\\
>>  $1~\neg p $
>>  \end{center}
>>\end{minipage}}
>> child {node {\begin{minipage}{0.5cm}%
>>\begin{center}
>>$1~p$\\
>>$\

Re: Logic: Tableau Proofs (trees)

2013-11-06 Thread Ernesto Posse
Didn't my last suggestions help?

I am still unsure about whether you want to 1) add *any* tableau example,
2) add a specific tableau (i.e., a particular example that you have in mind
with particular formulas), or 3) be able to make your own tableaux. If it
is 1 or 2, which logic? Please clarify.

In terms of tools, I'm afraid that there is no tool, to the best of my
knowledge, that allows you to make tableaux with absolutely no knowledge of
LaTeX. Even if you try to use a drawing program for this purpose, you'll
have to write at least the formulas in LaTeX, and it is quite tricky to
embed formulas in such drawing tools. So if you want to be able to create
your own, I'm afraid you'll have to learn a little bit.

As for your example, try doing the following:

1. In LyX: open your file; go to "Document->Settings..->LaTeX Preamble" and
enter the following:

\usepackage{tikz}

\def\land{\wedge}
\def\lor{\vee}
\def\limp{\to}
\def\closed{\times}

2. Open Notepad and enter the following (keep the spaces at the beginning
of each line):

\begin{minipage}{1\columnwidth}%
\begin{center}
\begin{tikzpicture}
[level distance=1.5cm,
 level 1/.style={sibling distance=2cm},
 every child node/.style={anchor=north},
 every child/.style={parent anchor=south}]
\node {\begin{minipage}{4cm}%
 \begin{center}
 $1~\neg ((p \lor (p \land q)) \limp p)$\\
 $1~p \lor (p \land q)$\\
 $1~\neg p $
 \end{center}
   \end{minipage}}
child {node {\begin{minipage}{0.5cm}%
   \begin{center}
   $1~p$\\
   $\closed$
   \end{center}
 \end{minipage}}}
child {node {\begin{minipage}{1.5cm}%
   \begin{center}
   $1~p \land q$\\
   $1~p$\\
   $1~q$\\
   $\closed$
   \end{center}
 \end{minipage}}};
\end{tikzpicture}
\end{center}
\end{minipage}

Save this file as "tableau_example.tex" in the same folder as your LyX file.

3. On LyX, go to the part of your file where you want the tableau. If you
had it in a TeX box, remove it, put the cursor in its place, and go to
"Insert->File->Child document...". Click on "Browse..." and select
"tableau_example.tex".
Click OK.

4. Save your LyX file, and now you should be able to preview it or export
it.


PS: Finally, when posting messages to the mailing list please keep the same
subject line (which you can do by clicking "Reply" on your e-mail client).
This allows other people who have a similar problem to follow the
conversation. Also, ensure that when replying to help from someone in the
list (including myself), don't forget to CC the mailing list, again, so
that people can follow the conversation and see the possible solutions.




On Mon, Nov 4, 2013 at 10:13 PM, William Hanson  wrote:

> Despite much help from Ernesto Posse, for which I'm grateful, and which
> has allowed me to make some progress, I'm still far from being able to
> create tableau proofs in LyX.
>
> The attached file contains an example of what I want to create.  It's a
> tree, each node of which consists of one or more lines of text (one line
> above another).  These multi-line nodes are connected by slanted lines that
> indicate branching.  The trees do not contain any vertical lines.  There
> are examples in many logic texts, the best source being Melvin Fitting and
> Richard Mendelsohn, First-Order Modal Logic, Kluwer, 1999.
>
> I know there are sources on the web that cover related matters (tress in
> linguistics, sequent-calculus proof), but I've not yet found anything
> that's both close to what I need and usable by someone who doesn't know
> LaTeX.
>
> I've been using LyX for several years.  But since I don't know LaTeX, I'm
> not able to download an existing program and customize it to my needs.
>
> Bill Hanson
>
>
>


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Tableau Proofs: trees again

2013-10-30 Thread Ernesto Posse
quest to create
>> tableau proofs in LyX.   But these examples still don't have the exact
>> structure I need.
>>
>> I've attached (to earlier messages) a pdf file containing an example of
>> what I'm seeking, but apparently there is trouble viewing it.  I don't
>> understand this, since in trial e-mails I've sent to myself the file can be
>> opened and read using Adobe Reader.  I'm using gmail and attaching the file
>> in the usual way.  I'll attach it again to this message and hope for better
>> results.
>>
>> Here's a crude attempt to represent what I'm after. (I hope it comes
>> through ungarbled.)
>>
>> not((P or (P & Q)) -->P)
>> P or (P & Q)
>> not P
>>   /  \
>>  /\
>> /  \
>>  PP & Q
>>  x   P
>>   Q
>>x
>>
>> Each of the seven nodes is a  formula of a specified formal language.
>> (In this case it's simple propositional logic.)  Notice that there are no
>> lines (vertical or sloping) between any of the nodes except when branching
>> occurs. The only lines in the tree are the sloping ones that indicate
>> branching.  It is this feature that I'm unable to create.  (I know LyX
>> pretty well, but I know practically nothing about LaTeX.)
>>
>> If I could create trees in which nodes are connected with straight lines
>> only when branching occurs, I'd be well on my way.
>>
>> Bill
>>
>
>


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Logic: Tableau Proofs (again)

2013-10-29 Thread Ernesto Posse
I'm not sure how you are trying to attach files, but it doesn't seem to be
working, so I'm going to try to see if I understand what you want. But I
think the best thing is to work out with a generic example and then you can
apply it to your particular tableau.

First, let us start with a complete binary tree with two levels of depth:

\begin{tikzpicture}
\node {A}
child {node {A1}
 child {node {A11}}
 child {node {A12}}}
child {node {A2}
 child {node {A21}}
 child {node {A22}}};
\end{tikzpicture}

As you see, the root is introduced with the first "\node", and each subtree
is introduced with "child { ... }". The root of a subtree is the first
"node" in it: "child { node {B} ... }". Additional sub-subtrees follow the
same syntax, with "child" immediately after the node: "child { node {B}
child { node {C} ... } ...". The structure of the text has the same
structure of the tree you are trying to write.

If you try the example above you'll see that nodes A12 and A21 overlap.
This can be fixed by setting a separation between siblings in each level,
by providing some options at the top, as follows:

\begin{tikzpicture}
[level 1/.style={sibling distance=2cm},
 level 2/.style={sibling distance=1cm}]
\node {A}
child {node {A1}
 child {node {A11}}
 child {node {A12}}}
child {node {A2}
 child {node {A21}}
 child {node {A22}}};
\end{tikzpicture}

Now, you can also make the tree "grow" in other directions, by adding
"[grow=]" after the root, where direction can be for example
"up", "down", "left" or "right". For example:

\begin{tikzpicture}
[level 1/.style={sibling distance=2cm},
 level 2/.style={sibling distance=1cm}]
\node {A} [grow=right]
child {node {A1}
 child {node {A11}}
 child {node {A12}}}
child {node {A2}
 child {node {A21}}
 child {node {A22}}};
\end{tikzpicture}

Now, you can modify some edges by adding options to specific branches with
the following syntax "child [] { ... }". Options available include
"dashed", "dotted", "thick", "thin", "very thick", "very thin", "red",
"blue", "green", ..., and even arrow heads such as "->", "->>", and more
fancy styles like: "|->" or ">>->>" For example:

\begin{tikzpicture}
[level 1/.style={sibling distance=2cm},
 level 2/.style={sibling distance=1cm}]
\node {A} [grow=right]
child {node {A1}
 child {node {A11}}
 child [dotted] {node {A12}}}
child {node {A2}
 child [dashed, thick, blue, |->] {node {A21}}
 child {node {A22}}};
\end{tikzpicture}

So one possibility is to draw edges with the same colour as the background,
typically "white". But, this is not necessarity good, and if instead of
having an edge with a different style, you want no edge at all, then the
syntax is a bit different: "child {node {X} edge from parent[draw=none] ...
}". For example:

\begin{tikzpicture}
[level 1/.style={sibling distance=2cm},
 level 2/.style={sibling distance=1cm}]
\node {A} [grow=right]
child {node {A1} edge from parent[draw=none]
 child {node {A11}}
 child {node {A12}}}
child {node {A2}
 child {node {A21} edge from parent[draw=none]}
 child {node {A22}}};
\end{tikzpicture}

And of course, remember the [missing] option to get rid of children:

\begin{tikzpicture}
[level 1/.style={sibling distance=2cm},
 level 2/.style={sibling distance=1cm}]
\node {A} [grow=right]
child {node {A1} edge from parent[draw=none]
 child {node {A11}}
 child {node {A12}}}
child {node {A2}
 child {node {A21} edge from parent[draw=none]}
 child [missing] {node {A22}}};
\end{tikzpicture}


Finally, you can replace the node's text A, A11, etc. with whatever you
want. In particular, in LaTeX, formulae are written in "math mode", which
goes inside $...$.

If this doesn't help you might want to try again attaching the file to the
message.



On Tue, Oct 29, 2013 at 10:53 AM, William Hanson  wrote:

> Well, that didn't work either.  Sorry for the big message with all the
> junk.  I hope some of you will be able to open the attachment.
>
> Bill
>
>
> On Tue, Oct 29, 2013 at 9:49 AM, William Hanson  wrote:
>
>> Dear All,
>>
>> Many thanks to Ernesto Posse for the very detailed and helpful response.
>> However, what I'm trying to do is eliminate *all* the lines between
>> nodes *except* those that indicate a genuine branching of the tree.  In
>> other words, I want the overall structure of the tree to look like the
>> following (which I tried to attach to my previous messages, but which
>> apparently could not be opened).  As usual, any and all help is appreciated.
>>
>> Bill
>>
>>
>>
>>
>>
>>
>> On Mon, Oct 28, 2013 at 3:45 PM, Ernesto 

Re: Logic: Tableau Proofs (again)

2013-10-28 Thread Ernesto Posse
I'm unable to see your attachment, but if I understand what you want, the
simplest approach is to create "phantom" nodes in the tree. This can be
achieved with "child [missing]" as in the following examples:

First, a simple tree with two nodes: A and B; A is the root, and B is
directly below it:

\begin{tikzpicture}

\node {A}

   child {node {B}};

\end{tikzpicture}

Then with node B towards the left:

\begin{tikzpicture}

\node {A}

   child {node {B}}

   child [missing];

\end{tikzpicture}

and now, with B towards the right:

\begin{tikzpicture}

\node {A}
   child [missing]

   child {node {B}};

\end{tikzpicture}

Now, with your example (I changed the numbers in the nodes, for reference):

\begin{tikzpicture}

\node {$1.~\neg ((p \lor (p \land q)) \limp p)$}

   child {node {$2.~ p \lor (p \land q)$}

  child [missing]

  child {node {$3.~ \neg p $}

 child {node {$4.~ \ p $}}

 child {node {$5.~ p \land q$}

child [missing]

child {node {$6.~ p $}

   child {node {$7.~ q $}}

   child [missing]

   child [missing];

\end{tikzpicture}


As indicated in the examples above, the position of the "child [missing]"
relative to its siblings determines where you get the child nodes. Of
course you can also add any number of missing children, which increases the
angle:


\begin{tikzpicture}

\node {A}
   child [missing]
   child [missing]

   child {node {B}};

\end{tikzpicture}

Furthermore, you can control the distance between sibling nodes:

\begin{tikzpicture}[sibling distance=4cm]

\node {A}

   child {node {B}}

   child {node {C}};

\end{tikzpicture}


and even the distance between levels:


\begin{tikzpicture}[sibling distance=4cm,level distance=5cm]

\node {A}

   child {node {B}}

   child {node {C}};

\end{tikzpicture}


On Mon, Oct 28, 2013 at 4:06 PM, William Hanson  wrote:

> Dear LyX Colleagues,
>
> I'm still trying to create tableau proofs, which are branching columns of
> text, as illustrated in the attachment.
>
> Ernesto Posse's sample tableau (below) is helpful, but it contains two
> features I don't want:
>
> 1.  Two sentences at a node, separated by commas.  I want just one
> sentence at each node, as in the attached sample.  I've been figured out
> how to solve this problem by modifying Ernesto's code as follows:
>
> \def\land{\wedge}
> \def\lor{\vee}
> \def\limp{\to}
> \begin{tikzpicture}
> \node {$1\neg ((p \lor (p \land q)) \limp p)$}
> child {node {$ 1 p \lor (p \land q)$}
> child {node {$1 \neg p $}
> child {node {$1 \ p $}}
> child {node {$1 p \land q$}
> child {node {$1 p $}
> child {node {$1 q $}};
> \end{tikzpicture}
>
> 2.  But the foregoing code retains another feature I don't want: vertical
> lines from node to node when there is no branching.  I want only the
> (approximately) 45 degree (and 315 degree) lines that indicate branching,
> as on the attached sample.
>
> I've used LyX for several years, but I don't know LaTeX.
>
> Any and all help appreciated.
>
> Bill
>
>
>
>
>
> [image: Sample 
> Tableau.pdf]<https://mail.google.com/mail/u/0/?ui=2&ik=fcb7343f58&view=att&th=141e0e8e8016ae7f&attid=0.1&disp=safe&realattid=f_hn3bnlm80&zw>
> *Sample Tableau.pdf*
> 146K   
> View<https://docs.google.com/viewer?a=v&pid=gmail&attid=0.1&thid=141e0e8e8016ae7f&mt=application/pdf&authuser=0&url=https://mail.google.com/mail/u/0/?ui%3D2%26ik%3Dfcb7343f58%26view%3Datt%26th%3D141e0e8e8016ae7f%26attid%3D0.1%26disp%3Dsafe%26realattid%3Df_hn3bnlm80%26zw&sig=AHIEtbQpDR5qvKd2TSh_O5cOhrpoG-Owmg>
> Download<https://mail.google.com/mail/u/0/?ui=2&ik=fcb7343f58&view=att&th=141e0e8e8016ae7f&attid=0.1&disp=safe&realattid=f_hn3bnlm80&zw>
>
> Ernesto Posse 
> Oct 22 (6 days ago)
>
>  to me, lyx-users
> Hello. The easiest (and nicest) way to do this is using the tikz package:
> in the preamble put
>
> \usepackage{tikz}
>
> and then, wherever you want the tableau, put in a TeX box the following:
>
> \def\land{\wedge}
>
> \def\lor{\vee}
>
> \def\limp{\to}
>
> \begin{tikzpicture}
>
> \node {$\{\neg ((p \lor (p \land q)) \limp p)\}$}
>
> child {node {$\{p \lor (p \land q), \neg p\}$}
>
> child {node {$\{p\}$}}
>
> child {node {$\{p \land q\}$}
>
> child {node {$\{p,q\}$;
>
> \end{tikzpicture}
>
>
> Note that the structure of the tree depends on the grouping braces { ... }.
>
>
>  Richard Heck 
> Oct 22 (6 days ago)
>
> to Ernesto, me, lyx-users
>  There are lots of useful resources about this here:
> http://www.logicmatters.net/latex-for-logicians/trees/
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: why people give up on open source software

2013-10-26 Thread Ernesto Posse
Ken, you are not the one doing the fixing. The ones doing the fixing are
the ones deserving of gratitude and the ones doing the real work, far more
than the ones reporting the bugs. Reporting bugs (politely) is always
appreciated. Reporting bugs while insulting, and trashing the *volunteer*
work and demanding "professionalism" from those who are providing you with
a free product (developed for free), is not appreciated.



On Sat, Oct 26, 2013 at 7:46 PM, Ken Springer  wrote:

> On 10/26/13 10:17 AM, Steve Litt wrote:
>
>> On Thu, 24 Oct 2013 17:53:35 -0600
>> Ken Springer  wrote:
>>
>>  I'm not a programmer, learned many years ago that is not for me.  But
>>> I did contribute, for free, to writing the help files of a commercial
>>> program for a platform now long gone.
>>>
>>> But, as I wrote in
>>> news://news.gmane.org:119/**l4bi37$vh$1...@ger.gmane.org<http://news.gmane.org:119/l4bi37$vh$1...@ger.gmane.org>,
>>> if I help by
>>> reporting bugs I find in a program, assuming that reporting is
>>> requested by developers, shouldn't there be some thanks shown by
>>> fixing the bug?
>>>
>>
>> Depends.
>>
>> Imagine a buddy, who is a skateboarder, asking you for a critique of
>> his style while doing tricks. Both of the following could be considered
>> "reporting a bug":
>>
>> 1) I think you need to bend your knees more.
>>
>> 2) No wonder you're always losing contests, falling down, and just
>> generally screwing up. Your knees are straight. How unprofessional.
>>
>> #1 garners a "thank you." #2 garners "what a douchebag!"
>>
>> Thanks,
>>
>> SteveT
>>
>> Steve Litt*  
>> http://www.troubleshooters.**com/<http://www.troubleshooters.com/>
>> Troubleshooting Training  *  Human Performance
>>
>
> Not the same situation, Steve.  In both examples, fixing my friend's
> skateboard "bugs" result in a feature of his skateboarding that gives me
> something I can use.  :-)
>
> If I report a bug in a piece of software, fairly obviously it's something
> I use but is broken.  When the bug is squashed, then I and everyone else
> has something they can use.
>
>
>
> --
> Ken
>
> Mac OS X 10.8.5
> Firefox 24.0
> Thunderbird 17.0.8
> LibreOffice 4.1.1.2
>
>


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: why people give up on open source software

2013-10-24 Thread Ernesto Posse
You do seem to have very strong opinions about open-source, and demand very
high standards. Would you care to tell us how many open-source projects
have you created or at least been an active developer in?


On Wed, Oct 23, 2013 at 1:41 PM, Ken Springer  wrote:

> I do, but that's no excuse for being nonprofessional in what you are
> trying to do.  Adding features while ignoring bugs is nonprofessional.
>
> I do have some "free" software installed, some open source, some not. But
> I get updates and bug fixes from the "free" software, not so much from the
> open source software in the way of bug fixes.
>
>
> On 10/23/13 10:50 AM, Ernesto Posse wrote:
>
>> You do understand that a lot of open-source software, including LyX, is
>> developed by *volunteers*, do you?
>>
>>
>> On Wed, Oct 23, 2013 at 12:33 PM, Ken Springer > <mailto:snowsh...@q.com>> wrote:
>>
>> On 10/22/13 10:19 PM, Richard Talley wrote:
>>
>> I originally picked up on LyX because I needed to produce some
>> technical
>> manuals quickly that looked good to management and that didn't
>> make me
>> deal with the WYSIWYG nightmares of Word and its ilk.
>>
>> LyX really came through for me.
>>
>> Now I'm helping a friend apply to graduate school. I used the
>> KOMA-script v. 2 letter class to typeset his letter of intent.
>> Looks good!
>>
>> Now on to the résumé. Let's see what's available. ModernCV looks
>> good,
>> under development for seven years.
>>
>> Except it won't accept last names much longer than the author's
>> name
>> without hyphenation. Searching produces lot's of hacks to deal
>> with this.
>>
>> Run the example that comes with LyX. Note in example says, 'The
>> moderncv
>> class offers lots of customization possibilities; some are
>> explained in
>> the preamble of this document; for more information look at the
>> documentation of the LaTeX-package moderncv.'
>>
>> Yeah, right. The README for moderncv is very short and includes
>> this:
>> 'Until a decent manual is written, you can always look in the
>> "examples"
>> directory for some examples. Documents can be compiled into dvi,
>> ps or pdf.'
>>
>> The example LyX file points to documentation that doesn't actually
>> exist. There is no 'more information'. Nothing is explained.
>> Seven years
>> of development and there's nothing that Aunt Tillie can use.
>>
>> I know what I'm going to hear, 'Do it yourself', 'That's how
>> open source
>> works'. I agree. Perhaps I'll find the time to work on the
>> documentation. In the meantime, I need to produce a document
>> NOW, not
>> work on the documentation for the tool to produce the document.
>>
>> Lesson: Please don't point to ghost documentation. If you have
>> the time
>> to produce something that you expect people to use, you need to
>> make the
>> time to explain how to use it.
>>
>> (Disclaimer: this doesn't apply to LyX itself, which is richly
>> documented. Just to accessories to LyX and to open source
>> generally.)
>>
>> -- Rich
>>
>>
>> To all, what I'm about to write doesn't specifically to LyX, but as
>> in Rich's disclaimer, it applies to the open source community in
>> general.
>>
>> I totally understand Rich's frustrations, although he clearly states
>> his comments about the ModernCV site do not apply to LyX.
>>
>>
>> When I bought this Mac, it was more than I should have spent.  I got
>> into the open source programs, and encouraged others to do so.
>>
>> I no longer encourage others to use it.  Myself, I'm slowly moving
>> back to commercial software.  A fair question is, why?
>>
>> There's no universal answer to the question.  I'll just do some
>> quick comments, and leave it at that.
>>
>> 1.  Web pages make claims as to the abilities to do a job.  But the
>> software is buggy, or some features just don't work.
>>
>> 2.  Some pag

Re: why people give up on open source software

2013-10-23 Thread Ernesto Posse
You do understand that a lot of open-source software, including LyX, is
developed by *volunteers*, do you?


On Wed, Oct 23, 2013 at 12:33 PM, Ken Springer  wrote:

> On 10/22/13 10:19 PM, Richard Talley wrote:
>
>> I originally picked up on LyX because I needed to produce some technical
>> manuals quickly that looked good to management and that didn't make me
>> deal with the WYSIWYG nightmares of Word and its ilk.
>>
>> LyX really came through for me.
>>
>> Now I'm helping a friend apply to graduate school. I used the
>> KOMA-script v. 2 letter class to typeset his letter of intent. Looks good!
>>
>> Now on to the résumé. Let's see what's available. ModernCV looks good,
>> under development for seven years.
>>
>> Except it won't accept last names much longer than the author's name
>> without hyphenation. Searching produces lot's of hacks to deal with this.
>>
>> Run the example that comes with LyX. Note in example says, 'The moderncv
>> class offers lots of customization possibilities; some are explained in
>> the preamble of this document; for more information look at the
>> documentation of the LaTeX-package moderncv.'
>>
>> Yeah, right. The README for moderncv is very short and includes this:
>> 'Until a decent manual is written, you can always look in the "examples"
>> directory for some examples. Documents can be compiled into dvi, ps or
>> pdf.'
>>
>> The example LyX file points to documentation that doesn't actually
>> exist. There is no 'more information'. Nothing is explained. Seven years
>> of development and there's nothing that Aunt Tillie can use.
>>
>> I know what I'm going to hear, 'Do it yourself', 'That's how open source
>> works'. I agree. Perhaps I'll find the time to work on the
>> documentation. In the meantime, I need to produce a document NOW, not
>> work on the documentation for the tool to produce the document.
>>
>> Lesson: Please don't point to ghost documentation. If you have the time
>> to produce something that you expect people to use, you need to make the
>> time to explain how to use it.
>>
>> (Disclaimer: this doesn't apply to LyX itself, which is richly
>> documented. Just to accessories to LyX and to open source generally.)
>>
>> -- Rich
>>
>
> To all, what I'm about to write doesn't specifically to LyX, but as in
> Rich's disclaimer, it applies to the open source community in general.
>
> I totally understand Rich's frustrations, although he clearly states his
> comments about the ModernCV site do not apply to LyX.
>
>
> When I bought this Mac, it was more than I should have spent.  I got into
> the open source programs, and encouraged others to do so.
>
> I no longer encourage others to use it.  Myself, I'm slowly moving back to
> commercial software.  A fair question is, why?
>
> There's no universal answer to the question.  I'll just do some quick
> comments, and leave it at that.
>
> 1.  Web pages make claims as to the abilities to do a job.  But the
> software is buggy, or some features just don't work.
>
> 2.  Some pages ask you to become involved, and file bugs.  You do, and I
> did.  But, after a year and a half, the bugs are not even assigned to
> anyone, much less fixed.  One bug was assigned for awhile, but the
> assignment has been removed.  Both are classed as minor.  Well...  They
> aren't minor to me!!  If the developers don't/won't fix it, then:
>
> a.  Why would I use the program?
> b.  Why would I recommend the program?
>
> The program I filed the bugs with is one that wishes to take on a
> commercial program in the marketplace.  And they add new features, some of
> which are inevitable buggy.  But the attitude exhibited by not fixing
> existing bugs is very unprofessional.  If you are a business, with
> competition, you want tools that work, not tools you spend a lot of time
> finding work arounds.
>
> 3.  When the new version comes out, and the developers have broken
> something, they say it's a "regression".  Oh, BS!!  That's just political
> spin for not saying they screwed up and didn't catch it.  I would
> appreciate the pure honesty of admitting a mistake than political spin.
>
> 4.  My impression is, for most open source software I've tried over a
> period of time, the quality assurance/testing program to look for and find
> bugs is seriously flawed.  Some bugs are blatant, and I ask myself, "How
> did they miss that?"
>
>
>
> So, the open source community, as a whole, has lost a supporter.  And they
> have a long, long way to go if they want me to recommend them.
>
> That being said, I've started a small writing project, for fun for now.
>  Part of the writing will be done in a commercial program.  I will give LyX
> a try, 2.06 is installed, but haven't had time to start using it.
>
>
> --
> Ken
>
> Mac OS X 10.8.5
> Firefox 24.0
> Thunderbird 17.0.8
> LibreOffice 4.1.1.2
>
>


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Logic: Tableau Proofs

2013-10-22 Thread Ernesto Posse
Hello. The easiest (and nicest) way to do this is using the tikz package:
in the preamble put

\usepackage{tikz}

and then, wherever you want the tableau, put in a TeX box the following:

\def\land{\wedge}

\def\lor{\vee}

\def\limp{\to}

\begin{tikzpicture}

\node {$\{\neg ((p \lor (p \land q)) \limp p)\}$}

child {node {$\{p \lor (p \land q), \neg p\}$}

child {node {$\{p\}$}}

child {node {$\{p \land q\}$}

child {node {$\{p,q\}$;

\end{tikzpicture}


Note that the structure of the tree depends on the grouping braces { ... }.




On Tue, Oct 22, 2013 at 12:04 PM, William Hanson  wrote:

> Dear LyX Colleagues,
>
> I'm trying to create tableau proofs, which are branching columns of text,
> as illustrated in the attachment.  Examples can also be found in Melvin
> Fitting and Richard Mendelsohn, *First-Order Modal Logic*, Kluwer, 1998.
> Any help  will be appreciated.
>
> Bill Hanson
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Produce PDF/A in Lyx

2012-09-12 Thread Ernesto Posse
Several years ago I had to go through the same thing and it was
painful. In the end, after asking around and insisting a bit, they
accepted a normal PDF if the thesis was generated with latex (they
somehow strangely assumed that everyone used MSWord). You might want
to ask in your university about this.

However there are tools out there to do this. The script in the
following link might work

http://www.cs.mcgill.ca/~kwysoc/hacks/#ps2pdfa

...but I haven't tried it.

What will work is to use Acrobat Pro/Distiller (not the free version).
Unfortunately those are *not* free tools.

Good luck.


On Wed, Sep 12, 2012 at 2:35 PM, mendy wenger  wrote:
> Hi,
> My university requires PDF/A format for thesis submissions. I have to submit
> by tomorrow but unfortunately, it is turning out to be very difficult for me
> to produce a PDF/A file in Lyx.
> Does anyone know how to do so?
>
> I am able to convert my PDF file to PDF/A by using Adobe, but then I lose
> the hyperref features such as bookmarks and linked citations.
>
> Within Lyx, I tried using xmpincl package but get an error such as:
> ! Undefined control sequence.
>
> \xmpinclReadln ->\xmpProducer
>
> 
>
> l.55 \includexmp{pdfa-1b}
>
>
> I've also tried using the pdfx package, but then I get an error about:
> ! pdfTeX error (ext5): cannot open file for embedding.
>
> l.137 ...eam attr{/N 4} file{sRGBIEC1966-2.1.icm}
>
>
> even though I have placed that file in the folder.
>
>
> Thanks,
>
> Mendy
>
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Vectors in bold

2012-08-28 Thread Ernesto Posse
You can try writing the following in the preamble:

\renewcommand{\vec}[1]{\ensuremath{\mathbf{#1}}}


On Tue, Aug 28, 2012 at 8:19 AM, Merhebi, Bob  wrote:
> Hello there,
>
> I am writing this technical book; so far I've been using the overhead
> vectors to represent vectors, but now I changed my mind & want to
> represent vectors in bold.
>
> Is it possible to make the change for all previous representations in
> one go?
>
> And is the easiest way to do the bold thing with the Ctrl+B or is there
> an easier way?
>
> Thanks
>
> --
> Sincerely Yours,
> -Merhebi, Bob
>
> Thunderbird Signature



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Mostly successful experiment: LyX -> LaTeX -> Word using pandoc

2012-08-08 Thread Ernesto Posse
I tried it on Ubuntu and got similar results, generating .docx (viewed
on LibreOffice) and html. Pandoc seems to ignore the TOC and
bibliography though. On HTML it also ignored the title, author and
abstract fields. On LibreOffice the math was rendered more or less OK,
but some symbols were missing. The real problem though, was with
labels and references. Labels were translated directly as text (e.g.,
[sub:section-title]) and references as well, treating normal and
formatted references differently and badly in both cases.

The tool seems promising, but without proper support for labels,
references and bibliography, it still cannot be used for "heavy duty".


On Wed, Aug 8, 2012 at 2:13 AM, Jerry  wrote:
> I just tried a quick experiment with pandoc, saving a 3.5 page LyX document 
> (article class) of mostly lorem ipsum as LaTeX and then using pandoc to 
> convert that to .docx, Word's XML format. I then viewed the .docx in 
> Microsoft Word 2011 for OS X (Macintosh).
>
> More specifically, my LyX document contained a title, author, date, address 
> (city, state, country), abstract, three sections wherein the second second 
> section had two subsections. Also, there were three display equations two of 
> which were numbered and one inline equation.
>
> using the command pandoc -o /output/file /input/file with no options (pandoc 
> has lots of options) then viewing the result in Word, my first impression 
> was, Hey, it worked!
>
> The output was displayed in what must be the default theme, Office. Title and 
> author were displayed as was the abstract. Date and address were lost. 
> (Address and date were entered as such in LyX--if they had been e.g. Standard 
> they probably would have passed through.) Sections and subsections appeared 
> to be recognized (I'm not a Word expert); they were not numbered but appeared 
> in different fonts and/or colors depending on their level. Equations were 
> correctly converted **and were editable in Word 2011's built-in equation 
> editor**. (As far as I know this is _not_ Equation Edit or its big brother 
> MathType, but a new Microsoft equation editor in this version of Word--at 
> least it is integrated in the program and does not launch an external 
> editor.) However, equation numbers were lost.
>
> The loss of section and subsection numbers might be fixed with a Word setting 
> or theme choice. The loss of equation numbers might be fixed by choosing a 
> pandoc option--I have not investigated this further yet. Pandoc claims to 
> convert only a subset of LaTeX.
>
> Paragraphs were not indented but were separated by a suitable space. Again, 
> this might be a theme choice but is no doubt fixable by other means such as a 
> ruler setting. (I realize that even in LaTeX this is a "theme" setting too.)
>
> When I saved the .docx to .doc, things looked pretty much the same except 
> that equations were rendered as bitmaps and the display equations were 
> left-justified (where they had been centered in .docx.)
>
> For this simple test I was pretty happy with the results, especially .docx. 
> But again, it was a pretty simple LyX file and I haven't tried a LyX file 
> with a more sophisticated structure, graphics, TOC, or bibliography. I would 
> encourage others to try pandoc and report their results.
>
> pandoc is here: http://johnmacfarlane.net/pandoc/
>
> I had an installation issue with the OS X installer that is probably unique 
> to my computer and the author, John MacFarlane, helped me promptly once I 
> posted a ticket.
>
> Jerry



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: How to add vertical space in a table?

2011-12-08 Thread Ernesto Posse
On Thu, Dec 8, 2011 at 2:14 PM, Chi  wrote:
> Phil  yahoo.com> writes:
>
>>
>>
>> Try adding a row to the table and then removing the borders on that row.
>>      From: Chi  gmail.com>To: lyx-users  lists.lyx.org
> Sent: Thursday, December 8, 2011 12:00 PMSubject: How to add vertical space in
>>   a table?
>> Hi all,does anyone know how to add vertical space between two rows in a table
> (withoutchanging the vertical spacing for tables in general)?Thanks,C
>>
>
> I had tried that but the result is too large a gap (and I don't know how to
> adjust row height). However, I just found one solution: add an ERT with
> \vspace{}. Any nicer solutions?
>
>

Have you tried right-clicking on the table and then
"More...->Settings...->Border" and playing around with the options
under "Additional space"?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


lyx/beamer double-space text bug?

2011-11-18 Thread Ernesto Posse
I have a little problem with beamer but I'm not sure if it is a bug. I
want to have an untitled frame with some large text in it, centered
and double-spaced, but when compiling I get this error: (see minimal
lyx file attached)


! Undefined control sequence.
\doublespacing ...stretch {1.667}\ifcase \@ptsize
  \relax \setstretch {1.667}...
l.55 \lyxframeend
 {}\lyxframe{Normal slide title}
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.

! Missing number, treated as zero.

   \relax
l.55 \lyxframeend
 {}\lyxframe{Normal slide title}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)



Is it a bug? if so, is it LyX or beamer? If not, what is the problem?


Thanks.

-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


test.lyx
Description: application/lyx


Re: Chain rule tree diagram

2011-11-03 Thread Ernesto Posse
On Thu, Nov 3, 2011 at 1:37 PM, Paul Smith  wrote:
> Dear All,
>
> Is there some way of drawing in a LyX document a chain rule diagram?
> Please, see an example of what I am wanting at:
>
> http://tutorial.math.lamar.edu/Classes/CalcIII/ChainRule_files/image001.gif
>
> Thanks in advance,
>
> Paul
>

While there is no direct way of doing that in lyx, there are useful
alternatives. My favourite is the XY-pic package
(http://www.tug.org/applications/Xy-pic/), which is useful for all
kinds of diagrams.

To use it you need to install XY-pic (the 'xy' latex package), and in
LyX, in the preamble (Documents->Settings->LaTeX preamble) you should
write

\usepackage[all]{xy}

\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} %this line is
only for your specific diagram

Then in the body, you create an ERT box (Ctrl-L) and inside you can
put the following:

\[
\xymatrix{
  &   &   & z \ar@{-}[dll]_{\pd{z}{x}} \ar@{-}[drr]^{\pd{z}{y}} &   &   &   \\
  & x \ar@{-}[dl]_{\pd{x}{s}} \ar@{-}[dr]^{\pd{x}{t}} &   &   &   & y
\ar@{-}[dl]_{\pd{y}{s}} \ar@{-}[dr]^{\pd{y}{t}} &   \\
s &   & t &   & s &   & t \\
}
\]

A first look at this might seem daunting, but once you read the xy
user's guide it will seem quite straight-forward.




-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Suscripción

2011-09-22 Thread Ernesto Posse
2011/9/22 Arnold FERNÁNDEZ RIVAS :
> Hola LyX, deseo adherirme a la lita de usuarios. Espero que con este mail
> sea suficiente. Saludos.

Para adherirse a la lista, envíe un mensaje vacío a
lyx-users-subscr...@lists.lyx.org.

Por cierto, el lenguaje de la lista es el inglés.





>
> --
>
>
> Vicepresidente de la Comunidad de Software Libre de la Universidad Nacional
> del Callao - UNACINUX.
>
> http://csl.unac.edu.pe
>
> Miembro de Comité Directivo de la Escuela Profesional de Ingeniería
> Ambiental y de Recursos Naturales de la UNAC
>
>
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: submitting paper in latex (tex) format

2011-08-23 Thread Ernesto Posse
On Tue, Aug 23, 2011 at 10:28 PM, Waluyo Adi Siswanto
 wrote:
> Hi all,
>
> I am writing a paper manuscript in lyx.
> Unfortunately only latex (tex) format is accepted by the journal  publisher.
>
> I have tried to export to latex(pdflatex), then successfully created paper.tex
>
> I tested the created tex file and compile using this command: pdflatex 
> paper.tex
> It created paper.pdf. however, when I opened this generated pdf file
> all links including citations were shown as [?].
> Does it mean I cannot submit this paper.tex.
>
> Anyone has experience to submit a tex format paper, prepared in LyX?
> Any tips please?

When compiling a .tex file you typically have to run latex (or
pdflatex) a couple of times because these programs make only one pass
through the source .tex file. You also have to run bibtex to generate
the bibliography. Normally the following sequence of commands should
work (in this order, and assuming you have a proper .bib file
referenced in your .tex file):

pdflatex paper.tex
bibtex paper
pdflatex paper.tex
pdflatex paper.tex

(The last one may not be necessary, but it doesn't hurt).

After these, the citations should appear correctly.


>
> Thanks in advance for any information.
>
> regards
> waluyo
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Horizontal Scrollbar Again!!!

2011-07-27 Thread Ernesto Posse
I'll add a +1 here. Editing wide tables without an horizontal scroll
bar is a major, major pain.

Is there a place in the wiki for suggested features, a wish list?


On Tue, Jul 26, 2011 at 10:03 PM, Kortink, Mark A
 wrote:
> I know the purists think a horizontal scrollbar is somehow impure but can we
> please please get one. It is not currently possible to:-
>
> Write long equation sequences inline in a proof when you want to keep the
> proof short and not taking up multiple lines.
> Do xypic diagrams with anything sophisticated in the cells.
> Do matrices with anything sophisticated in the cells.
>
> There is nothing illegitamate about any of these requirements. The solution
> that would make the purists happy would be to at least allow a horizontal
> scrollbar in maths mode.
> Mark
> Mark Kortink Chief Architect - Information & Corporate Systems
> Information & Corporate Systems Architecture | Architecture | Architecture,
> Online & Media – Telstra Operations
> PHONE 02 8576 6804 | MOBILE 0419 574 881
> EMAIL mailto:mark.a.kort...@team.telstra.com | WEB
> http://www.telstra.com.au/
> 13/400 George St, Sydney, NSW 2000
> Covers:-
> Data Architecture.
> Reporting & Analysis including Data Warehouses.
> Corporate Systems including Finance & Administration, Human Resources,
> Purchasing, Logistics, Legal, Regulatory & Property.
> This communication may contain confidential or copyright information of
> Telstra Corporation Limited (ABN 33 051 775 556). If you are not an intended
> recipient, you must not keep, forward, copy, use, save or rely on this
> communication, and any such action is unauthorised and prohibited. If you
> have received this communication in error, please reply to this email to
> notify the sender of its incorrect delivery, and then delete both it and
> your reply.
>
>
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


bug in nested case environment?

2011-06-01 Thread Ernesto Posse
I ran into a problem with nested cases (caseenv). I want to write
something like this:

Case 1: a
  1. b
Case 1: c
Case 2: d
  2. e
Case 2: f

where there are sub-cases in the list. The enumerated list and
sub-cases are nested in the lyx document (see attached). However, the
output I get is:

Case 1: a
  1. b
Case 1: c
Case 2: d
  2. e
Case 3: f

Apparently the case counter from the outer list is the same as the one
for the inner list! Checking the generated latex, the nesting of
environments is correct. Is this a bug?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


a.lyx
Description: application/lyx


cross-reference to an enumerated item within a theorem

2011-05-30 Thread Ernesto Posse
Hi. Is there a way to do the following? Suppose I have a "Proposition"
environment and the text is something like this

Proposition 3 [pro:some-label] The following holds:
 1. [enu:item1] something
 2. [enu:item2] other

and later on I want references to show, for example as:

"... by Proposition 3(2)"

Currently I use a Formatted reference for the first part and an
un-formatted reference for the second:

"... by [Formatted ref: pro:some-label]([Ref: enu:item2])"

or in plain LaTeX (with prettyref)

"... by \prettyref{pro:some-label}(\ref{enu:item2})"

This is a bit cumbersome. Since enu:item2 is inside the Proposition
environment, would it be possible to infer the label pro:some-label
associated with that environment to create a format in prettyref so
that referring only to the individual item, so that it gives you the
full reference, i.e. something like

"... by [Formatted ref: enu-item2]"

yields

"... by Proposition 3(2)"

?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: How to type a text over arrow?

2011-05-16 Thread Ernesto Posse
The first link from Diego's search shows the LaTeX way to do it.

In LyX, open a math box (e.g. ctrl-M) and type

l \xrightarrow{g,s,r,u} l'





On Mon, May 16, 2011 at 12:46 PM, Yegor Yefremov
 wrote:
> Hi Diego,
>
> thanks. I don't how I searched for this topic, but I found nothing valuable 
> :-)
>
> Yegor
>
> On Mon, May 16, 2011 at 1:55 PM, Diego Queiroz  
> wrote:
>> Try this:
>>
>> http://lmgtfy.com/?q=text+over+arrow+latex&l=1
>>
>>
>> Take care,
>> ---
>> Diego Queiroz
>>
>>
>>
>>
>> On Mon, May 16, 2011 at 4:26 AM, Yegor Yefremov
>>  wrote:
>>> Hello,
>>>
>>> I want to type the formula like in the attached image (formula.jpg).
>>> Haw can I do this with LyX/LaTeX? As for now I'm using LyX 1.6.5.
>>>
>>> Regards,
>>> Yegor
>>>
>>
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: how to stop annoying screen jumps?

2011-02-08 Thread Ernesto Posse
I have noticed a similar problem when editing tables, specially tables
that contain formulas.

Whenever I have a table with many rows and math formulas
inside, and only part of the table is visible in the writing area, if
the cursor is outside the table, and I click inside a math formula,
the focus changes, and LyX rearranges the view so that the row where I
clicked goes to (near) the top of the writing area (sometimes to the
bottom). Actually this happens also when I click in some cell without
a math formula, but not always for some reason. I find this extremely
annoying, as I have to do this sort of editing very often so I get the
text bouncing around.

So my questions are:
1) is this a bug, or by design?
2) if by design, what is the reason for this behaviour?
3) Is there anyway to make LyX stop doing this?

(I'm using lyx 1.6.7 on Ubuntu 10.10)

Thanks.



On Tue, Feb 8, 2011 at 3:56 PM, Pavel Sanda  wrote:
> John wrote:
>> Has anyone else had this problem?
>
> yes
>
>>Is there a fix?
>
> it should be fixed in newer versions.
>
> pavel
>



-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Table editing UI and math mode

2010-12-29 Thread Ernesto Posse
Hi. I have an issue with the user interface in editing math inside
large tables. Whenever I have a table with many rows and math formulas
inside, and only part of the table is visible in the writing area, if
the cursor is outside the table, and I click inside a math formula,
the focus changes, and LyX rearranges the view so that the row where I
clicked goes to (near) the top of the writing area (sometimes to the
bottom). Actually this happens also when I click in some cell without
a math formula, but not always for some reason. I find this extremely
annoying, as I have to do this sort of editing very often so I get the
text bouncing around.

So my questions are:
1) is this a bug, or by design?
2) if by design, what is the reason for this behaviour?
3) Is there anyway to make LyX stop doing this?

Thanks

I'm using LyX 1.6.7 on Ubuntu 10.10.


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: lyx not finding a style file that latex finds !?

2009-10-23 Thread Ernesto Posse
On Fri, Oct 23, 2009 at 06:42 AM, Guenter Milde wrote:
>On 2009-10-23, rgheck wrote:
>> On 10/22/2009 08:01 PM, Ernesto Posse wrote:
>>>> On 10/15/2009 08:36 PM, Ernesto Posse wrote:
>
>>>>> I have some very strange behaviour in LyX. I have a simple latex style
>>>>> file (mystyle.sty) which is located in a directory "mylatexfiles".
>>>>> latex knows about this: I have "export TEXINPUTS=mylatexfiles:" in my
>>>>> bash login[...].
>
>...
>
>>> I've given the full path, and I still have the same issue.
>
>It should work with the full *absolute* path. LyX runs the latex
>conversion in a temporary directory, so a relative path will not work.

I used

export TEXINPUTS=~/Setup/mytexmf/tex/latex:

which is supposed to be expanded to an absolute path.


>>> How come TeX from the command line finds it but TeX invoked by LyX
>>> does not find it?
>
>Does it work if you start LyX from an x-terminal? The bash login file
>is not read at X-startup. and if you just click on a LyX icon lyx does
>not see your login environment variables.

Right, I figured out that, so I changed the TEXMFHOME variable in
/etc/texmf/texmf.d/05TeXMF.cnf file (I don't like the default ~/texmf), then
I ran sudo update-texmf and I ran sudo texhash, as well as
mktexlsr in my texmf tree which created the ls-R file. Running sudo texconfig
confirmed the new value for TEXMFHOME. I reconfigured LyX, and rebooted.
Now it works, but I don't like the fact that I had to update central
(non-user-specific)
files to do this. Is there any way I could have my own TEXMFHOME, different than
~/texmf without having to modify any system-wide files?

>Günter

Thanks



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: lyx not finding a style file that latex finds !?

2009-10-22 Thread Ernesto Posse
> On 10/15/2009 08:36 PM, Ernesto Posse wrote:
> > I have some very strange behaviour in LyX. I have a simple latex style
> > file (mystyle.sty) which is located in a directory "mylatexfiles".
> > latex knows about this: I have "export TEXINPUTS=mylatexfiles:" in my
> > bash login[...].
>
> If it's exactly like that, then I believe TeX is searching for 
> ./mylatexfiles/, which will depend upon the working directory. So, if it is
> like that, try giving the complete path to this directory.
>
> rh

I've given the full path, and I still have the same issue. How come
TeX from the command line finds it but TeX invoked by LyX does not
find it?

Thanks

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


lyx not finding a style file that latex finds !?

2009-10-15 Thread Ernesto Posse
I have some very strange behaviour in LyX. I have a simple latex style
file (mystyle.sty) which is located in a directory "mylatexfiles".
latex knows about this: I have "export TEXINPUTS=mylatexfiles:" in my
bash login and I've done "sudo texhash". When I run a simple test with
pure latex (\usepackage{mystyle}) it compiles it correctly. However
when I try to compile it from LyX it says "an empty outpus file was
generated"' and then "Latex Error: File `mystyle.sty' not found." This
has happened even after I reconfigured LyX.

How is it that latex has no problem finding my style file but LyX does?

PS: I'm running LyX 1.6.2 on Ubuntu 9.04 with texlive


-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


custom layout -- possible bug?

2009-03-23 Thread Ernesto Posse
Hello. I'm having a bit of an issue with a custom layout I'm trying to
create for ACM SIG proceedings (from the sig-alternate.cls available
at http://www.acm.org/sigs/publications/proceedings-templates)

First I'm creating a layoutfile named "sig-alternate.layout" and
placed it under my layouts directory. The file contains the following:

--- begin of sig-alternate.layout ---
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[sig-alternate]{sig-alternate}

Format 11
Input stdclass.inc
--- end of sig-alternate.layout ---

And I create a sample file (test.lyx) with this layout. Then I
generate plain latex from it and this is what I obtain:

--- begin of test.tex ---
%% LyX 1.6.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\usepackage{babel}

\begin{document}

\title{Blah blah}


\author{Me}

\maketitle

Something...
\end{document}
--- end of test.tex ---


The problem is that the first line has the wrong class (article)! Am I
doing something wrong? Why doesn't the generated latex begin with this
\documentclass{sig-alternate}?


Thanks.

PS: I'm running lyx 1.6.1 on ubuntu.

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Formatted ref for Propositions broken?

2009-03-11 Thread Ernesto Posse
It looks like the formatted reference for Propositions is not working
properly. While other math environments like "Theorem" and "Lemma"
correctly put the word "Theorem" (resp. Lemma, etc.) in the reference,
in the case of propositions, only the number appears. Is this normal?
How can it be fixed? Can I specify the format of references somewhere?

Thanks.

PS: I'm using LyX 1.6.1 on ubuntu, and I am using the Theorem modules
in the document settings.



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: How to insert colored program listing in LYX

2008-11-04 Thread Ernesto Posse
And if your language is not on the list, and you know a little Python,
I recommend Pygments (http://pygments.org) a very nice syntax
colouring package that generates, among other things, LaTeX which you
then can include as a file in your LyX document.



On Tue, Nov 4, 2008 at 7:54 AM, Siegfried MEUNIER-GUTTIN-CLUZEL
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> You can use the listings package ( Insert > Listings ).
> If you right-clic on the listing insert box, you can choose the language you
> use and the syntax will be highlighted.
> In the listings manual there are many options, so I suppose you can change
> the colors if you really want.
>
> Hope it helps.
>
> Siegfried.
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Can you suggest a good way to draw pictures with latex code?

2008-10-15 Thread Ernesto Posse
Another possibility is to use Dia. In Dia, you can write latex
formulas in text boxes, and then you export them as Metapost macros
(mp). You then use metapost (mpost) to generate eps files (metapost
saves them with extensions .1, .2, etc, but then you simply rename
them to .eps and import them in Lyx).



On Wed, Oct 15, 2008 at 12:55 PM, Guy Rutenberg <[EMAIL PROTECTED]> wrote:
> Julio Rojas <[EMAIL PROTECTED]> writes:
>
>>
>> Inkscape. Not direct latex code, but very very good.
>> -
>> Julio Rojas
>> [EMAIL PROTECTED]
>>
>
> @Erez: Inkscape <http://www.inkscape.org> is a vector drawing program. It can
> generate .eps figures you can easily embed in you document (and they are
> resolution independent).
>
> Another great feature of Inkscape that makes it great tool for mathematical
> figures is it's ability (via plugins) to embed LaTeX formulas in the figures
> (great for labels).
>
>
>
> Regards,
>
> Guy
>
> 
> http://www.guyrutenberg.com
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Metapost conversion

2008-09-22 Thread Ernesto Posse
You have to run this from s console window (Command Prompt on Windows.)

Go to the start menu and look for "Command Prompt" (usually in
Accessories.) You will see a command prompt like this

C:\Documents\username>

or something similar

This is where you can type commands. The "C:\Documents\..." is the
name of the folder where you are currently. You have to navigate to
the directory where you saved your metapost file. This is done with
the command "cd" (for change directory.) type something like this in
the prompt:

cd C:\

Directory (aka folder) names are separated with backslash \

so for example it is

cd C:\Documents\username\MyFiles\MyPaper

If the folder has spaces in the full name, it must be enclosed in quotes.

cd "C:\Documents\username\My Files\My Paper"

After executing cd, the prompt will show the directory where you moved to.

Once in your target folder, you run metapost on the file. For example, type

mpost figure.mp

this generates a file "figure.0" or "figure.1" in that same folder.

To use it in LyX, you can simply rename it to "figure.mps", and add it
to your lyx document with "insert graphics." Use the pdflatex option
to generate the PDF file (rather than the dvipds of ps2pdf options.)
The figure will show an error message in the LyX editing window, but
it should appear OK in the generated PDF.



On Mon, Sep 22, 2008 at 12:09 PM, econkramer <[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
> I did not understand how to use metapost. I have created a .fig file in
> Winfig and I have exported as .mmp (to get a dynamic graphic). Now, to
> import it in Lyx I have got that I have to convert this .mmp in .0 .1 .2 and
> so on files. But, I do not know how to do. I have read there should be
> someway to run mpost figure.mmp and to get the figure.0
> figure.1...files...but I don't know how to do it. Where should I run it? How
> should I run it?
>
> Can someone help me?
>
> many thanks
> --
> View this message in context: 
> http://n2.nabble.com/Metapost-conversion-tp1109998p1109998.html
> Sent from the LyX - Users mailing list archive at Nabble.com.
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Generating PDF/A from LyX/LaTeX

2008-09-12 Thread Ernesto Posse
Thanks, but it didn't work either.

I tried \usepackaga{hyperref}, then latex + dvips + distiller, and
then Acrobat preflight gives me these errors:

Author mismatch between Document Info and XMP Metadata
Keyword mismatch between Document Info and XMP Metadata
Subject mismatch between Document Info and XMP Metadata
Title mismatch between Document Info and XMP Metadata
Width information for glyphs is inconsistent (1 match on 1 page)

If I try via pdflatex I get the XMP error I mentioned earlier...



On Fri, Sep 12, 2008 at 10:02 AM, Daniel Lohmann
<[EMAIL PROTECTED]> wrote:
>
> 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
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Generating PDF/A from LyX/LaTeX

2008-09-12 Thread Ernesto Posse
On Fri, Sep 12, 2008 at 7:30 AM, William Adams <[EMAIL PROTECTED]> wrote:
> On Sep 11, 2008, at 9:55 AM, Ernesto Posse wrote:
>
>> No, it still doesn't work (either through pdflatex or dvips + ps2pdf
>> or dvips + distiller).
>
> Did you use the PDF/A-1b:2005 (CMYK) setting in Acrobat Distiller? I tried
> this w/ a .ps from dvips and it opened in PDF/A mode.

Yes, that was the setting. When I open the file, Acrobat indeed tells
me it is in PDF/A mode, but when I run preflight to check it it gves
me the error.


>> If I follow your instructions literally, using pdflatex, opening in
>> Acrobat and saving as PDF/A, Acrobat complains and tells me to use
>> preflight first.
>
> It shouldn't. You should save as PDF/A-1b, quit, then re-open the document.
> This should open it in PDF/A mode.

That's exactly what I tried.

>> I do so, but this time (from the pdflatex generated
>> file) I get a different error: "XMP property neither predefine nor
>> defined in extension schema".
>
> Strange. Can't find that error anywhere (even after adding the ``d'' after
> predefine).

The missing d was a typo, but I do get that error in preflight. If I
use latex + dvips + (distiller or ps2pdf) instead of pdflatex an error
saying that the width information of a glyph is inconsistent.

>> Could it be a problem with this version of Acrobat, maybe? (I'm using
>> Acrobat 9 Pro on Vista + MiKTeK 2.6)
>
> Well, your minimal example works w/ Adobe Acrobat 8 Professional on Mac OS X
> Leopard using MacTeX.
>
> I seem to recall your having mentioned files created by Adobe Acrobat not
> working either --- perhaps the problem is in your Acrobat installation?

I meant the PDF/A created by Acrobat from the PS file.

> Have you tried d/l'ing a PDF/A document from somewhere and testing it?

I do not have any other PDF/A files. I've tried running preflight in a
bunch of other pdf files from different origin, but the only one which
succeeded was a scanned document. The rest where mostly papers written
in either LaTeX or Word.


> I'm attaching files which I made w/ dvips/Acrobat and pdflatex --- if they
> don't read as PDF/A on your Acrobat, it's broken.

The files do open in PDF/A mode, but when I run preflight on them I get this:

Preflight errors from Untitled-ps.pdf

Syntax problem: Stream dictionary improperly formatted
Width information for glyphs is inconsistent (1 match on 1 page)


Untitled-pdflatex.pdf

Device process color used but no PDF/A OutputIntent (1 match on 1 page)
XMP property not predefined and no extension schema present


It is possible that Acrobat 9 is broken. When developing software, new
versions sometimes introduce bugs that were not there before...


>> 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...
>
>
> The hyperref package now has an option which will tag text so that one could
> use a PDF/A standard other than PDF/A-1b (which is for untagged text).

Right, but if it's unable to generate PDF/A-1b it's quite unlikely
that it would be able to generate a PDF/A-1a...

> William
>
> --
> William Adams
> senior graphic designer
> Fry Communications
>
>
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Generating PDF/A from LyX/LaTeX

2008-09-11 Thread Ernesto Posse
No, it still doesn't work (either through pdflatex or dvips + ps2pdf
or dvips + distiller).

If I follow your instructions literally, using pdflatex, opening in
Acrobat and saving as PDF/A, Acrobat complains and tells me to use
preflight first. I do so, but this time (from the pdflatex generated
file) I get a different error: "XMP property neither predefine nor
defined in extension schema".

Could it be a problem with this version of Acrobat, maybe? (I'm using
Acrobat 9 Pro on Vista + MiKTeK 2.6)

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...


On Wed, Sep 10, 2008 at 7:23 AM, William Adams <[EMAIL PROTECTED]> wrote:
> On Sep 10, 2008, at 2:48 AM, G. Milde wrote:
>
>> Maybe it's a font issue (the validator not knowing the CM latex fonts)?
>
> Nope. I used Ernesto's example file w/ pdflatex and it worked as I
> described.
>
> The problem would seem to be w/ the .pdf generated by Ghostscript since he's
> using dvips.
>
> So prefix it w/ the following step:
>
>  - take the source .ps file from dvips and distill it in Adobe Acrobat
> Distiller (instead of Ghostscript --- there should be an option to save a
> copy of the .ps) using the appropriate .joboptions file which matches your
> colour model (e.g., PDF/A-1b:2005 (CMYK)
>
> Or switch to using pdflatex.
>
> William
>
> --
> William Adams
> senior graphic designer
> Fry Communications
>
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Generating PDF/A from LyX/LaTeX

2008-09-09 Thread Ernesto Posse
On Tue, Sep 9, 2008 at 5:56 PM, Steve Litt <[EMAIL PROTECTED]> wrote:
> What a nightmare!

Indeed.

> What does the university say about validators -- any validator, all
> validators, Adobe's validator?

They use Acrobat's. It seems that Adobe's Distiller has its own
validator which is different than Acrobat's, since Distiller says the
generated file is compliant, but Acrobat says it is not.


> The PDF/A Wikipedia page makes it look pretty straightforward -- all fonts
> embedded, all fonts legal everywhere, no video, audio or javascript, device
> independent color.

As far as I know, the generated PDF includes all fonts, and since it's
that minimal latex file I mentioned, it does not have anything fancy,
no audio, no video, no javascript, not event hyperrefs.


> Makes sense when thought about from a portability as opposed to a long term
> archival viewpoint. And it seems straightforward, except for proving it :-)
>
> SteveT
>
> On Tuesday 09 September 2008 02:00:54 pm Ernesto Posse wrote:
>> Hi. I do not have a particular preference for PDF/A, but unfortunately
>> my university requires electronic thesis submissions to be in PDF/A.
>> After seeing that even a minimalistic latex document seems to be
>> impossible to convert to  PDF/A, and realizing that there is no
>> consistency among PDF/A "validators", I'm not becoming a fan of the
>> format. Nevertheless, I need to convert my thesis to this format...
>>
>> On Tue, Sep 9, 2008 at 1:29 PM, Steve Litt <[EMAIL PROTECTED]>
> wrote:
>> > On Tuesday 09 September 2008 12:54:38 pm Ernesto Posse wrote:
>> >> This question is not a LyX-only question, but I thought maybe someone
>> >> here could have an idea on this issue.
>> >>
>> >> Has anyone succeeded in producing a PDF/A file (PDF for archival) from
>> >> LyX/LaTeX? I've tried tools that claim to generate PDF/A from
>> >> PostScript files or PDF files (both for Windows and Linux) but I
>> >> haven't been successful in generating a file which is considered PDF/A
>> >> compliant by at least two different validators, even with the
>> >> following minimal file (in LaTeX) via dvips:
>> >>
>> >> === file a.tex ===
>> >> \documentclass{article}
>> >> \begin{document}
>> >> Just this line...
>> >> \end{document}
>> >> === end of file ===
>> >>
>> >> I've tried generating through dvips:
>> >>
>> >> dvips -o a.ps a.dvi
>> >>
>> >> or
>> >>
>> >> dvips -Ppdf -o a.ps a.dvi
>> >>
>> >> then through ghostscript/ps2pdf as described in
>> >> http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm (I tried it on both
>> >> Windows Vista and Ubuntu)
>> >>
>> >> I also tried generating with dvipdf and pdflatex, and then using a PDF
>> >> to PDF/A converter.
>> >>
>> >> I've tried Acrobat 9 Pro (Distiller on Windows Vista), as well as
>> >> PDF2PDF from pdf-tools.com (On Windows Vista, XP and Ubuntu), PDF
>> >> Quick Master (On Windows XP), and PDF Appraiser (On Windows Vista and
>> >> XP)
>> >>
>> >> Acrobat Distiller produces a PDF file and claims it is PDF/A
>> >> compliant, but when I run the compliance test within Acrobat, it
>> >> fails! (An Acrobat generated PDF/A file fails the Acrobat PDF/A test!)
>> >>
>> >> Any ideas on how to generate PDF/A from LaTeX would be welcome...
>> >>
>> >> Thanks
>> >
>> > Hi Ernesto,
>> >
>> > This isn't responsive to your question, but maybe, just maybe, it's
>> > responsive to your situation.
>> >
>> > I see nothing but heartache in PDF/A. PDF/A test notwithstanding, I
>> > contend you don't REALLY know it it will render accurately (or at all)
>> > years from now. Things happen.
>> >
>> > Of all the ways to define data, PDF is one of the most complex. I've
>> > modified PDFs with pdftk, and (ugh) with Vim. It's ugly, unless you know
>> > the whole standard by heart. It's not human readable.
>> >
>> > More to the point, over years and decades, "standards" come and go. Those
>> > QIC tapes I so joyously used in 1994 are unreadable today unless I go out
>> > and buy a QIC tape drive and somehow get the matching software. Do you
>> > really think the ISO9660 standard so ubiquitous today will exist in 2050?
>

Re: Generating PDF/A from LyX/LaTeX

2008-09-09 Thread Ernesto Posse
On Tue, Sep 9, 2008 at 4:02 PM, William Adams <[EMAIL PROTECTED]> wrote:
> On Sep 9, 2008, at 12:54 PM, Ernesto Posse wrote:
>
>> Has anyone succeeded in producing a PDF/A file (PDF for archival) from
>> LyX/LaTeX? I've tried tools that claim to generate PDF/A from
>> PostScript files or PDF files (both for Windows and Linux) but I
>> haven't been successful in generating a file which is considered PDF/A
>> compliant by at least two different validators, even with the
>> following minimal file (in LaTeX) via dvips:
>
>
> Since pdflatex can't insert .pdf tags (or is there a package for this?), you
> need to certify against pdf/A-1b:
>
>  - Open the file in Adobe Acrobat
>  - Save File As and choose as Format: PDF/A
>  - choose pdf/a-1b in the pop-up
>  - quit Acrobat
>  - re-open the file
>  - preflight (successfully) as PDF/A-1b


It doesn't work for me. I have tried PDF/A-1b:2005(CMYK) and
PDF/A-1b:2005(RGB), and preflight still complains. In particular it
gives me an error "Width information for glyphs is inconsistent (1
match on 1 page)"

I tried the conversion directly through Distiller and within Acrobat itself...

> William
>
> --
> William Adams
> senior graphic designer
> Fry Communications
>
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: Generating PDF/A from LyX/LaTeX

2008-09-09 Thread Ernesto Posse
Hi. I do not have a particular preference for PDF/A, but unfortunately
my university requires electronic thesis submissions to be in PDF/A.
After seeing that even a minimalistic latex document seems to be
impossible to convert to  PDF/A, and realizing that there is no
consistency among PDF/A "validators", I'm not becoming a fan of the
format. Nevertheless, I need to convert my thesis to this format...

On Tue, Sep 9, 2008 at 1:29 PM, Steve Litt <[EMAIL PROTECTED]> wrote:
> On Tuesday 09 September 2008 12:54:38 pm Ernesto Posse wrote:
>> This question is not a LyX-only question, but I thought maybe someone
>> here could have an idea on this issue.
>>
>> Has anyone succeeded in producing a PDF/A file (PDF for archival) from
>> LyX/LaTeX? I've tried tools that claim to generate PDF/A from
>> PostScript files or PDF files (both for Windows and Linux) but I
>> haven't been successful in generating a file which is considered PDF/A
>> compliant by at least two different validators, even with the
>> following minimal file (in LaTeX) via dvips:
>>
>> === file a.tex ===
>> \documentclass{article}
>> \begin{document}
>> Just this line...
>> \end{document}
>> === end of file ===
>>
>> I've tried generating through dvips:
>>
>> dvips -o a.ps a.dvi
>>
>> or
>>
>> dvips -Ppdf -o a.ps a.dvi
>>
>> then through ghostscript/ps2pdf as described in
>> http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm (I tried it on both
>> Windows Vista and Ubuntu)
>>
>> I also tried generating with dvipdf and pdflatex, and then using a PDF
>> to PDF/A converter.
>>
>> I've tried Acrobat 9 Pro (Distiller on Windows Vista), as well as
>> PDF2PDF from pdf-tools.com (On Windows Vista, XP and Ubuntu), PDF
>> Quick Master (On Windows XP), and PDF Appraiser (On Windows Vista and
>> XP)
>>
>> Acrobat Distiller produces a PDF file and claims it is PDF/A
>> compliant, but when I run the compliance test within Acrobat, it
>> fails! (An Acrobat generated PDF/A file fails the Acrobat PDF/A test!)
>>
>> Any ideas on how to generate PDF/A from LaTeX would be welcome...
>>
>> Thanks
>
> Hi Ernesto,
>
> This isn't responsive to your question, but maybe, just maybe, it's responsive
> to your situation.
>
> I see nothing but heartache in PDF/A. PDF/A test notwithstanding, I contend
> you don't REALLY know it it will render accurately (or at all) years from
> now. Things happen.
>
> Of all the ways to define data, PDF is one of the most complex. I've modified
> PDFs with pdftk, and (ugh) with Vim. It's ugly, unless you know the whole
> standard by heart. It's not human readable.
>
> More to the point, over years and decades, "standards" come and go. Those QIC
> tapes I so joyously used in 1994 are unreadable today unless I go out and buy
> a QIC tape drive and somehow get the matching software. Do you really think
> the ISO9660 standard so ubiquitous today will exist in 2050? Me neither. My
> prediction -- .tgz and .zip will be the stuff of old-timer reminiscences by
> then, the way Kaypro computers are today. And PDF, I doubt it will exist.
>
> If something's really important to have throughout the ages, print it to nice,
> acid free paper, and store it appropriately. That will last at least 200
> years.
>
> I called the US trademark office and asked whether I could submit my Ebooks'
> copyright specimens on paper in addition to electronically on CD. They said
> yes, they prefer it that way, because paper stands the test of time, and
> digital representations don't necessarily.
>
> I have handwritten journal pages from the mid 1970's, written in ballpoint pen
> on cheap notebook paper, that are perfectly readable over 30 years later. I
> dare you to read a magtape from 1975.
>
> If you have a lot of docs that must be archived, and space is a concern,
> perhaps microfiche is the way to go. I'd guess that will last at least 30
> years, always assuming they keep making microfiche readers.
>
> If you MUST go digital, I recommend plain text. In 1987, when I first started
> making invoices for customers, I made a very savvy choice. All my invoices,
> from 1987 through the present, have been plain text. Formatting was done by
> inserting space characters. No tabs, which of course can be redefined by the
> rendering software. If you absolutely must go digital with data meant to
> survive a century, plain text is the way to do it. As long as ASCII exists
> (or a codepage that maps to old ASCII), and as long as I keep copying those
> invoices to media that can be read by newly current technologies, my invoices
> will be readable.
>
> Personally, when I hear the words "PDF" and "archive" in the same sentence, I
> become very skeptical.
>
> SteveT
>
> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Generating PDF/A from LyX/LaTeX

2008-09-09 Thread Ernesto Posse
This question is not a LyX-only question, but I thought maybe someone
here could have an idea on this issue.

Has anyone succeeded in producing a PDF/A file (PDF for archival) from
LyX/LaTeX? I've tried tools that claim to generate PDF/A from
PostScript files or PDF files (both for Windows and Linux) but I
haven't been successful in generating a file which is considered PDF/A
compliant by at least two different validators, even with the
following minimal file (in LaTeX) via dvips:

=== file a.tex ===
\documentclass{article}
\begin{document}
Just this line...
\end{document}
=== end of file ===

I've tried generating through dvips:

dvips -o a.ps a.dvi

or

dvips -Ppdf -o a.ps a.dvi

then through ghostscript/ps2pdf as described in
http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm (I tried it on both
Windows Vista and Ubuntu)

I also tried generating with dvipdf and pdflatex, and then using a PDF
to PDF/A converter.

I've tried Acrobat 9 Pro (Distiller on Windows Vista), as well as
PDF2PDF from pdf-tools.com (On Windows Vista, XP and Ubuntu), PDF
Quick Master (On Windows XP), and PDF Appraiser (On Windows Vista and
XP)

Acrobat Distiller produces a PDF file and claims it is PDF/A
compliant, but when I run the compliance test within Acrobat, it
fails! (An Acrobat generated PDF/A file fails the Acrobat PDF/A test!)

Any ideas on how to generate PDF/A from LaTeX would be welcome...

Thanks

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: eps to pdf converter/eps preview

2008-09-08 Thread Ernesto Posse
On Sat, Sep 6, 2008 at 7:52 PM, Paul A. Rubin <[EMAIL PROTECTED]> wrote:
>
> ImageMagick calls Ghostscript to do part of the conversion, so it's no
> surprise you're getting the same error message both times.  The "no such
> file" message from convert may just mean that it didn't find an intermediate
> file it was expecting from Ghostscript (the reference to 'ex1v2.eps' is
> probably just a reminder which source file was being processed when the
> universe imploded).
>
> I can't read Ghostscript dumps, but it would not surprise me if '/undefined
> in cmmi10' means that the EPS file contains a character that does not exist
> in the cmmi10 font.  Are there any "funny" characters used in the plot?
>  Would you care to post ex1v2.eps to the list, where we can take a look at
> it?

No. I just embedded latex formulas like $n_1$ in the picture, exported
to metepost macros, and metapost produced the eps. By the way, I
learned that pdflatex can indeed process correctly such figures as
long as the file extension is changed to .mps, but LyX still gives me
the "Error converting to loadable format" message.

If it is indeed a matter of missing the fonts in the EPS file, how
could I embedd such information in the file?

Thanks

> /Paul
>
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


eps to pdf converter/eps preview

2008-09-02 Thread Ernesto Posse
Hi. I have an issue with previewing EPS files. I've seen in the list's
archives similar problems, but I think I'm missing something. I have
an EPS diagram generated by Metapost from a Dia diagram. When I
include the generated EPS image, the document is generated correctly
by latex + dvipdf or latex + dvips + ps2pdf (but not by pdflatex.) Yet
I get the typical "Unable to convert to loadable format" in the LyX
preview. What is strange is that I do have the converter from
Imagemagick and epstopdf installed. When I run these I get an error
from ghostscript (below.) Both seem to complain about cmmi10, but I
don't know what this is: a missing font? If so, why doesn't latex
complain about it? What can I do about it?

By the way, imagemagick's converter gives me this error: "convert:
Postscript delegate failed `ex1v2.eps': No such file or directory."
but the file is there...

Thanks

PS: I'm running LyX 1.5.3 on ubuntu.

==
Typical error produced by epstopdf

[EMAIL PROTECTED]:umlrt2klt] > epstopdf --outfile=a.pdf ex1v2.eps
Error: /undefined in cmmi10
Operand stack:
   (n)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   --nostringval--   false   1   %stopped_push   1905
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3
%oparray_pop   1771   1   3   %oparray_pop   --nostringval--
%errorexec_pop   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1151/1684(ro)(G)--   --dict:0/20(G)--   --dict:92/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.61: Unrecoverable error, exit code 1

==
Typical error produced by imagemagick's convert

[EMAIL PROTECTED]:umlrt2klt] > convert ex1v2.eps a.pdf
Error: /undefined in cmmi10
Operand stack:
   (n)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   --nostringval--   false   1   %stopped_push   1905
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3
%oparray_pop   1771   1   3   %oparray_pop   --nostringval--
%errorexec_pop   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1156/1684(ro)(G)--   --dict:0/20(G)--   --dict:93/200(L)--
Current allocation mode is local
Current file position is 9838
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
Error: /undefined in cmmi10
Operand stack:
   (n)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   --nostringval--   false   1   %stopped_push   1905
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3
%oparray_pop   1771   1   3   %oparray_pop   --nostringval--
%errorexec_pop   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1156/1684(ro)(G)--   --dict:0/20(G)--   --dict:93/200(L)--
Current allocation mode is local
Current file position is 9838
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
convert: Postscript delegate failed `ex1v2.eps': No such file or directory.
convert: missing an image filename `a.pdf'.

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada
url: http://none.yet

(and)

Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Thesis -- parent and child chapters

2008-05-25 Thread Ernesto Posse
You don't need to customize LyX for this. Simply write each chapter in
a separate LyX file (which you can compile and view separately without
the need to comment out anything,) and create a master  thesis file
where you include each chapter with Insert -> File -> Child Document
(selecting "Include" as the Include type.) Make sure that all your
chapters have the same document class as the main file. Put the TOC
and bibliography in the main file as well and you'll be able to cite
it from all chapters.


On Sun, May 25, 2008 at 10:27 PM, Ed Sykes <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've read through Customization, perhaps someone could point me in the right
> direction.
> I'm writing a thesis
> Is there a way to designate a parent LyX file that #includes chapters...
> so that I can speed up the LaTeX compilation process by commenting out
> chapters other than the one I am editing?
>
> thanks in advance.
>
> cheers,
> Ed Sykes
>



-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada
url: http://none.yet

(and)

Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


romanizing references

2008-04-23 Thread Ernesto Posse
Hi. Is there a way to make references into roman numerals? I have an
numerated list where the counter has been changed to roman numerals,
and I have given labels to some items, but when I refer to them, they
show up in the arabic form.

In latex, I have something like

\begin{enumerate}
\renewcommand{\labelenumi}{(\roman{enumi})}
\item One
\item \label{enum:b} Two
\item Three
\end{enumerate}

but if I try

(\roman{\ref{enum:b}})

I get an error

! Missing \endcsname inserted.

   \protect
l.19 ...  (\roman{\ref{enum:b}}
  )...

Is there a way to get the reference as a roman numeral?

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada
url: http://none.yet

(and)

Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Proving a theorem in an appendix

2008-01-27 Thread Ernesto Posse
My solution to this problem is creating a lyx layout file which
extends the Theorem environments with "Appendix theorems". This layout
can be created for example by modifying one of the AMS layouts, adding
styles like this:


Style ApxTheorem
CopyStyle Theorem
DependsOn Theorem
LatexName apx-thm
Preamble
\newenvironment{apx-thm}[1]
{\noindent \rm \textbf{Theorem #1.} \it}
{}
EndPreamble
End


To use it, add a label to your original theorem, and then, in your
appendix, whenever you create an "ApxTheorem", you put a reference to
that label immediately after the "Theorem" label, enclosed in { } (in
ERT).

I hope it helps.


On Jan 27, 2008 2:42 PM, Nadiv Avidan <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm using Lyx with AMS and I want to state a theorem in one of my main
> sections, but prove it in one of the appendices.
> That is, I want to have "Theroem 5: something something" in the paper
> itself, and "Theorem 5: something something. Proof: something other" in the
> appendix, and the thing is, I can't get both theorems declarations to have
> the same number.
> Any ideas?
>
>
> Hope you can help me with this, I looked and googled and found nothing
> (probably used the wrong key words),
> Thanks,
> nadiv.
>



-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Dumb LyX question (fwd)

2007-12-21 Thread Ernesto Posse
Does Acrobat Reader support refresh? That's news to me. I have the
latest version, on Vista with LyX 1.5.2, and I've never been able to
make Acrobat refresh. How can you get it to refresh?

On Dec 21, 2007 10:25 AM,  <[EMAIL PROTECTED]> wrote:
> On Fri, 21 Dec 2007, Manveru wrote:
>
> > IMVHO your viewer does not support refreshing. This is the reason why I
> > currently use Acrobat Reader than Foxit - the second one does not
> > refresh.
>
> Probably true, I forwarded your answer, thanks! [*]
>
> Happy holidays!
> /Christian
>
> --
> Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr



-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: letter layout

2007-11-16 Thread Ernesto Posse
Yes, I'm using the one shipped with LyX.

I was using the signature but after opening. Nevertheless, after
moving the signature to the top I also get the same undefined control
sequence error. But apparently the SendTo address is also mandatory
and should go before the opening as well. That seems to fix the
problem.

It would be nice if the documentation described these dependencies. I
did't find anything about it.


On Nov 16, 2007 3:51 PM, Liviu Andronic <[EMAIL PROTECTED]> wrote:
> On 11/16/07, Ernesto Posse <[EMAIL PROTECTED]> wrote:
> > I'm trying to use the standard letter layout but when I compile I get
> > a message saying that "\opening" is an undefined control sequence,
>
> This may be irrelevant, but are you using the letter template shipped
> with LyX? One thing I know is that "Signature" is a mandatory field,
> and that it need be before "opening", or smth similar. Try with the
> template to be sure you do not mess up with these limitations.
>
>
> Regards,
> Liviu
>



-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


letter layout

2007-11-16 Thread Ernesto Posse
I'm trying to use the standard letter layout but when I compile I get
a message saying that "\opening" is an undefined control sequence,
yet, letter.cls is installed and latex and lyx are both able to find
it. Is this a bug?

PS: I'm running LyX 1.5.2 on Vista, with MiKTeX 2.6.


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Roman enumerated list layout style

2007-11-09 Thread Ernesto Posse
Thanks, but "LabelType Static" didn't work either. Nevertheless,
"LabelType Counter" works, but now, it looks like the counter is not
reset for each list. I have now

LabelType Counter
LabelCounter enumi
LabelString "(\roman{enumi})"

I also tried with my own counter and get the same result:

abc
(i) abc
(ii) abc
abc
(iii) abc
(iv) abc
abc

instead of the intended

abc
(i) abc
(ii) abc
abc
(i) abc
(ii) abc
abc

However the problem is only within the LyX interface. The generated
document is OK.

How could I make the counter reset with each new list?

Thanks.


On Nov 7, 2007 7:09 PM, Richard Heck <[EMAIL PROTECTED]> wrote:
> Ernesto Posse wrote:
> > Hi. I have written a new layout style for writing enumerated lists
> > using roman numerals. However I have a problem. While the generated
> > document, correctly renders the roman numerals, they do not appear in
> > the LyX interface. The layout code is below. I thought the problem
> > would be with the LabelString field, but I have tried different
> > alternatives such as "MM", "00", etc, and nothing seems to work.
> >
> I think the problem is with the LabelType field. I think it should be
> Static.
>
> rh
>
> > Does anyone have an idea of what could be the problem? Or whether
> > there is some other layout for producing roman enumerated lists?
> >
> > Thanks.
> >
> > PS: I'm using LyX 1.5.2 on Vista.
> >
> >
> > Style RomanEnumerate
> >   Margin  Static
> >   LatexType   Item_Environment
> >   LatexName   romanumerate
> >   NextNoIndent1
> >   LeftMargin  MMN
> >   LabelSepxx
> >   ParSkip 0.0
> >   ItemSep 0.2
> >   TopSep  0.7
> >   BottomSep   0.7
> >   ParSep  0.3
> >   Align   Block
> >   AlignPossible   Block, Left
> >   LabelType   Counter_EnumI
> >   LabelCounterenumi
> >   LabelString "(\roman{enumi})"
> >   LabelFont
> > Shape Italic
> > Size  Normal
> > Shape Up
> >   EndFont
> >   Preamble
> >
> > \newcommand{\romnum}{\renewcommand{\labelenumi}{(\roman{enumi})}}
> >   \newenvironment{romanumerate}
> > {\begin{enumerate}
> >\romnum}
> > {\end{enumerate}}
> >   EndPreamble
> > End
> >
> >
> >
> >
>
>
> --
> ==========
> Richard G Heck, Jr
> Professor of Philosophy
> Brown University
> http://frege.brown.edu/heck/
> ==
> Get my public key from http://sks.keyserver.penguin.de
> Hash: 0x1DE91F1E66FFBDEC
> Learn how to sign your email using Thunderbird and GnuPG at:
> http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
>
>



-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Roman enumerated list layout style

2007-11-07 Thread Ernesto Posse
Hi. I have written a new layout style for writing enumerated lists
using roman numerals. However I have a problem. While the generated
document, correctly renders the roman numerals, they do not appear in
the LyX interface. The layout code is below. I thought the problem
would be with the LabelString field, but I have tried different
alternatives such as "MM", "00", etc, and nothing seems to work.

Does anyone have an idea of what could be the problem? Or whether
there is some other layout for producing roman enumerated lists?

Thanks.

PS: I'm using LyX 1.5.2 on Vista.


Style RomanEnumerate
Margin  Static
LatexType   Item_Environment
LatexName   romanumerate
NextNoIndent1
LeftMargin  MMN
LabelSepxx
ParSkip 0.0
ItemSep 0.2
TopSep  0.7
BottomSep   0.7
ParSep  0.3
Align   Block
AlignPossible   Block, Left
LabelType   Counter_EnumI
LabelCounterenumi
LabelString "(\roman{enumi})"
LabelFont
  Shape Italic
  Size  Normal
  Shape Up
EndFont
Preamble

\newcommand{\romnum}{\renewcommand{\labelenumi}{(\roman{enumi})}}
\newenvironment{romanumerate}
  {\begin{enumerate}
 \romnum}
  {\end{enumerate}}
    EndPreamble
End



-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Negation: LyX or LaTeX?

2007-11-01 Thread Ernesto Posse
That seems to work. Thanks.

On 11/1/07, Enrico Forestieri <[EMAIL PROTECTED]> wrote:
> Ernesto Posse writes:
>
> > Hello. I have an issue with the use of \not in math mode, but I am not
> > sure if the poblem is with LyX or LaTeX itself.
> >
> > When I try to write "aRb" with the R negated, the diagonal which is
> > supposed to go over the R does not appear in the right place. I've
> > tried each of the following, both in ERT and using LyX's math
> > interface:
> >
> > $a\not Rb$  result: big space between a and R, / just a little over R.
> > $a\not R b$ result: same
> > $a\not{R}b$ result: same
> > $a{\not R}b$result: smaller space between a and R, but / still not
> > completely over R.
> > $a{\not{R}}b$   result: same
> >
> > It seems that the only way to make it look right is with negative
> > spaces, but that seems like an ugly hack. Is there any way to negate
> > the "right" way?
>
> Note that \not is supposed to negate math relations, so I think
> that you can get what you want by using
>
> $a\not\mathrel Rb$
>
> Also note that you will get automatic spacing around your new math
> relation. If you don't like that, then use
>
> $a{\not\mathrel R}b$
>
> HTH
>
> --
> Enrico
>
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Negation: LyX or LaTeX?

2007-11-01 Thread Ernesto Posse
Hello. I have an issue with the use of \not in math mode, but I am not
sure if the poblem is with LyX or LaTeX itself.

When I try to write "aRb" with the R negated, the diagonal which is
supposed to go over the R does not appear in the right place. I've
tried each of the following, both in ERT and using LyX's math
interface:

$a\not Rb$  result: big space between a and R, / just a little over R.
$a\not R b$ result: same
$a\not{R}b$ result: same
$a{\not R}b$result: smaller space between a and R, but / still not
completely over R.
$a{\not{R}}b$   result: same

It seems that the only way to make it look right is with negative
spaces, but that seems like an ugly hack. Is there any way to negate
the "right" way?

-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: [OT] Programmatically Creating a LaTeX Document

2007-10-10 Thread Ernesto Posse
Since you are using Python, I suggest using the string.Template class
for this purpose. I think the only thing that you would have to be
careful about is with the $: You would have to replace the normal $'s
of your LaTeX template by $$, since this class uses $ for marking
placeholders. Here's the link to the documentation

http://docs.python.org/lib/node40.html


On 10/10/07, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Wed, 10 Oct 2007, Todd Denniston wrote:
>
> > I have done such a beast, therefore it can be done. :)
>
>Thank you, Todd!
>
> > I had to be careful in my C program to properly escape LaTeX special chars
> > before it wrote the data to MyVariableData.tex, i.e., at least "_", "*"
> > and "\" become "\_", "{*}" and "\textbackslash{}". There are probably
> > others you need to look out for like "%" & "@".
>
>This should not be an issue in our model. The data are extracted from the
> database to a Python list (or a list of tuples; analogous to a
> two-dimensional array), and I can use indices to extract the strings and
> numbers I want.
>
>There will be plots (created, no doubt, with PSTricks), to be included in
> the audit log report of each run. So I expect the templates to be as
> inclusive as your example.
>
> > in MyVariableData.tex there are lines of the form:
> > \def\MyFirstVar{{*}Data{*} for Var\_1}
>
>I do need to better learn programming in LaTeX; this project needs that
> increased knowledge.
>
> > Hope this helps.
>
>Yes, it does.
>
> Rich
>
> --
> Richard B. Shepard, Ph.D.   |The Environmental Permitting
> Applied Ecosystem Services, Inc.| Accelerators(TM)
> <http://www.appl-ecosys.com> Voice: 503-667-4517  Fax: 503-667-8863
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Miximg scripts.

2007-10-09 Thread Ernesto Posse
Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style -> Customize dialog box.

One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?


On 10/4/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
>
>
> Ernesto Posse wrote:
> > On 9/29/07, Dov Feldstern  > PROTECTED]> wrote:
> >>
> >> Ernesto Posse wrote:
> >>> I think the arabi package was installed correctly, since MiKTeX didn't
> >>> give me any errors. I don't know how else to check if it is correctly
> >>> installed (it has about 207 files.) I tried reinstalling it, but I
> >>> obtain the same results.
> >>>
> >> One way to check would be to see if you can "compile" a regular latex
> >> (non-LyX) file with Farsi, maybe arabi includes some Farsi examples you
> >> could test with. If you are able to do that, then it means that
> >> arabi/latex are set up correctly, and the problem is getting LyX to work
> >> with it. Otherwise, it means the problem is with your latex/arabi setup,
> >> and there's not too much point in trying to get LyX to work before you
> >> fix that.
> >
> >
> > I didn't find any examples in the arabi package, but I wrote my own.
> > Apparently the error occurs when using the babel package:
> >
> > This compiles fine:
> >
> > \documentclass[farsi,english]{article}
> > \usepackage[T1]{fontenc}
> > \usepackage[utf8,latin9]{inputenc}
> > \begin{document}
> > hello
> > \end{document}
> >
> > But if I try to use a command from farsi, such as \alefhamza, I get a
> > babel error: (even if I don't use babel, which is odd:)
> > Package babel Error: You haven't loaded the option english yet.
> >
> > If I add
> >
> > \usepackage{babel}
> >
> > I get
> >
> > LaTeX Error: Encoding scheme `LAE' unknown.
> >
> > But apparently the solution is to modify the options for fontenc and
> > babel as follows:
> >
> > \usepackage[LFE,LAE,OT1]{fontenc}
> > \usepackage[farsi,english]{babel}
> >
> > So LyX should generate these instead of the default
> >
> > \usepackage[T1]{fontenc}
> > \usepackage{babel}
> >
>
> Uwe, I believe you worked on this at some point? I may have thwarted
> your efforts then...? Do you know what the current situation is?
>
> > Nevertheless, LaTeX does give some warnings:
> > "LaTeX Font Warning: Encoding `LFE' has changed to `OT1' for symbol font.
> >
> >
> >
> >>> Furthermore, I spoke too soon when I said that just typing worked
> >>> fine. When I switch languages, it does seem to correctly switch the
> >>> script, except for punctuation symbols. Only latin letters and digits
> >>> seem to be correctly rendered, but the rest of the keyboard seems
> >>> "stuck" with the other keyboard map. Only when I switch off keybord
> >>> maps do I get the correct symbols.
> >>>
> >> Hmm, this is strange. What have you set your primary and secondary
> >> keymaps to? What is your default language (Tools -> Preferences ->
> >> Language settings -> Language) and what is the document language
> >> (Document -> Settings... -> Language)? Which language seems to be
> >> working correctly, and which does not? Can you give an exact recipe for
> >> reproducing (e.g.: open a new document, set language to , type
> >> "abc"...)?
> >
>
> It's working for me (with a few slight variations on your setup and
> recipe -- see below --- perhaps those will help).
>
> > Primary: american
>
> Try switching this (primary) to "null" --- I think that means that your
> default language will be used.
>
> > Secondary: farsi
> >
> > Default language: English
> >
> > Things seem to go awry when the language is switched, regardless of
> > whether keyboard maps are on or off.
> >
> (this seems to indicate that the problem is not with the keymaps, but
> elsewhere in your system. Could it be that by accident you also switched
> the language at the OS-keyboard-level?)
>
> > Here's the recipe:
> >
> > 1. Open new document
> > 2. type some text, including punctuation symbols
> > 3. Set language to Farsi (Edit->Test Style->Customize->Language set to 
> > Farsi)
>
> Try switching languages by typing "language farsi" in the minibuffer
> (Alt-x).
>
> > 4. Type some text.
> > 5. Set language to English or American (Edit->Test
> > Style->Customize->Language set to English)
>
> Again, try the same command as above (still with "farsi"! this will
> toggle farsi off).
>
> > 6. Type text. Punctuation symbols are now wrong.
>
> Does this help?
>
> If it does, you can bind the "language farsi" command to a key, see,
> e.g., the suggestions here:
> http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .
>
> Dov
>
>
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Miximg scripts.

2007-10-01 Thread Ernesto Posse
On 9/29/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
>
>
> Ernesto Posse wrote:
> > I think the arabi package was installed correctly, since MiKTeX didn't
> > give me any errors. I don't know how else to check if it is correctly
> > installed (it has about 207 files.) I tried reinstalling it, but I
> > obtain the same results.
> >
>
> One way to check would be to see if you can "compile" a regular latex
> (non-LyX) file with Farsi, maybe arabi includes some Farsi examples you
> could test with. If you are able to do that, then it means that
> arabi/latex are set up correctly, and the problem is getting LyX to work
> with it. Otherwise, it means the problem is with your latex/arabi setup,
> and there's not too much point in trying to get LyX to work before you
> fix that.


I didn't find any examples in the arabi package, but I wrote my own.
Apparently the error occurs when using the babel package:

This compiles fine:

\documentclass[farsi,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8,latin9]{inputenc}
\begin{document}
hello
\end{document}

But if I try to use a command from farsi, such as \alefhamza, I get a
babel error: (even if I don't use babel, which is odd:)
Package babel Error: You haven't loaded the option english yet.

If I add

\usepackage{babel}

I get

LaTeX Error: Encoding scheme `LAE' unknown.

But apparently the solution is to modify the options for fontenc and
babel as follows:

\usepackage[LFE,LAE,OT1]{fontenc}
\usepackage[farsi,english]{babel}

So LyX should generate these instead of the default

\usepackage[T1]{fontenc}
\usepackage{babel}

Nevertheless, LaTeX does give some warnings:
"LaTeX Font Warning: Encoding `LFE' has changed to `OT1' for symbol font.



> > Furthermore, I spoke too soon when I said that just typing worked
> > fine. When I switch languages, it does seem to correctly switch the
> > script, except for punctuation symbols. Only latin letters and digits
> > seem to be correctly rendered, but the rest of the keyboard seems
> > "stuck" with the other keyboard map. Only when I switch off keybord
> > maps do I get the correct symbols.
> >
>
> Hmm, this is strange. What have you set your primary and secondary
> keymaps to? What is your default language (Tools -> Preferences ->
> Language settings -> Language) and what is the document language
> (Document -> Settings... -> Language)? Which language seems to be
> working correctly, and which does not? Can you give an exact recipe for
> reproducing (e.g.: open a new document, set language to , type
> "abc"...)?

Primary: american
Secondary: farsi

Default language: English

Things seem to go awry when the language is switched, regardless of
whether keyboard maps are on or off.

Here's the recipe:

1. Open new document
2. type some text, including punctuation symbols
3. Set language to Farsi (Edit->Test Style->Customize->Language set to Farsi)
4. Type some text.
5. Set language to English or American (Edit->Test
Style->Customize->Language set to English)
6. Type text. Punctuation symbols are now wrong.





> Dov
>
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Miximg scripts.

2007-09-28 Thread Ernesto Posse
I think the arabi package was installed correctly, since MiKTeX didn't
give me any errors. I don't know how else to check if it is correctly
installed (it has about 207 files.) I tried reinstalling it, but I
obtain the same results.

Furthermore, I spoke too soon when I said that just typing worked
fine. When I switch languages, it does seem to correctly switch the
script, except for punctuation symbols. Only latin letters and digits
seem to be correctly rendered, but the rest of the keyboard seems
"stuck" with the other keyboard map. Only when I switch off keybord
maps do I get the correct symbols.



On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> Ernesto Posse wrote:
> > Great, thanks. I wasn't setting  "Edit -> Text style ->Customized...
> > -> Language" properly. Is there a key binding for this option?
> >
>
> There is an lfun called "language" which does exactly this, and which
> you can bind to any key you want. In Hebrew, we use F12 for the binding.
> I suggest adapting one of the files attached here, just use the language
> "farsi": http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just
> place the file to your .lyx/bind directory (I'm not sure what the
> Windows equivalent is, the truth is you could probably place the file
> anywhere), and select it as your bind file (Tools -> Preferences... ->
> Look and feel -> User interface).
>
> Note that since you're using an RTL language, then you shouldn't even
> have to use the bindings for explicitly setting the keymap (M-k 1, etc.)
> --- it should happen automatically when you switch the language.
>
> > When I am typing, it seems to work, but when I try to view it (for
> > example in DVI) I get latex errors such as:
> >
> > LaTeX Error: Encoding scheme `LAE' unknown.
> > Command \alefhamza unavailable in encoding T1.
> > Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.
> >
> > I am trying to mix English and Farsi. I followed the instructions from
> > the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
> > on Windows Vista, with MiKTeX 2.6.
> >
> > What could be the problem?
>
> I don't know the Farsi stuff, Mostafa is our Farsi expert. But some
> things I would check: are you sure that the "arabi" latex package is
> installed and set up correctly? What's bothering me is that the LAE
> encoding scheme seems to be unknown, I believe that's what should be
> used for Farsi.
>
> Uwe, Mostafa --- any ideas?
>
> >
> > By the way, I found that in menus.bind, both options for "M-k o" and
> > "M-k x" are set to "keymap-off". If I change one of them to
> > 'keymap-on', it seems to be ignored.
>
> I'm not even sure what the keymap-off and keymap-on lfuns are supposed
> to do... But as I said above, for an RTL language, you shouldn't need
> any of the keymap lfuns, switching the language should take care of this
> as long as you've setup the keymaps to be used.
>
> >
> >
> >
> > On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> >> Ernesto Posse wrote:
> >>> Is it possible to write a document in LyX (1.5.1) that mixes two (or
> >>> more) scripts? If so, how?
> >>>
> >>> I have been able to install and use an alternative keyboard map for a
> >>> non-latin script, but, even though one can specify two keyboard maps,
> >>> I have not been able to find anywhere in the documentation how to
> >>> select the second map.
> >>>
> >>> Thanks.
> >>>
> >> Hi!
> >>
> >> Yes, it is possible, there are actually a few different ways to do it.
> >> However, your success may also depend on which scripts specifically you
> >> are talking about.
> >>
> >> The easiest way is perhaps to just switch the keyboard at the OS-level.
> >> Depending on your OS / Desktop Environment, you can probably change the
> >> "keyboard's language", and then whatever you type will be in that script.
> >>
> >> Another option is to use LyX's built-in keymaps. It sounds like you have
> >> already discovered this option. In order to use it, you can use the
> >> following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary
> >> keymap; "M-k t" to toggle between them. Two caveats, though: Firstly,
> >> Keymaps currently support only two scripts simultaneously. Secondly, if
> >> both scripts you want to use are

Re: Miximg scripts.

2007-09-27 Thread Ernesto Posse
Great, thanks. I wasn't setting  "Edit -> Text style ->Customized...
-> Language" properly. Is there a key binding for this option?

When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?

By the way, I found that in menus.bind, both options for "M-k o" and
"M-k x" are set to "keymap-off". If I change one of them to
'keymap-on', it seems to be ignored.

On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> Ernesto Posse wrote:
> > Is it possible to write a document in LyX (1.5.1) that mixes two (or
> > more) scripts? If so, how?
> >
> > I have been able to install and use an alternative keyboard map for a
> > non-latin script, but, even though one can specify two keyboard maps,
> > I have not been able to find anywhere in the documentation how to
> > select the second map.
> >
> > Thanks.
> >
>
> Hi!
>
> Yes, it is possible, there are actually a few different ways to do it.
> However, your success may also depend on which scripts specifically you
> are talking about.
>
> The easiest way is perhaps to just switch the keyboard at the OS-level.
> Depending on your OS / Desktop Environment, you can probably change the
> "keyboard's language", and then whatever you type will be in that script.
>
> Another option is to use LyX's built-in keymaps. It sounds like you have
> already discovered this option. In order to use it, you can use the
> following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary
> keymap; "M-k t" to toggle between them. Two caveats, though: Firstly,
> Keymaps currently support only two scripts simultaneously. Secondly, if
> both scripts you want to use are non-RTL, you have to turn off the RTL
> option (see the RELEASE-NOTES, or
> http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).
>
> Personally, I prefer keymaps. I have pointed out some of the reasons why
> in a previous post
> (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
> there if those reasons make sense to you or not, and that may help you
> decide which method is better for you.
>
> Note, however, that regardless of which method you use, you should also
> make sure that the language of the text (Edit -> Text style ->
> Customized... -> Language) is set correctly. Otherwise, chances are that
> latex will choke on the non-latin characters. This is where using a LyX
> keymap has an advantage: since you can change the keymap from within
> LyX, you can create a keybinding which will both switch the keymap and
> set the language using only a single keystroke. I don't know of any way
> to do this if you use OS-level keyboard support.
>
> If you provide a little more specific information (which scripts? what
> OS are your working on? ...) we may be able to provide further assistance.
>
> Dov
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Miximg scripts.

2007-09-26 Thread Ernesto Posse
Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.

-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Adding a new text class.

2007-01-18 Thread Ernesto Posse

Hi. I'm having problems adding my own text class. The layout file is
writen according to the documentation (and along the lines of typical
layout files) and is recognized by lyx (after rescanning for new tex
classes, reconfiguring and restarting,) but whenever I choose it as
the document class, I get the error "LyX: could not change class; The
document could not be converted into the document class MyClass."

 I don't see what the problem is, even though my example is very minimalistic

 First I have a tex class file called "MyClass.cls" which contains
the following:


\ProvidesClass{MyClass}


\newcommand{\hello}{Hello}


 This file is placed under a latex tree, and I did texhash so that
tex would find where it is. In LyX I do a rescan in the TeX info
dialog and it finds it.

 Then the layout file MyClass.layout, which is located in my
~/.lyx/layouts directory contains the following:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[MyClass]{MyClass}

Format 2
Columns 1
Sides   2
PageStyle   Headers

Input stdclass.inc

MaxCounter  Counter_Section
SecNumDepth 4
TocDepth3

Preamble
   \usepackage[dvips]{geometry}
EndPreamble

 I do a reconfigure and restart. The new class does appear in the
"document class" list but if I choose it, I get the error, even on a
new (empty) file.

 What am I doing wrong? Why is it not working?

 Thanks.




--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


PDF update under Windows

2006-08-17 Thread Ernesto Posse

Hi. I have a problem with LyX 1.4.2. under Windows. When using any of
the "update PDF" options in the View menu PDF viewers cannot update
the generated PDF, and some give an error. I found a "fix" in the LyX
wiki at

http://wiki.lyx.org/Windows/LyXWinTips

that suggests creating a PDFview.cmd script with the following code

if not exist "%~dpn1~%~x1" goto :go
pdfclose --file  "%~dpn1~%~x1"
del "%~dpn1~%~x1"
:go
copy %1 "%~dpn1~%~x1"
pdfopen --file "%~dpn1~%~x1"
exit

and putting this script as well as pdftools (pdfopen and pdfclose)
somewhere in the path, and then changing the associated viewer for PDF
from auto to PDFview.

 I've done all of these things, but it doesn't workl. I tried with
different PDF viewers (Acrobat, Foxit, eXpertPDF,) and none of these
work: LyX fails to even launch the viewers, and there is not message
given. Even starting LyX from a console window doesn't show any
messages, even after adding an "echo something" at the beginning of
the PDFview.cmd, which suggests that LyX is not running PDFview.cmd,
but I am sure it is in the path. I even tried putting it in the
lyx/bin and in my ~/.lyx directory but to no avail.

 Does anyone know whether this is a bug or if not, what to do to make
the update PDF options work under Windows?


--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: A debate topic: What can LyX still learn from scientific workplace?

2006-05-24 Thread Ernesto Posse

> Do you know that we already have a math toolbar. It is disabled by
> default, and enabling it currently means editing the ui/default.ui
> file. It can be made to pop up automatically in maths, for those who
> like these kind of things.

Yes, but here come two points:

1) it should be possible to activate these without going into the text
files, why is there not View->Toolbars->Math,Extra,MiniBuffer,etc
menu which allows this?


 Actually you can activate it in lyx 1.4 without editing the
default.ui file: right-click on the toolbar and you'll get a few
options including the math toolbar.


--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: [Announce] LyX version 1.4.0

2006-03-15 Thread Ernesto Posse
I agree with Martin's wish about the search interface. Furthermore,
I'd like to be able to search text that is within a math environment
(if there is a way to do that now, please do tell.)


On 3/15/06, Martin A. Hansen <[EMAIL PROTECTED]> wrote:
> i really, really wish for a search scheme resembling firefox :o). currently
> search results often appear behind the search window, which is most
> annoying.
>
> also, when inserting graphics, the width & height layout menu is confusing -
> especially when you want to scale an image based on the height variables. it
> would be neat with a simple non-confusing interface.
>
>
> martin
>
> On 15/03/06, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:
> >
> > >>>>> "Gour" == Gour  <[EMAIL PROTECTED]> writes:
> >
> > Gour> What are some of the 'bigger' items on the agenda (besides
> > Gour> Unicode) for 1.5.0?
> >
> > We'll try not to have other big items in order to get it out faster.
> > But of course, there will be smaller thing all over the place. The
> > goal for 1.6 will be xml-based file format.
> >
> > JMarc
> >
>
>


--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Beamer TOC invisible

2006-03-13 Thread Ernesto Posse
Hi. I seem to have a strange problem with the Beamer class. I have
looked for information on this but I haven't found anything.

  Basically the problem is that the table of contents doesn't seem to
work at all for beamer documents that I create, but strangely enough,
it does seem to work with the templates included in the beamer class.

  I'm attaching a sample file with the problem.

  Any clues? Am I missing something?

  Thanks

--
Ernesto Posse


test3.lyx
Description: application/lyx


Re: [Announce] LyX version 1.4.0

2006-03-08 Thread Ernesto Posse
I just wanted to congratulate the LyX team. Bravo!


Figures in tables

2006-02-27 Thread Ernesto Posse

Hi. I have a problem with figure alignment and placement next to text.

  Basically I need to place some figure right next to some short text,
where the text is aligned either at the center of the figure or at the
top, as in:


Some text +->+
  |  |
  |  |
  |  |
  +->+

  I have tried many things, such as putting the text and figure inside a
table, and setting the alignments for each cell, or putting them in
minipages and setting the alignment too. However nothing seems to work,
and the text is always aligned with the bottom of the figure.
Furthermore, the Alignment parameters do not seem to do what their name
suggests. If, for instance, I put the text in a minipage with "Top"
alignment and the figure in a minipage with "Bottom" alignment, I get
the text a little bit below the figure!

  How can I achieve such placement?

  Thanks.




-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse





ERT & Latex export

2006-01-16 Thread Ernesto Posse

Hi. Is there any way to tell lyx not to put empty lines when generating
latex from an ERT box? I'm trying to use a latex package which for some
reason doesn't like empty lines, but it looks like LyX always adds empty
lines between lines written in an ERT box. This is quite inconvenient,
since I have to manually delete those lines from the generated latex file.

-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse





Finding text in math mode

2006-01-04 Thread Ernesto Posse
I know that lyx supports searching to an extent in math mode, both
some things do not seem to work. For intance, if I have text in a
formula (the equivalent of $some text$ in latex) then lyx doesn't
appear to look inside the formulas for text. Is there any way of
searching arbitrary text inside formulas? If not, what are the
limitations and why?

--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Re: Configuring toolbars to deal with layouts

2005-12-02 Thread Ernesto Posse
Thanks. I understand how to do it now. However I found a problem: I
want a button to insert a reference. I found the command
"reference-insert". Adding the line

  Icon "reference-insert"

in the Toolbar section of default.ui does add the new button, but it
does not find the icon. There is not such icon in the standard lyx
images directory, so I created my own references-insert.xpm and put it
in my .lyx/images directory, but LyX still doesn't find it. This is
rather strange, since it does find the other icons in that same
directory. What am I doing wrong?


On 12/2/05, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:
> >>>>> "Ernesto" == Ernesto Posse <[EMAIL PROTECTED]> writes:
>
> Ernesto> I have a couple of questions about customizing the toolbar:
> Ernesto> 1) Is there a lyx function that applies layouts
> Ernesto> (environments) to a selection or to the current paragraph,
> Ernesto> which can be used by a (custom) toolbar button? (I didn't
> Ernesto> find any)
>
> Sure, it is called "layout". We even have proper icons for "layout
> Section" and "layout LyX-Code". You can add your own icons by
> providing a file layout_foo.xpm for layout "foo".
>
> Ernesto> 2) Are there keyboard shortcuts for layouts (environments)?
> Ernesto> Where would I find those?
>
> In LYXDIR/bind/menus.bind. I append the list for your reading pleasure.
>
> Note also that when you select a layout from the layout box, you will
> see the corresponding keyboard shortcut in the minibuffer (the same
> holds for menu entries and icons).
>
> JMarc
>
> #
> # Paragraph style menu
> #
>
> \bind "M-p ~S-0""layout Part"
> \bind "M-p ~S-1""layout Chapter"
> \bind "M-p ~S-2""layout Section"
> \bind "M-p ~S-3""layout Subsection"
> \bind "M-p ~S-4""layout Subsubsection"
> \bind "M-p ~S-5""layout Paragraph"
> \bind "M-p ~S-6""layout Subparagraph"
> \bind "M-p ~S-asterisk ~S-0""layout Part*"
> \bind "M-p ~S-asterisk ~S-1""layout Chapter*"
> \bind "M-p ~S-asterisk ~S-2""layout Section*"
> \bind "M-p ~S-asterisk ~S-3""layout Subsection*"
> \bind "M-p ~S-asterisk ~S-4""layout Subsubsection*"
> \bind "M-p ~S-asterisk ~S-5""layout Paragraph*"
> \bind "M-p ~S-asterisk ~S-6""layout Subparagraph*"
> \bind "M-p a"   "layout Abstract"
> \bind "M-p S-A" "layout Author"
> \bind "M-p M-a" "layout Address"
> \bind "M-p C-a" "layout Right_Address"
> \bind "M-p b"   "layout Itemize"# bulleted list
> \bind "M-p S-B" "layout Bibliography"
> \bind "M-p c"   "layout LyX-Code"
> \bind "M-p S-C" "layout Comment"
> \bind "M-p M-c" "layout Caption"
> \bind "M-p d"   "layout Description"
> \bind "M-p S-D" "layout Date"
> \bind "M-p e"   "layout Enumerate"  # numbered list
> \bind "M-p f"       "layout ShortFoilhead"  # Foils!!
> \bind "M-p S-F" "layout Foilhead"   # Foils!!
> \bind "M-p i"   "layout Itemize"# bulleted list
> \bind "M-p l"   "layout List"
> \bind "M-p S-L" "layout LaTeX"
> \bind "M-p n"   "layout Enumerate"  # numbered list
> \bind "M-p q"   "layout Quote"
> \bind "M-p S-Q" "layout Quotation"
> \bind "M-p r"   "layout ShortRotatefoilhead"# Foils!!
> \bind "M-p S-R" "layout Rotatefoilhead" # Foils!!
> \bind "M-p s"   "layout Standard"
> \bind "M-p t"   "layout Title"
> \bind "M-p space"   "drop-layouts-choice"
> \bind "M-p v"   "layout Verse"
>
>


--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


Configuring toolbars to deal with layouts

2005-12-01 Thread Ernesto Posse
I have a couple of questions about customizing the toolbar:

1) Is there a lyx function that applies layouts (environments) to a
selection or to the current paragraph, which can be used by a (custom)
toolbar button? (I didn't find any)

2) Are there keyboard shortcuts for layouts (environments)? Where
would I find those?

3) Is there a way to add a second toolbar? The website mentions that
the Qt front-end can handle multiple toolbars, but I find no
documentation on how to do so. Adding another "Toolbar" section in
default.ui just makes lyx crash.

  I hope these things are possible; having to open the layout combobox
and scroll down until you find the environment you are looking for is
a serious disadvantage of the LyX user interface, since choosing an
environment is one of the most common editing activities. I wish the
upcomming 1.4 release would provide a more user-friendly approach to
selecting environments (hint: context-sensitive, right-click menus,)
or at least, a way to customize the toolbars to do so.

  Thanks.

--
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse


strange problem with latex packages

2005-09-23 Thread Ernesto Posse

Hi. I have a strange problem with user-defined classes and style files. At
first sight the problem is with latex, but I think it is a LyX issue.

  I need to use a particular latex package which is not part of the latex
distribution. I cannot install it on the standard latex directory
structure since I do not have administrator's access. Therefore I have
put the package in some other directory, and set my TEXINPUTS variable.

  Latex itself can find my package, but LyX tells me it cannot find it.
The LaTeX log within LyX says latex cannot find the package, but when I
execute latex from the command line, it does find it.

  I have tried putting the package under my local ./lyx, and do a
reconfigure, but the problem is still there.

  In the TeX information dialog my package appears listed when I do a
rescan, but if I click on "View" it tells me it cannot find the file.

  The LyX documentation says to follow the instructions on the texmf.cnf
file. I got that file but I don't see any actual instructions. It seems
to contain a list of variables which I suppose are the directories where
latex can find things. But I cannot change that file as I do not have
administrator's access.

  How can I add a package without having to modify the texmf.cnf file?
  Why is there a discrepancy between LyX and latex from the command line
in terms of finding the package?
  Why does LyX find the package in the TeX info view but cannot show its
contents?

  Thanks for any help.

-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse





Problem creating new layout

2004-07-12 Thread Ernesto Posse

  Hi. I'm having a problem installing a new layout. I've created my own
layout file and put it under .lyx/layouts, including the associated .sty
file, but when I reconfigure the new layout doesn't appear (under
Layout|Document.)

  I found a file called "textclass.lst" both on my own directory and on
lyx/share/lyx, which contains entries for the layouts. When I modify any
of these and add an entry corresponding to my layout, it appears, but
when I reconfigure it disappears.

  What can I do so it doesn't disappear when I reconfigure?

  (I use LyX 1.3.3. Windows port, native, not Cygwin.)

  Thanks

-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse