www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - A mini D book: Markdown or LaTeX?

reply aberba <karabutaworld gmail.com> writes:
Which one works well? I'm more concerned about syntax 
highlighting and line numbering (in some cases). Support for 
custom fonts.
Jan 24 2017
next sibling parent bachmeier <no spam.net> writes:
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.
Jan 24 2017
prev sibling next sibling parent Jonathan M Davis via Digitalmars-d <digitalmars-d puremagic.com> writes:
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
Jan 24 2017
prev sibling next sibling parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2017-01-24 at 14:27 +0000, aberba via Digitalmars-d wrote:
 Which one works well? I'm more concerned about syntax=C2=A0
 highlighting and line numbering (in some cases). Support for=C2=A0
 custom fonts.
I wouldn't use Markdown for such a project. Personally I would probably use XeLaTeX. Many people might choose Asciidoctor. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jan 24 2017
parent reply bachmeier <no spam.net> writes:
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.
Jan 24 2017
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2017-01-24 at 16:38 +0000, bachmeier via Digitalmars-d wrote:
 On Tuesday, 24 January 2017 at 15:02:26 UTC, Russel Winder wrote:
=20
 I wouldn't use Markdown for such a project.
=20 Is there a reason?
Unless life has changed, the support for indexing, tables of contents, floating images, tables, etc. is missing from Markdown. =20
 Many people might choose Asciidoctor.
=20 When I looked at asciidoc, it looked like markdown with=C2=A0 extensions.
Or put another way Markdown is a stripped down Asciidoctor (or ReStructuredText) for creating single HTML pages with no complicated content. Word (or if you are lucky LibreOffice) is the way most publishers want authors to write. XeLaTeX and Asciidoctor (as a front end to a DocBook/XML toolchain) are the route for end-user construction of press PDF. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jan 25 2017
next sibling parent Mike Parker <aldacron gmail.com> writes:
On Wednesday, 25 January 2017 at 11:01:14 UTC, Russel Winder 
wrote:

 Or put another way Markdown is a stripped down Asciidoctor (or 
 ReStructuredText) for creating single HTML pages with no 
 complicated content.
There are packages out there that can get generate some decent looking output, like Gitbook and Mkdocs. Scrivener also has Markdown support and can compile it to all of its normal output targets (epub, mobi, pdf, html, etc..).
Jan 25 2017
prev sibling parent reply bachmeier <no spam.net> writes:
On Wednesday, 25 January 2017 at 11:01:14 UTC, Russel Winder 
wrote:
 On Tue, 2017-01-24 at 16:38 +0000, bachmeier via Digitalmars-d 
 wrote:
 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?
Unless life has changed, the support for indexing, tables of contents, floating images, tables, etc. is missing from Markdown.
I see. You were referring to the original Markdown specification, which does not have those features. There are many extensions, though, like https://bookdown.org/
Jan 25 2017
parent reply Chris <wendlec tcd.ie> writes:
On Wednesday, 25 January 2017 at 14:37:31 UTC, bachmeier wrote:
 I see. You were referring to the original Markdown 
 specification, which does not have those features. There are 
 many extensions, though, like https://bookdown.org/
Nice. How does "bookdown" or any other extension fare regarding fine grained layout control à la LaTeX?
Jan 25 2017
parent reply bachmeier <no spam.net> writes:
On Wednesday, 25 January 2017 at 14:51:58 UTC, Chris wrote:
 On Wednesday, 25 January 2017 at 14:37:31 UTC, bachmeier wrote:
 I see. You were referring to the original Markdown 
 specification, which does not have those features. There are 
 many extensions, though, like https://bookdown.org/
Nice. How does "bookdown" or any other extension fare regarding fine grained layout control à la LaTeX?
It is a layer on top of Pandoc with useful extensions for creating books. Pandoc allows you to add arbitrary LaTeX code to the document, so AFAIK, you should be able to do anything you can do with LaTeX. Most of that would be handled with modifications to the .latex template or with a yaml section at the top of the document.
Jan 25 2017
parent Chris <wendlec tcd.ie> writes:
On Wednesday, 25 January 2017 at 16:29:18 UTC, bachmeier wrote:
 On Wednesday, 25 January 2017 at 14:51:58 UTC, Chris wrote:
 Nice. How does "bookdown" or any other extension fare 
 regarding fine grained layout control à la LaTeX?
It is a layer on top of Pandoc with useful extensions for creating books. Pandoc allows you to add arbitrary LaTeX code to the document, so AFAIK, you should be able to do anything you can do with LaTeX. Most of that would be handled with modifications to the .latex template or with a yaml section at the top of the document.
The best of both worlds, in other words.
Jan 25 2017
prev sibling next sibling parent reply qznc <qznc web.de> writes:
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/
Jan 24 2017
parent Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2017-01-24 at 19:34 +0000, qznc via Digitalmars-d wrote:
 On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
 Which one works well? I'm more concerned about syntax=C2=A0
 highlighting and line numbering (in some cases). Support for=C2=A0
 custom fonts.
=20 I used Sphinx here: https://qznc.github.io/d-tut/ =20 The syntax "ReStructured Text" is more ugly than Markdown, but=C2=A0 has more features (e.g. different kinds of blocks). Sphinx can=C2=A0 generate HTML, LaTeX, EPub, and more. =20 http://www.sphinx-doc.org/
ReStructuredText and Sphinx is used in many places, but much of it is ugly, particularly compared to Asciidoctor (which has it's own warts) and XeLaTeX (which also has some). In the end it all gets tribal, and is down to personal taste. I am sad for the demise of FrameMaker on Solaris. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jan 25 2017
prev sibling next sibling parent Antonio Corbi <amcb ggmail.com> writes:
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
Jan 24 2017
prev sibling next sibling parent Chris Wright <dhasenan gmail.com> writes:
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.
Jan 24 2017
prev sibling next sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
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.
Jan 24 2017
prev sibling next sibling parent reply Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
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/
Jan 25 2017
parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Wed, 2017-01-25 at 09:21 +0000, Ola Fosheim Gr=C3=B8stad via Digitalmars=
-
d wrote:
 On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote:
 Which one works well? I'm more concerned about syntax=C2=A0
 highlighting and line numbering (in some cases). Support for=C2=A0
 custom fonts.
=20 If you don't mind XML then you might consider http://docbook.org/
Asciidoc (and it's continuation Asciidoctor) was invented to be a human usable front end to the DocBook/XML toolchain =E2=80=93 and it still works = for this. Humans should not have to write XML. Hence Asciidoctor. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jan 25 2017
next sibling parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= writes:
On Wednesday, 25 January 2017 at 10:57:41 UTC, Russel Winder 
wrote:
 Asciidoc (and it's continuation Asciidoctor) was invented to be 
 a human usable front end to the DocBook/XML toolchain – and it 
 still works for this. Humans should not have to write XML. 
 Hence Asciidoctor.
I might look into Asciidoc at some point then. There are decent grammar-directed XML editors out there, and plain XML is ok too in my opinion. As you mentioned OpenOffice also has some support for docbook filters. Another option is to do your own XML based off HTML5 if HTML is a primary target.
Jan 25 2017
prev sibling parent Kagamin <spam here.lot> writes:
On Wednesday, 25 January 2017 at 10:57:41 UTC, Russel Winder 
wrote:
 Asciidoc (and it's continuation Asciidoctor) was invented to be 
 a human usable front end to the DocBook/XML toolchain – and it 
 still works for this. Humans should not have to write XML. 
 Hence Asciidoctor.
DocBook FTW, other magical formats are beyond pathetic. What? Asccidoc, Asciidoctor, Markdown, SO Markdown, GH Markdown, this Markdown, that Markdown, Restructured text, yaml, TeX, LaTeX, XeLaTeX, people invented tons of formats just to markup text for books and tons of their clones, extensions and incompatibilities, it's just laughable. Guess what % character means it those magical languages, or why Markdown chose an opposite approach to BBcode for square brackets, because it's more fun this way? XML is one uniform regular readable syntax for everything, it consists of only tags, attributes and comments, no arbitrary magical special characters for god only knows what.
Jan 27 2017
prev sibling next sibling parent reply Chris <wendlec tcd.ie> writes:
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.
Depends on what you want to achieve. LaTeX has loads of packages that can be installed and you can create professional looking layouts. It is quite impressive. I know people who write articles and their Ph.D. thesis in LaTeX to get maximum control over the layout (to avoid Word-like surprises). LaTeX is accepted by many publishers, printers etc., especially in the tech sector. The downside is the source code. It's not very nice to read and you get lost easily. And try to get back after a year and change something! Also, you have to convert it to PDF each time you wanna (proof)read it, so you usually deal with two layouts at the same time (source code and PDF/HTML), which is time consuming and error prone. From what I can see, Markdown is much nicer to read and you don't need to switch between source code and layout all the time, but it is rather limited in comparison to LaTeX. You wouldn't have the fine grained control over the layout and you would most likely have to convert it to something else before you can send it to a publisher / printer. They don't want to waste time with exotic or lesser known formats, because they have their own infrastructure set up, which leads me to the next point. A lot of publishers will prefer Word, because they can easily edit it and if they have their own layout section, they will transform Word to txt and paste it into say Adobe InDesign. So if you want to publish privately on your homepage or blog, pick whatever you want. If you want to publish on one of those self-publishing websites, check what they support. If you want the old fashioned publisher ask them first what format they want. Believe me, you can safe a lot of time. Imagine you create the perfect layout with LaTeX and then the publisher goes "Thanks, er, can you please send it to me as a Word doc?" I for my part have stopped worrying about it too much. Just write the text (in Word or an Ascii editor) and think about the layout later. It helps you to focus on the content rather than on the optical structure - and if you have to change, add, delete or re-arrange things, it won't cause you any headaches. Write first, design later.
Jan 25 2017
parent reply Chris Wright <dhasenan gmail.com> writes:
On Wed, 25 Jan 2017 11:58:45 +0000, Chris wrote:

 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 know people who write articles and their Ph.D. thesis in LaTeX to get maximum control over the layout (to avoid Word-like surprises).
If you are submitting a paper to an academic journal, they will tell you what format they expect. If you sent a paper as a Word document when they require LaTeX, they will reject it with a note telling you to use LaTeX instead. Conversely, if they expect Word documents, they will reject anything in LaTeX. As a PhD student, your advisor will tell you what format to use. This will almost certainly match the most commonly used file format for journal submissions in your field. Regardless, you want *consistency* more than control. If you submit to a CS journal, they will often give you a .sty file -- this sets up page layout and the like, taking control away from the writer of the article. If you submit to a humanities journal, they might have a Word document template. They might also simply give style requirements that you must obey.
 The downside is the source code.
 It's not very nice to read and you get lost easily. And try to get back
 after a year and change something!
It's like C++. If you use the same restricted subset that you understand concretely, you shouldn't have a bad time. If you use a different set of packages and macros every document, you're in for a world of hurt.
 Also, you have to convert it to PDF
 each time you wanna (proof)read it, so you usually deal with two layouts
 at the same time (source code and PDF/HTML), which is time consuming and
 error prone.
It separates the writing / editing process from the proofing process and gives you a significantly different format for proofing. This is helpful for catching errors. I wouldn't use htlatex. Instead of a simple <em> or <i> tag, it produces <span class="autogenerated-i-1"> type things. Which is okay if you just want to throw it up online, but if you want to produce an ebook with maximum compatibility, simpler HTML is better.
 A lot of publishers will prefer Word, because they can easily edit it
 and if they have their own layout section, they will transform Word to
 txt and paste it into say Adobe InDesign.
Change tracking and commenting are the huge things publishers use Word for.
 I for my part have stopped worrying about it too much. Just write the
 text (in Word or an Ascii editor)
If it's a few pages, it's painful and error-prone to retro-add formatting once you finished the content. If it's a hundred pages, you might need to spend several weeks to format it. That doesn't seem like a good tradeoff to me.
Jan 25 2017
parent reply Chris <wendlec tcd.ie> writes:
On Wednesday, 25 January 2017 at 20:07:22 UTC, Chris Wright wrote:
 On Wed, 25 Jan 2017 11:58:45 +0000, Chris wrote:

 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 know people who write articles and their Ph.D. thesis in LaTeX to get maximum control over the layout (to avoid Word-like surprises).
If you are submitting a paper to an academic journal, they will tell you what format they expect. If you sent a paper as a Word document when they require LaTeX, they will reject it with a note telling you to use LaTeX instead. Conversely, if they expect Word documents, they will reject anything in LaTeX.
They usually accept both Word and LaTeX and provide templates. I've never heard of LaTeX only though, because a lot of academics wouldn't want to use it - and shouldn't be forced to.
 As a PhD student, your advisor will tell you what format to 
 use. This will almost certainly match the most commonly used 
 file format for journal submissions in your field.
Not true. It's about what the printing company accepts - and they are usually fine with LaTeX or a PDF generated out of it. A Ph.D. thesis still has to be printed and bound. I think PDF is accepted for digital storage.
 Regardless, you want *consistency* more than control. If you 
 submit to a CS journal, they will often give you a .sty file -- 
 this sets up page layout and the like, taking control away from 
 the writer of the article. If you submit to a humanities 
 journal, they might have a Word document template. They might 
 also simply give style requirements that you must obey.
Er, yes. That's how it works. Always ask the publisher first. But that wasn't the question. The question was Markdown or LaTeX, and if you want to generate your own PDF for e.g. a M.A. or Ph.D., some people prefer LaTeX because of the fine grained control it offers. I don't know a single Ph.D. student who used Word who didn't have to fight with Word stubbornly restructuring the layout. The footnotes, the graphics ... a nightmare.
 The downside is the source code.
 It's not very nice to read and you get lost easily. And try to 
 get back
 after a year and change something!
It's like C++. If you use the same restricted subset that you understand concretely, you shouldn't have a bad time. If you use a different set of packages and macros every document, you're in for a world of hurt.
Unfortunately, you need to add packages for various reasons, e.g. IPA (not the beer!) and Maths extensions, formatting extensions etc. The odd macro will also make sense.
 Also, you have to convert it to PDF
 each time you wanna (proof)read it, so you usually deal with 
 two layouts
 at the same time (source code and PDF/HTML), which is time 
 consuming and
 error prone.
It separates the writing / editing process from the proofing process and gives you a significantly different format for proofing. This is helpful for catching errors.
It is helpful to catch errors (cf. the "Save and preview" function on this forum), that's why I always read my LibreOffice documents as PDF as well. However, constantly switching between two representations introduces additional errors.
 I wouldn't use htlatex. Instead of a simple <em> or <i> tag, it 
 produces <span class="autogenerated-i-1"> type things. Which is 
 okay if you just want to throw it up online, but if you want to 
 produce an ebook with maximum compatibility, simpler HTML is 
 better.

 A lot of publishers will prefer Word, because they can easily 
 edit it and if they have their own layout section, they will 
 transform Word to txt and paste it into say Adobe InDesign.
Change tracking and commenting are the huge things publishers use Word for.
Yes, if they edit it on the screen. Some editors remove all formatting, print it and read it on the paper. Formatting and change tracking is not always advisable, because it can introduce errors like notes or tracked changes that are exported alongside the normal text. You'd be surprised at how many writers spend hours fighting with Word, trying to format everything only to have it removed by the editor. Either you are given a template / style guide to adhere to, in which case they probably have an automatic conversion tool, or you shouldn't bother too much with formatting, because they have their in-house layout crew.
 I for my part have stopped worrying about it too much. Just 
 write the text (in Word or an Ascii editor)
If it's a few pages, it's painful and error-prone to retro-add formatting once you finished the content. If it's a hundred pages, you might need to spend several weeks to format it. That doesn't seem like a good tradeoff to me.
Usually you only add "Header (1, 2, 3)" etc. Of course, emphasis (bold, italic etc.). has to be marked in the text somehow, else you'll never find it again. Then you can add / insert the graphics and tables. Not too big a deal. It's worse having to restructure an existing layout I think.
Jan 26 2017
parent reply Kagamin <spam here.lot> writes:
On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote:
 Er, yes. That's how it works. Always ask the publisher first. 
 But that wasn't the question. The question was Markdown or 
 LaTeX, and if you want to generate your own PDF for e.g. a M.A. 
 or Ph.D., some people prefer LaTeX because of the fine grained 
 control it offers. I don't know a single Ph.D. student who used 
 Word who didn't have to fight with Word stubbornly 
 restructuring the layout. The footnotes, the graphics ... a 
 nightmare.
I believe I just used the default Word style. It's a goddamned text, why it needs any sort of sophisticated layout aside from fitting the page? I had no problem with footnotes maybe because I believe they shouldn't exists in such documents in the first place: if you want to write something, just write it where it fits. It's baffling to see footnotes in ISO standards: if it's something important, write it where it belongs, W3C and IETF got it right, their documents have no footnotes.
Jan 27 2017
parent reply Chris <wendlec tcd.ie> writes:
On Friday, 27 January 2017 at 11:05:41 UTC, Kagamin wrote:
 On Thursday, 26 January 2017 at 10:26:25 UTC, Chris wrote:
 Er, yes. That's how it works. Always ask the publisher first. 
 But that wasn't the question. The question was Markdown or 
 LaTeX, and if you want to generate your own PDF for e.g. a 
 M.A. or Ph.D., some people prefer LaTeX because of the fine 
 grained control it offers. I don't know a single Ph.D. student 
 who used Word who didn't have to fight with Word stubbornly 
 restructuring the layout. The footnotes, the graphics ... a 
 nightmare.
I believe I just used the default Word style. It's a goddamned text, why it needs any sort of sophisticated layout aside from fitting the page? I had no problem with footnotes maybe because I believe they shouldn't exists in such documents in the first place: if you want to write something, just write it where it fits. It's baffling to see footnotes in ISO standards: if it's something important, write it where it belongs, W3C and IETF got it right, their documents have no footnotes.
Yes, you are right of course. In a perfect world we'd just write a text and give the odd reference. Unfortunately, anyone who writes an M.A., M.Sc. or Ph.D. thesis has to reference everything. Not even the most basic concept can be mentioned without referencing a book written by some professor(s). If a student writes "1 + 1 = 2" s/he has to reference it with a footnote à la "[1] Smith, T. & Wesson, J. Basic Concepts of Arithmetics - An Introduction. Cambridge, 2001." If you fail to do so, they will grill you. I know, it's ridiculous. Having said this, depending on the topic, you do need to insert footnotes - either to guide / help your readers or to shut up potential critics :-)
Jan 27 2017
next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Friday, 27 January 2017 at 12:02:01 UTC, Chris wrote:
 Yes, you are right of course. In a perfect world we'd just 
 write a text and give the odd reference. Unfortunately, anyone 
 who writes an M.A., M.Sc. or Ph.D. thesis has to reference 
 everything. Not even the most basic concept can be mentioned 
 without referencing a book written by some professor(s). If a 
 student writes "1 + 1 = 2" s/he has to reference it with a 
 footnote à la "[1] Smith, T. & Wesson, J. Basic Concepts of 
 Arithmetics - An Introduction. Cambridge, 2001."

 If you fail to do so, they will grill you. I know, it's 
 ridiculous. Having said this, depending on the topic, you do 
 need to insert footnotes - either to guide / help your readers 
 or to shut up potential critics :-)
Law articles are the worst with footnotes. Sometimes they'll have a whole page of footnotes with like one line of text at the top.
Jan 27 2017
prev sibling parent Kagamin <spam here.lot> writes:
On Friday, 27 January 2017 at 12:02:01 UTC, Chris wrote:
 If a student writes "1 + 1 = 2" s/he has to reference it with a 
 footnote à la "[1] Smith, T. & Wesson, J. Basic Concepts of 
 Arithmetics - An Introduction. Cambridge, 2001."
Hmm... never saw such convention. Usually the author writes 1+1=2 [1] in text and full reference is in appendix under this number, this is also used in e.g. arxiv.org publications, then footnotes are used for explanations and supplementary comments. Another convention is when you write an unnumbered short reference sort of 1+1=2 (2001, Smith et al.) and full reference is again in appendix.
Jan 28 2017
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/24/2017 6: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 Ddoc to publish a couple of Kindle books.
Jan 25 2017
next sibling parent reply qznc <qznc web.de> writes:
On Thursday, 26 January 2017 at 02:41:24 UTC, Walter Bright wrote:
 On 1/24/2017 6: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 Ddoc to publish a couple of Kindle books.
https://www.amazon.com/s/ref=dp_byline_sr_ebooks_1?ie=UTF8&text=Walter+Bright&search-alias=digital-text&field-author=Walter+Bright&sort=relevancerank "The Historian's History of the World Vol. 1: Prolegomena: Egypt, Mesopotamia" What about Vol. 2? ;)
Jan 26 2017
parent Walter Bright <newshound2 digitalmars.com> writes:
On 1/26/2017 1:12 AM, qznc wrote:
 "The Historian's History of the World Vol. 1: Prolegomena: Egypt, Mesopotamia"

 What about Vol. 2? ;)
Too much work :-(
Jan 26 2017
prev sibling parent reply aberba <karabutaworld gmail.com> writes:
On Thursday, 26 January 2017 at 02:41:24 UTC, Walter Bright wrote:
 On 1/24/2017 6: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 Ddoc to publish a couple of Kindle books.
Ddoc seem like a more straight foward approach for documenting code but for an ebook, the lack of tables, images, and other typesettings (without using HTML) makes it inappropriate for my use case. Will most likely go with markdown and use other solutions for theming it. Then pandoc it to PDF Asiicdoc seem to be more capable but the extra learning curve is ...
Jan 26 2017
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/26/2017 7:02 AM, aberba wrote:
 Ddoc seem like a more straight foward approach for documenting code but for an
 ebook, the lack of tables, images, and other typesettings (without using HTML)
 makes it inappropriate for my use case.
I did this book: https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/ It uses tables, images, and multiple fonts, all with Ddoc. It's not perfect, and the Kindle encoding has limitations, but I was able to get it remarkably close to the way the original book looked. Of course, your specific requirements may preclude this, but Ddoc is very capable.
Jan 26 2017
parent reply Chris <wendlec tcd.ie> writes:
On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote:
 On 1/26/2017 7:02 AM, aberba wrote:


 I did this book:

 https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/
Is it the same as this: https://www.kobo.com/ie/en/ebook/the-historians-history-of-the-world-in-twenty-five-volumes-prolegomena-egypt-mesopotamia It's €3.99 there and only £1.50 (€1.76) on Amazon. However, I don't do kindle. I recently got interested in exactly this topic, especially Mesopotamia. Would it be a good introduction?
Jan 27 2017
parent Walter Bright <newshound2 digitalmars.com> writes:
On 1/27/2017 2:51 AM, Chris wrote:
 On Thursday, 26 January 2017 at 23:28:37 UTC, Walter Bright wrote:
 On 1/26/2017 7:02 AM, aberba wrote:


 I did this book:

 https://www.amazon.com/Historians-History-World-Vol-Prolegomena-ebook/dp/B00REVL4BC/
Is it the same as this: https://www.kobo.com/ie/en/ebook/the-historians-history-of-the-world-in-twenty-five-volumes-prolegomena-egypt-mesopotamia It's €3.99 there and only £1.50 (€1.76) on Amazon. However, I don't do kindle. I recently got interested in exactly this topic, especially Mesopotamia. Would it be a good introduction?
Yes, it's the same book, but mine does a better job with the images and typography. Yes, it's a great introduction.
Jan 27 2017
prev sibling parent Chris <wendlec tcd.ie> writes:
On Thursday, 26 January 2017 at 15:02:33 UTC, aberba wrote:
 Will most likely go with markdown and use other solutions for 
 theming it. Then pandoc it to PDF
Markdown is also supported by vibe.d's diet templates.
Jan 27 2017
prev sibling parent Jesse Phillips <Jesse.K.Phillips+D gmail.com> writes:
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.
Well I worked with Latex, I hate it. If you do go that route here is some syntax highlighting https://github.com/JesseKPhillips/dlang-latex-listings If you would like to have your examples compiled/tested you can use/modify: https://github.com/JesseKPhillips/listings-dlang-extractor Enjoy finding the best typesetter for your project.
Jan 26 2017