Thread overview | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 24, 2017 A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. |
January 24, 2017 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba Attachments:
| 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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 Re: A mini D book: Markdown or LaTeX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | 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/ |
Copyright © 1999-2021 by the D Language Foundation