Re: Weird space character

2019-10-18 Thread Edward K. Ream
On Fri, Oct 18, 2019 at 10:03 AM Terry Brown  wrote:

"Vanilla" LaTeX systems tend to use `pdflatex` to process things, and don't
> understand unicode inputs without extra fiddling.  If you use XeTeX
> (`xelatex`), it assumes unicode by default and makes things simpler - in a
> lot of cases it can be a drop in replacement.  I think TeXLive supports
> either, pandoc can certainly use either.
>

Thanks, Terry, for these comments.  I didn't know any of this.

> It's really bad when you go from 27 μg/L nitrate (micro-grams per liter)
> in your drinking water to 27 g/L because LaTeX doesn't render the μ :-S
>

Yikes!  Death by (lack of) unicode.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0SFBwxFLV711ajSQ49BDYp7%2BEKaydrXo%2BQzE%3DPEdQeUg%40mail.gmail.com.


Bob H: would distinct Leo IDs help with #1348?

2019-10-18 Thread Edward K. Ream
#1348  has been 
closed, but I'm not sure of its status.

gnx clashes are a recurring theme when using Leo (or the bridge) to spawn 
many other copies of Leo quickly.

I am wondering whether these clashes might be avoided if Leo would use a 
separate user id for each spawned copy.  This might be done either with a 
--id=x command-line option or with a kwarg to runLeo.py.

What are your thoughts?

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/cd35223c-de4d-4261-8300-422889bbc4e8%40googlegroups.com.


Re: Weird space character

2019-10-18 Thread Terry Brown
"Vanilla" LaTeX systems tend to use `pdflatex` to process things, and don't
understand unicode inputs without extra fiddling.  If you use XeTeX
(`xelatex`), it assumes unicode by default and makes things simpler - in a
lot of cases it can be a drop in replacement.  I think TeXLive supports
either, pandoc can certainly use either.

It's really bad when you go from 27 μg/L nitrate (micro-grams per liter) in
your drinking water to 27 g/L because LaTeX doesn't render the μ :-S

Cheers -Terry



On Fri, Oct 18, 2019 at 7:50 AM Rob  wrote:

> I re-read the error message in the LaTeX processor and perhaps I should
> clarify.
>
> Keyboard character used is undefined in inputencoding`utf8'.
>
> Reviewing the documentation for that package (inputenc) suggests the error
> is because there is no corresponding glyph to map to output. So, it's
> really a function of the processor's inability to deal with the character.
>
> After show-invisibles I see all the regular spaces as dots. The offending
> character doesn't have anything, just looks like a space, making it
> difficult to find (see screenshot). Not sure what, if anything can done
> about it.
>
> Thanks for the suggestion to use show-invisibles. It doesn't show lie
> feeds, though (see screenshot from Notepad++). Don't know how important
> that is, though.
>
> Rob...
>
> [image: 191018 Leo utf8.png]
>
> [image: 191018 NP++ utf8.png]
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/4df9f0af-3133-4a08-929c-503e887fc0a8%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAFPg46Q%2BpQwDnXq9M0--00k_gZrWjKgTHb%2BykpUOk3ZFsB4pHw%40mail.gmail.com.


Leo 6.1b1 coming Friday, October 25

2019-10-18 Thread Edward K. Ream
Leo 6.1 b1 will go out the door next Friday. Barring significant problems, 
Leo 6.1 final will be released the following Friday, November 1.

For the past several weeks I've been wondering whether to set the release 
date for 6.1b1.  I'm glad I didn't: it allowed lots of time for testing, 
new bug reports, and general reflection.

But now only the new sphinx commands remain.  These will have no effect on 
the rest of Leo, so it's time to push things along.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1f782ca7-d16f-47c2-b1ac-24f4035929b3%40googlegroups.com.


Re: Weird space character

2019-10-18 Thread Edward K. Ream
On Fri, Oct 18, 2019 at 7:50 AM Rob  wrote:

> I re-read the error message in the LaTeX processor and perhaps I should
> clarify.
>
> Keyboard character used is undefined in inputencoding`utf8'.
>
> Reviewing the documentation for that package (inputenc) suggests the error
> is because there is no corresponding glyph to map to output. So, it's
> really a function of the processor's inability to deal with the character.
>

I doubt there is anything that Leo can do about that.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1QL3kAxpzfCsXp%3D%2BvmOMMLCCSkRxKPS2pfxJa%3DB%2BM8aQ%40mail.gmail.com.


Re: Discuss: what should Leo's sphinx commands do?

2019-10-18 Thread Chris George
When I use sphinx, step one is to always create a directory for the
project. I then run sphinx-quickstart to create the conf.py and the _build
and _static directories.

The ideal for my workflow would be to start with an @sphinx node that would
do all that for me. ie. in the headline @sphinx ~/sphinx/my_new_project and
save the Leo file would create the directory my_new_project, run
sphinx-quickstart, create a child node @clean
~/sphinx/my_new_project/conf.py, and an initial index.rst, also as a child
node.

All of that is just housekeeping that can easily be done via a variety of
methods.

The main thing, for me, is the ability to view the rendered sphinx document
(html) in the viewrendered pane, live, in real time, while editing a node
under the @sphinx tree.

As far as rendering the entire sphinx project as html to view in a browser,
that too can be achieved in a number of ways. The workflow above would have
a copy of both the input and output files updated in real time so viewing
the entire project in the viewrendered pane (when the top level @sphinx
node is selected) should be pretty straight forward.

The sphinx-autobuild command might be useful for this as it starts a basic
http server and auto-updates itself when the content of the input files
changes.

One of Leo's great strengths is flexibility, settings, and reasonable
defaults. Automating the basic housekeeping tasks would work for me, but
other people might have different ideas, so settings are a good thing.

HTH,

Chris


On Fri, Oct 18, 2019 at 5:36 AM Edward K. Ream  wrote:

> I am working on the sphinx and sphinx-with-preview commands.  These
> commands convert one or more @sphinx trees into *sphinx input files*. The
> commands then call the *sphinx-build* tool to create one or more *sphinx
> output files*.
>
> These two sphinx commands are similar to the corresponding adoc and pandoc
> commands.  However, the sphinx-build tool works differently from the
> asciidoctor or pandoc tools, and this raises questions about what the
> sphinx commands should do. I'd like your comments and suggestions.
>
> *Building the input files*
>
> This is a straightforward process. The code (in markup.write_root &
> helpers) is common to the adoc, pandoc and sphinx commands.  It traverses
> the @adoc, @pandoc or @sphinx tree, converting headlines to the appropriate
> markup for sections.  I have no questions regarding this process.
>
> *Sphinx-build*
>
> sphinx-build is different from asciidoctor and pandoc in several ways.
>
> 1. Options:  sphinx-build --help starts with:
>
>usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
>
> In particular, the SOURCEDIR and OUTPUTDIR directories must be different.
> See below.
>
> 2. Typically, sphinx users create a conf.py file that specifies various
> options.  The *sphinx-quickstart* tool does that automatically. The
> sphinx-quickstart tool also creates *_build* and *_static* directories
> for output.
>
> So given an input file x, the sphinx commands can't simply specify x.html
> as the output file. The output file would typically be written to
> _build/html.
>
> *Questions*
>
> Here are the questions I have:
>
> 1. Should invoking the sphinx-build tool be optional?
>
> *Not* invoking sphinx-build is the most flexible option. The user could
> then (via @command) invoke sphinx-build as they like, and display results
> in the browser if desired.
>
> 2. What command should Leo use to invoke sphinx-build?
>
> Invoking 'make html' would seem to be a reasonable default, when conf.py
> is present.
>
> 3. How should the user specify that command, and what should the defaults
> be?
>
> I am willing to add various settings if you all want that flexibility.
>
> *Summary*
>
> I'd like your comments to the questions given above.
>
> Sphinx is sufficiently different from asciidoctor and pandoc that new Leo
> settings seem to be required.
>
> Please correct me if I have misstated or omitted anything regarding
> typical sphinx usage.
>
> It will be straightforward to do anything you might want.  I plan to
> complete all the sphinx-related work before releasing Leo 6.1b1.
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/f19809b7-a8ee-4c05-94f1-f31f0ba9e7e6%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Re: Weird space character

2019-10-18 Thread Rob
I re-read the error message in the LaTeX processor and perhaps I should 
clarify. 

Keyboard character used is undefined in inputencoding`utf8'.

Reviewing the documentation for that package (inputenc) suggests the error 
is because there is no corresponding glyph to map to output. So, it's 
really a function of the processor's inability to deal with the character.

After show-invisibles I see all the regular spaces as dots. The offending 
character doesn't have anything, just looks like a space, making it 
difficult to find (see screenshot). Not sure what, if anything can done 
about it.

Thanks for the suggestion to use show-invisibles. It doesn't show lie 
feeds, though (see screenshot from Notepad++). Don't know how important 
that is, though.

Rob...

[image: 191018 Leo utf8.png]

[image: 191018 NP++ utf8.png]



-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4df9f0af-3133-4a08-929c-503e887fc0a8%40googlegroups.com.


Discuss: what should Leo's sphinx commands do?

2019-10-18 Thread Edward K. Ream
I am working on the sphinx and sphinx-with-preview commands.  These 
commands convert one or more @sphinx trees into *sphinx input files*. The 
commands then call the *sphinx-build* tool to create one or more *sphinx 
output files*.

These two sphinx commands are similar to the corresponding adoc and pandoc 
commands.  However, the sphinx-build tool works differently from the 
asciidoctor or pandoc tools, and this raises questions about what the 
sphinx commands should do. I'd like your comments and suggestions.

*Building the input files*

This is a straightforward process. The code (in markup.write_root & 
helpers) is common to the adoc, pandoc and sphinx commands.  It traverses 
the @adoc, @pandoc or @sphinx tree, converting headlines to the appropriate 
markup for sections.  I have no questions regarding this process.

*Sphinx-build*

sphinx-build is different from asciidoctor and pandoc in several ways.

1. Options:  sphinx-build --help starts with:

   usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]

In particular, the SOURCEDIR and OUTPUTDIR directories must be different. 
See below.

2. Typically, sphinx users create a conf.py file that specifies various 
options.  The *sphinx-quickstart* tool does that automatically. The 
sphinx-quickstart tool also creates *_build* and *_static* directories for 
output.

So given an input file x, the sphinx commands can't simply specify x.html 
as the output file. The output file would typically be written to 
_build/html.

*Questions*

Here are the questions I have:

1. Should invoking the sphinx-build tool be optional?

*Not* invoking sphinx-build is the most flexible option. The user could 
then (via @command) invoke sphinx-build as they like, and display results 
in the browser if desired.

2. What command should Leo use to invoke sphinx-build?

Invoking 'make html' would seem to be a reasonable default, when conf.py is 
present.

3. How should the user specify that command, and what should the defaults 
be?

I am willing to add various settings if you all want that flexibility.

*Summary*

I'd like your comments to the questions given above.

Sphinx is sufficiently different from asciidoctor and pandoc that new Leo 
settings seem to be required.

Please correct me if I have misstated or omitted anything regarding typical 
sphinx usage.

It will be straightforward to do anything you might want.  I plan to 
complete all the sphinx-related work before releasing Leo 6.1b1.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f19809b7-a8ee-4c05-94f1-f31f0ba9e7e6%40googlegroups.com.


Re: Weird space character

2019-10-18 Thread Edward K. Ream
On Thu, Oct 17, 2019 at 9:21 PM Rob  wrote:

My LaTeX processor choked on 2 instances of an unknown UTF8 character.
> Probably came into Leo when I copied from somewhere else (perhaps an MS
> Word document).
>

I'm not sure there is such a thing as an "unknown" UTF8 character.

Leo is quite careful when pasting text from a clipboard.  The relevant
methods are
LeoFrame.pasteText and its two helpers, qt_gui.getTextFromClipboard and
g.checkUnicode.  The latter does a thorough check of the incoming text, and
warns if there are conversion errors.

It would be a serious bug in Leo if g.checkUnicode was flawed.  By default,
which always applies when pasting, g.checkUnicode assumes utf-8 encoding.

> Question; is there a way to show the space characters and line feeds in
> Leo like I can in Notepad++?
>

show-invisibles (and hide-invisibles & toggle-invisibles).

With the Qt gui this does:

option.setFlags(QtGui.QTextOption.ShowTabsAndSpaces)

so, Leo is at the mercy of what Qt thinks is a space or tab.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0%2B_e61hMhULTbCxQxzKtzWLkYN-OnJSZxU8vRfTh82Yw%40mail.gmail.com.