jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.03k stars 3.35k forks source link

LaTeX newline within tables #2185

Closed fNek closed 9 years ago

fNek commented 9 years ago

Steps to reproduce:

Convert an HTML table to LaTeX. The HTML table contains <br/> tags. (There is no reason to assume that this applies exclusively to HTML as a source format)

Expected outcome:

Pandoc notices that it appears in a table and outputs \newline.

Actual outcome:

Pandoc outputs \, ending the row in the table.

Further information:

pandoc -v

pandoc 1.12.2.1
Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
    modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
    octave, pascal, perl, php, pike, postscript, prolog, python, r,
    relaxngcompact, rhtml, roff, ruby, rust, scala, scheme, sci, sed, sgml, sql,
    sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml
Default user data directory: /home/martin/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.
nkalvi commented 9 years ago

@fNek Pandoc 1.14 was released a few hours ago. Could you please try your source with it? 1.14 includes the following changes:

  • LaTeX writer:
    • Use \tabularnewline instead of \\ in table cells (Jose Luis Duran).
fNek commented 9 years ago

Seems to be fixed. Thank you. Sorry for not checking the kind-of obvious.

jlduran commented 9 years ago

This should have been fixed in 0c18f3a854efaba54367f66d0f572afcab7d57f0.

fNek commented 9 years ago

I don't see how that commit affects this bug. All it does is add a newline in the source code for newlines in the text.