Re: Converting markdown to PDF

2021-06-17 Thread Steve Litt
Dr Eberhard Lisse said on Thu, 17 Jun 2021 13:03:39 +0200


>I wrote a 15 line template file, 

Could you please post the template file, as well as the exact command
you used to implement the template file for conversion?

Thanks,

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-17 Thread Steve Litt
Jean-Marc Lasgouttes said on Thu, 17 Jun 2021 10:24:06 +0200

>Le 17/06/2021 à 03:24, Steve Litt a écrit :
>> What we need, and we've needed for over a decade is a real, style for
>> style, syntactically complete HTML export, or lacking that, finally
>> finish the job, started a decade ago, of making LyX' native language
>> format valid and well formed XML. Do that and I'll make a LyX to
>> (x)HTML converter that drops no styles nor adds styles for silly
>> stuff like not indenting the first paragraph in a sequence of
>> same-styled paragraphs, and is suitable for a high quality ePub and
>> other flowing text eBooks.  
>
>DocBook5 is coming. Does this fit your needs?

Probably not. Nothing depending on Pandoc fits my needs. Also, the LyX
to Pandoc conversion would need to preserve styles.

The proposition is simple. LyX allows any sort of character or
paragraph style (environment). Documents consist of text with styles
applied, NOT text with appearance applied. The styles should be passed
through all the way to the exported format.

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-17 Thread Dr Eberhard Lisse

I had a need of making Beamer presentations out of mind maps.

Found another mind mapper which could import from the first one
and could export MarkDown.

Frome there using a shell script which messes with the Markdown by way
of perl substitutions and does some other stuff and using a self written
template for pandoc) I can generate TeX which more or less translates
flawlessly into LyX.

greetings, el

On 17/06/2021 03:24, Steve Litt wrote:
[...]

What might be more interesting is a Markdown *import*. LyX, equipped
with a Markdown layout file, could easily print Markdown to pdf, or use
it as part of a larger LyX work.

[...]

--
To email me replace 'nospam' with 'el'

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-17 Thread Dr Eberhard Lisse

I was going to write

 What we need in the first instance is to to be able to generate
 flowing formats (ePub and similar).

 pandoc seems to be able to do that from DocBook, so tying this to a
 LyX "Converter" should be possible, but otherwise a Makefile will
 work for most.

If that works I will even pare down our handbook (850 pages, 25 child
documents) which uses a lot of stuff (Makefile of 500 lines) so it
compile to ePub and we can distribute it internally as such.

That said, Steve is not wrong, but this (at least changing LyX's native
format to XML) seems to be a major undertaking.

greetings, el

On 17/06/2021 10:24, Jean-Marc Lasgouttes wrote:

Le 17/06/2021 à 03:24, Steve Litt a écrit :

What we need, and we've needed for over a decade is a real, style for
style, syntactically complete HTML export, or lacking that, finally
finish the job, started a decade ago, of making LyX' native language
format valid and well formed XML. Do that and I'll make a LyX to
(x)HTML converter that drops no styles nor adds styles for silly
stuff like not indenting the first paragraph in a sequence of
same-styled paragraphs, and is suitable for a high quality ePub and
other flowing text eBooks.


DocBook5 is coming. Does this fit your needs?

JMarc


--
To email me replace 'nospam' with 'el'

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-17 Thread Dr Eberhard Lisse

We figured it out off line.

We downloaded the file with wget and that got us pure MarkDown, which
was very amendable to pandoc conversion.

I wrote a 15 line template file, or rather pruned the standard one to
the minimum required to work, ie using Komascript and Listings (plus
Landscape) and that did the trick very well.

10 Minutes of work.

greetings, el

On 16/06/2021 22:47, Paul A. Rubin wrote:

On 6/16/21 4:12 PM, Dr Eberhard Lisse wrote:


Using R is a little overkill in my view, but if it works it works
:-)-O


It's a bit indirect, but for users of the RStudio IDE, you just open
RStudio, open the .md file and click the "Knit to PDF" toolbar button
and you're done (unless you don't like the way the PDF turned out).
In my case, it would save having to look up the command syntax.

Paul




--
To email me replace 'nospam' with 'el'

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-17 Thread Jean-Marc Lasgouttes

Le 17/06/2021 à 03:24, Steve Litt a écrit :

What we need, and we've needed for over a decade is a real, style for
style, syntactically complete HTML export, or lacking that, finally
finish the job, started a decade ago, of making LyX' native language
format valid and well formed XML. Do that and I'll make a LyX to
(x)HTML converter that drops no styles nor adds styles for silly stuff
like not indenting the first paragraph in a sequence of same-styled
paragraphs, and is suitable for a high quality ePub and other flowing
text eBooks.


DocBook5 is coming. Does this fit your needs?

JMarc
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Jack Lyon

Steve Litt wrote:

"What we need, and we've needed for over a decade is a real, style for
style, syntactically complete HTML export, or lacking that, finally
finish the job, started a decade ago, of making LyX' native language
format valid and well formed XML. Do that and I'll make a LyX to
(x)HTML converter that drops no styles nor adds styles for silly stuff
like not indenting the first paragraph in a sequence of same-styled
paragraphs, and is suitable for a high quality ePub and other flowing
text eBooks."

Yes, please! That would be wonderful! Thank you!

Best wishes,
Jack Lyon
The Editorium
http://www.editorium.com


On 6/16/2021 7:24 PM, Steve Litt wrote:

Paul Smith said on Wed, 16 Jun 2021 22:13:15 +0100


On Wed, Jun 16, 2021 at 9:48 PM Paul A. Rubin 
wrote:
  

Using R is a little overkill in my view, but if it works it works
:-)-O

It's a bit indirect, but for users of the RStudio IDE, you just open
RStudio, open the .md file and click the "Knit to PDF" toolbar button
and you're done (unless you don't like the way the PDF turned out).
In my case, it would save having to look up the command syntax.

I believe that a much needed development avenue that LyX could take is
to become able to export to markdown. Something like the following,
but builtin natively:

https://wiki.lyx.org/Tips/ConvertMarkdown

Just understand that you'll lose a lot of styles information in a
conversion of LyX to Markdown. LyX enables you to create and use any
number of arbitrary character and paragraph styles. Markdown allows
only a short list of predefined styles, so the LyX styles must be
shoehorned into Markdown.

What might be more interesting is a Markdown *import*. LyX, equipped
with a Markdown layout file, could easily print Markdown to pdf, or use
it as part of a larger LyX work.

What we need, and we've needed for over a decade is a real, style for
style, syntactically complete HTML export, or lacking that, finally
finish the job, started a decade ago, of making LyX' native language
format valid and well formed XML. Do that and I'll make a LyX to
(x)HTML converter that drops no styles nor adds styles for silly stuff
like not indenting the first paragraph in a sequence of same-styled
paragraphs, and is suitable for a high quality ePub and other flowing
text eBooks.


SteveT

Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Steve Litt
Paul Smith said on Wed, 16 Jun 2021 22:13:15 +0100

>On Wed, Jun 16, 2021 at 9:48 PM Paul A. Rubin 
>wrote:
>>  
>> > Using R is a little overkill in my view, but if it works it works
>> > :-)-O  
>> It's a bit indirect, but for users of the RStudio IDE, you just open
>> RStudio, open the .md file and click the "Knit to PDF" toolbar button
>> and you're done (unless you don't like the way the PDF turned out).
>> In my case, it would save having to look up the command syntax.  
>
>I believe that a much needed development avenue that LyX could take is
>to become able to export to markdown. Something like the following,
>but builtin natively:
>
>https://wiki.lyx.org/Tips/ConvertMarkdown

Just understand that you'll lose a lot of styles information in a
conversion of LyX to Markdown. LyX enables you to create and use any
number of arbitrary character and paragraph styles. Markdown allows
only a short list of predefined styles, so the LyX styles must be
shoehorned into Markdown.

What might be more interesting is a Markdown *import*. LyX, equipped
with a Markdown layout file, could easily print Markdown to pdf, or use
it as part of a larger LyX work.

What we need, and we've needed for over a decade is a real, style for
style, syntactically complete HTML export, or lacking that, finally
finish the job, started a decade ago, of making LyX' native language
format valid and well formed XML. Do that and I'll make a LyX to
(x)HTML converter that drops no styles nor adds styles for silly stuff
like not indenting the first paragraph in a sequence of same-styled
paragraphs, and is suitable for a high quality ePub and other flowing
text eBooks.


SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Paul Smith
On Wed, Jun 16, 2021 at 9:48 PM Paul A. Rubin  wrote:
>
> > Using R is a little overkill in my view, but if it works it works :-)-O
> It's a bit indirect, but for users of the RStudio IDE, you just open
> RStudio, open the .md file and click the "Knit to PDF" toolbar button
> and you're done (unless you don't like the way the PDF turned out). In
> my case, it would save having to look up the command syntax.

I believe that a much needed development avenue that LyX could take is
to become able to export to markdown. Something like the following,
but builtin natively:

https://wiki.lyx.org/Tips/ConvertMarkdown

Paul
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Paul A. Rubin

On 6/16/21 4:12 PM, Dr Eberhard Lisse wrote:


Using R is a little overkill in my view, but if it works it works :-)-O
It's a bit indirect, but for users of the RStudio IDE, you just open 
RStudio, open the .md file and click the "Knit to PDF" toolbar button 
and you're done (unless you don't like the way the PDF turned out). In 
my case, it would save having to look up the command syntax.


Paul


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Dr Eberhard Lisse

Pandoc does Markdown to LaTeX (to PDF) just fine.

I use something like

pandoc --wrap=none -f markdown-auto_identifiers \
-t latex --template=/Users/el/pantemplates/mytemplate.tex \
filename.markdown > filename.tex

where I took one of the LaTeX templates and modified it to my liking.

-t pdf

should also work, but I haven't tried this, so I don't know what
converter it takes.

Using R is a little overkill in my view, but if it works it works :-)-O

greetings, el


On 2021-06-16 19:56 , Paul Smith wrote:

On Wed, Jun 16, 2021 at 5:27 PM Rich Shepard  wrote:


I've an .md file that I want to convert to .pdf.  Using pandoc I get
a .pdf that's all in html.  Can lyx help me convert the .md to a
clean text (with code) .pdf?


You can use R for that, Rich.  Just open your .md file in R and
preview it in PDF. I have just tested this approach and it works.

Paul


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Rich Shepard

On Wed, 16 Jun 2021, Paul Smith wrote:


You can use R for that, Rich. Just open your .md file in R and preview it
in PDF. I have just tested this approach and it works.


Paul,

How interesting! Thanks for the insight.

Regards,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Converting markdown to PDF

2021-06-16 Thread Paul Smith
On Wed, Jun 16, 2021 at 5:27 PM Rich Shepard  wrote:
>
> I've an .md file that I want to convert to .pdf. Using pandoc I get a .pdf
> that's all in html. Can lyx help me convert the .md to a clean text (with
> code) .pdf?

You can use R for that, Rich. Just open your .md file in R and preview
it in PDF. I have just tested this approach and it works.

Paul
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Converting markdown to PDF

2021-06-16 Thread Rich Shepard

I've an .md file that I want to convert to .pdf. Using pandoc I get a .pdf
that's all in html. Can lyx help me convert the .md to a clean text (with
code) .pdf?

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users