Re: Help with creation of module

2016-05-13 Thread Richard Heck
On 05/13/2016 03:38 PM, racoon wrote:
> Hi!
>
> The LyX manual on customization has not much explanation. I want to
> create a simple module that inserts a label with "footnotemark" and
> the command \footnotemark in the source.
>
> The LyxType sounds like the right thing to use. But unfortunately, I
> have no idea where I can find this kind of inset. The documentation
> states "Among other things, [LyXType] determines on which menu this
> inset will appear." (46, LyX 2.2) But it does not state where the
> inset will appear.

This does sound like a job for a Flex inset. Can you explain in detail
what you want to accomplish, in terms of LaTeX? Is there preamble code?
What do you want to appear where this new inset would appear?

I'd suggest you look at endnotes.module for an example you should be
able to adapt.

As for LyXType, the only genuine options here are CharStyle and Custom.
The former is intended, as it says, for character styles, such as noun
and small caps. They appear under Edit> TextStyle. The latter is
intended for custom insets such as endnote. They appear under Insert>
Custom Insets.

Richard



Help with creation of module

2016-05-13 Thread racoon

Hi!

The LyX manual on customization has not much explanation. I want to 
create a simple module that inserts a label with "footnotemark" and the 
command \footnotemark in the source.


The LyxType sounds like the right thing to use. But unfortunately, I 
have no idea where I can find this kind of inset. The documentation 
states "Among other things, [LyXType] determines on which menu this 
inset will appear." (46, LyX 2.2) But it does not state where the inset 
will appear.


Best,
Daniel



Re: Problem with Inkscape integration: path to SVG file converted to long filename

2016-05-13 Thread Richard Heck
On 05/13/2016 07:28 AM, Ron Stone wrote:
> Thanks for the feedback.
>
> I got this working by making two changes:
>
> 1. The path declaration described in
>
> In the *Preferences* under *Paths* you should append
> /:/Applications/Inkscape.app/Contents/Resources/bin/ at the end if you
> have Inkscape installed at the default location. (Make sure a colon
> separates it from the other entries.) 
>
> seemed to be ignored. I had to add it to my bash $PATH
>  
> 2. Perhaps because of 1, path variables were missing from the
> converters. For example, SVG -> PDF had --file=$$i instead of
> —file=$$p/$$i, and similarly for —export-pdf, it was missing the $$p/

If you haven't done so, adding a note about this to the wiki would be a
good idea.

rh



Re: Problem with Inkscape integration: path to SVG file converted to long filename

2016-05-13 Thread Ron Stone
Thanks for the feedback.

I got this working by making two changes:

1. The path declaration described in

In the Preferences under Paths you should append 
:/Applications/Inkscape.app/Contents/Resources/bin at the end if you have 
Inkscape installed at the default location. (Make sure a colon separates it 
from the other entries.) 

seemed to be ignored. I had to add it to my bash $PATH
 
2. Perhaps because of 1, path variables were missing from the converters. For 
example, SVG -> PDF had --file=$$i instead of —file=$$p/$$i, and similarly for 
—export-pdf, it was missing the $$p/


> On May 13, 2016, at 12:26 AM, Richard Heck  wrote:
> 
> On 05/12/2016 08:28 PM, Ron Stone wrote:
>> Hi,
>> 
>> I’ve followed the instructions at  
>> https://wiki.lyx.org/Tips/UseInkscapeSVGImages
>>    but I’m encountering the 
>> following error on Mac OS El Capitan:
>> 
>> The command
>> Inkscape --file="1_Users_ronstone_Desktop_drawing.svg" --export-area-drawing 
>> --without-gui --export-pdf="1_Users_ronstone_Desktop_drawing.pdf"
>> has not yet completed.
>> 
>> The SVG file I am trying to incorporate is drawing.svg, on the desktop (same 
>> location as the .lyx file that is using it). I don’t understand the 
>> conversion of the full file path to: 1_Users_ronstone_Desktop_drawing.svg in 
>> the above error message. Where is that filename coming from?
> 
> Conversions are performed in LyX's temporary directory, in order to avoid 
> polluting your own directories. I do not know exactly where that directory is 
> on OSX. On Linux, it is at /tmp/lyx_temdir.XX, where the X's are random 
> characters. Inside that directory are various subdirectories for different 
> documents. LyX's copies the file to be converted into the relevant directory 
> but renames it so as to avoid possible naming conflicts.
> 
> Hard to know why the command isn't completing. I'd suggest you try running 
> this sort of command from a terminal. If you can actually run it in LyX's 
> temporary directory, on the copied svg file.
> 
> Richard
>