Jump to page: 1 24  
Page
Thread overview
A mini D book: Markdown or LaTeX?
Jan 24, 2017
aberba
Jan 24, 2017
bachmeier
Jan 24, 2017
Russel Winder
Jan 24, 2017
bachmeier
Jan 25, 2017
Russel Winder
Jan 25, 2017
Mike Parker
Jan 25, 2017
bachmeier
Jan 25, 2017
Chris
Jan 25, 2017
bachmeier
Jan 25, 2017
Chris
Jan 24, 2017
Jonathan M Davis
Jan 24, 2017
qznc
Jan 25, 2017
Russel Winder
Jan 24, 2017
Antonio Corbi
Jan 25, 2017
Chris Wright
Jan 25, 2017
rikki cattermole
Jan 25, 2017
Russel Winder
Jan 27, 2017
Kagamin
Jan 25, 2017
Chris
Jan 25, 2017
Chris Wright
Jan 26, 2017
Chris
Jan 27, 2017
Kagamin
Jan 27, 2017
Chris
Jan 27, 2017
jmh530
Jan 28, 2017
Kagamin
Jan 26, 2017
Walter Bright
Jan 26, 2017
qznc
Jan 26, 2017
Walter Bright
Jan 26, 2017
aberba
Jan 26, 2017
Walter Bright
Jan 27, 2017
Chris
Jan 28, 2017
Walter Bright
Jan 27, 2017
Chris
Jan 27, 2017
Jesse Phillips
January 24, 2017
Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.
January 24, 2017
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

Unless you have a strong preference for LaTeX syntax, (Pandoc) markdown is the better choice. You can export to multiple formats, including .tex, and you can insert arbitrary LaTeX inside the .md file.

I use Pandoc for all of my class lecture notes, and by the end of the semester the full documents will be 180-300 pages, depending on the class. I convert .md to .tex to .pdf, but when I want to pull parts out to post on the website, I copy the markdown into a new file and convert to html.
January 24, 2017
On Tue, 2017-01-24 at 14:27 +0000, aberba via Digitalmars-d wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

I wouldn't use Markdown for such a project.

Personally I would probably use XeLaTeX. Many people might choose Asciidoctor.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

January 24, 2017
On Tuesday, January 24, 2017 14:27:15 aberba via Digitalmars-d wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

You could always use ddoc and then convert that to latex or html or markdown or whatever, since ddoc is a macro language.

- Jonathan M Davis

January 24, 2017
On Tuesday, 24 January 2017 at 15:02:26 UTC, Russel Winder wrote:

> I wouldn't use Markdown for such a project.

Is there a reason?

> Many people might choose Asciidoctor.

When I looked at asciidoc, it looked like markdown with extensions.
January 24, 2017
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

I used Sphinx here: https://qznc.github.io/d-tut/

The syntax "ReStructured Text" is more ugly than Markdown, but has more features (e.g. different kinds of blocks). Sphinx can generate HTML, LaTeX, EPub, and more.

http://www.sphinx-doc.org/
January 24, 2017
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

If you are an emacs user, probably you have heard about org-mode (http://orgmode.org/).

With its new export-backend, you write your text in org-mode (very similar to markdown) and then you can export to (almost) whatever you want.

Have a look at this opensource book about Operating Systems, it is written with org-mode: https://github.com/gwolf/sistop

Antonio
January 25, 2017
On Tue, 24 Jan 2017 14:27:15 +0000, aberba wrote:

> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

Markdown produces HTML. You can use any tool that works with HTML to modify its output.

If you intend to publish the book, then you should probably find out what your publisher needs. You can use anything you want until you send it to the publisher, obviously, but there's good odds they'll want to use Word with comments and change tracking.

I currently use Subtex for most of my writing, but I'm not trying to
publish:
https://github.com/dhasenan/subtex

It's probably not appropriate for what you're doing.
January 25, 2017
On 25/01/2017 3:27 AM, aberba wrote:
> Which one works well? I'm more concerned about syntax highlighting and
> line numbering (in some cases). Support for custom fonts.

I've used leanpub for my two books, it is now $100 per book (one time).
Leanpub uses Markdown as input format and produces pdf, epub and mobi.

Over all, it was a very nice experience and yes it does support code blocks for D.
January 25, 2017
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
> Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts.

If you don't mind XML then you might consider http://docbook.org/

« First   ‹ Prev
1 2 3 4