aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2007-01-09Need to export TMPDIR in tempdir.sh.fiddlosopher1-0/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@482 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09On Cygwin, set TMPDIR to . before using mktemp. Otherwisefiddlosopher1-0/+7
one gets an error creating the output file in the /tmp directory. I haven't tracked this one down, but this should serve as a workaround. git-svn-id: https://pandoc.googlecode.com/svn/trunk@481 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Cleaned up markdown2pdf.in. Note that bibtex does not returnfiddlosopher1-4/+6
an error condition when it gives warnings, so instead we grep for warnings or error messages to see if we need to print the log. git-svn-id: https://pandoc.googlecode.com/svn/trunk@476 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Minor changes to markdown2pdf: removed an unnecessary '|| exit $?',fiddlosopher1-2/+2
and made sure error output goes to stderr. git-svn-id: https://pandoc.googlecode.com/svn/trunk@475 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Don't use named entities in docbook writer. Instead, usefiddlosopher1-4/+4
numerical entities, for portability across stylesheets. git-svn-id: https://pandoc.googlecode.com/svn/trunk@473 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Changes to markdown2pdf.in:fiddlosopher1-19/+36
+ Exit if pandoc fails (second time through) -- no need to store the log for this. + Run pdflatex up to three times, if needed to resolve references. Also run bibtex as needed. + Minor reformatting. git-svn-id: https://pandoc.googlecode.com/svn/trunk@469 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Minor cleanups in markdown2pdf.in.fiddlosopher1-19/+18
git-svn-id: https://pandoc.googlecode.com/svn/trunk@468 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09Moved up processing of --dump-args so that output file won'tfiddlosopher1-7/+7
be created first! git-svn-id: https://pandoc.googlecode.com/svn/trunk@465 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08+ Changed 'escapedChar' in Markdown reader so that only thefiddlosopher1-1/+8
characters Markdown escapes are escaped in strict mode. When not in strict mode, Pandoc allows all non-alphanumeric characters to be escaped. + Added documentation of backslash escapes to README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@461 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08+ Export TEXINPUTS variable.roktas1-0/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@460 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08Various fixes in markdown2pdf.roktas1-17/+20
+ Add a trailing ':' to TEXTINPUTS as per the instruction in TeX FAQ: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=graphicspath In the lack of it, pdflatex silently fails, for example, with the following command: 'TEXINPUTS=/tmp markdown2pdf' + Put the origdir at the front for the correct directory search order. + pdflatex didn't create log file on one occasion (the above command) that made sed commands failed. Test the existence of log before filtering it. + A few non-essential changes. git-svn-id: https://pandoc.googlecode.com/svn/trunk@459 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08Removed unneeded "export" statements.fiddlosopher1-7/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@458 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08Modified shell scripts to use new Pandoc --dump-args andfiddlosopher3-71/+70
--ignore-args features. This allows a simpler, cleaner design. Make use of TEXINPUTS environment variable to ensure that pdflatex will find images and other sources in the working directory from which markdown2pdf is called. git-svn-id: https://pandoc.googlecode.com/svn/trunk@456 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08Have pandoc return exit code 2 whenever a usage message isfiddlosopher1-3/+3
produced, even if it's because a bad option was specified. git-svn-id: https://pandoc.googlecode.com/svn/trunk@455 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08Changes to Pandoc's options to facilitate wrapper scripts:fiddlosopher1-19/+30
+ removed -d/--debug option + added --dump-args option, which prints the name of the output file (or '-' for STDOUT) and all the command-line arguments (excluding Pandoc options and their arguments), one per line, then exits. Note that special wrapper options will be treated as arguments if they follow '--' at the end of the command line. Thus, pandoc --dump-args -o foo.html foo.txt -- -e latin1 will print the following to STDOUT: foo.html foo.txt -e latin1 + added --ignore-args option, which causes Pandoc to ignore all (non-option) arguments, including any special options that occur after '--' at the end of the command line. + '-' now means STDIN as the name of an input file, STDOUT as the name of an output file. So, pandoc -o - - will take input from STDIN and print output to STDOUT. Note that if multiple '-o' options are specified on the same line, the last one takes precedence. So, in a script, pandoc "$@" -o - will guarantee output to STDOUT, even if the '-o' option was used. + documented these changes in man pages, README, and changelog. git-svn-id: https://pandoc.googlecode.com/svn/trunk@454 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Simplify regex.roktas1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@452 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07+ Revert previous commit which is wrong and insufficient on some parts.roktas1-14/+9
+ Improve sed filter to extract the following error contexts: 1. From a line starting with ! to the next blank line. 2. From a line beginning "LaTeX Warning:" to the next blank line. 3. From a line beginning "Error:" to the next blank line, or EOF. + Improve the error message headers (perhaps needs a proof reading). Prepend the wrapper name to the error headers for easy spotting. git-svn-id: https://pandoc.googlecode.com/svn/trunk@451 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07+ Fix a nasty bug in markdown2pdf. It used to send the log file toroktas1-3/+10
/dev/null! + Another problem is the sed filter which returns nothing with pdfeTeX '3.141592-1.21a-2.2 (Web2C 7.5.4)' here. As the first cut towards fixing, use a somewhat heuristic approach: try to build a short log by matching against a magic error stamp, dump the whole log if the previous attempt failed. Note that, there is still room to improve this code. git-svn-id: https://pandoc.googlecode.com/svn/trunk@450 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Added [breaklinks=true] to hyperref package in LaTeX header.fiddlosopher1-1/+1
This produces nicer-looking output by default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@449 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Small improvements to indentSpaces. (Allow combinationsfiddlosopher1-1/+2
of spaces and tabs.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@446 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Modified HTML output for Image elements, to conform tofiddlosopher1-3/+3
Markdown.pl: + title attribute comes after alt attribute + title is included even if null git-svn-id: https://pandoc.googlecode.com/svn/trunk@445 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07Fixed performance problems with '--strict' option:fiddlosopher2-17/+18
+ Replaced skipEndline with "option ' ' newline" where possible. + Replaced "notFollowedBy' header" in definition of endline with a faster but equally accurate test for a folliwng header. + Removed check at the beginning of 'reference' for a noteStart: This is not needed, because note comes before referenceKey in the definition of block. + Replaced check for a following anyHtmlBlockTag in autoLink with a check for anyHtmlTag or anyHtmlEndTag. + Other small code cleanups. git-svn-id: https://pandoc.googlecode.com/svn/trunk@444 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Fixed bug in Markdown reader's handling of underscores and otherfiddlosopher1-8/+14
inline formatting markers inside reference labels: for example, in '[A_B]: /url/a_b', the material between underscores was being parsed as emphasized inlines. git-svn-id: https://pandoc.googlecode.com/svn/trunk@442 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Added support for hexadecimal entities: e.g. ꂫfiddlosopher1-6/+6
git-svn-id: https://pandoc.googlecode.com/svn/trunk@441 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Allow '-S' option to be specified together with '--strict', if desired.fiddlosopher1-2/+1
Thus 'pandoc -S --strict -r markdown -w html' can replace the Markdown.pl/Smartypants combination. git-svn-id: https://pandoc.googlecode.com/svn/trunk@438 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Fixed serious performance problems with new Markdown reader:fiddlosopher2-13/+44
Instead of using lookahead to determine whether a single quote is an apostrophe, we now use state. Inside single quotes, a ' character won't be recognized as the beginning of a single quote. 'stateQuoteContext' has been added to keep track of this. git-svn-id: https://pandoc.googlecode.com/svn/trunk@437 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06Merged changes from 'quotes' branch since r431. Smart typographyfiddlosopher12-308/+383
is now handled in the Markdown and LaTeX readers, rather than in the writers. The HTML writer has been rewritten to use the prettyprinting library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@436 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-05Setup executable permissions on some files.roktas1-0/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@423 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-05Remove executable permission of hsmarkdown.in.roktas1-0/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@422 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-05Changed Markdown writer so that it does not use the single-bracketfiddlosopher1-1/+1
style of implicit reference link. It now uses [this style][], not [this style]. Reason: only newer, beta versions of Markdown allow the single-bracket style. git-svn-id: https://pandoc.googlecode.com/svn/trunk@419 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04Fixed small bug in consolidateList: added casefiddlosopher1-0/+1
for (Str a):Space:Space:rest. git-svn-id: https://pandoc.googlecode.com/svn/trunk@418 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04Refactored SGML escaping functions and "in tag" functions tofiddlosopher3-186/+186
Text/Shared/Pandoc. (escapeSGML, stringToSGML, inTag, inTagSimple, inTagIndented, selfClosingTag) These can be used by both the HTML and Docbook writers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@417 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04Fixed bug in encodeEntities (characters less than 128, not 127,fiddlosopher1-1/+1
should be encoded). git-svn-id: https://pandoc.googlecode.com/svn/trunk@416 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04Removed unneeded 'options' parameter from 'indentedInTags' functionfiddlosopher1-17/+17
in Docbook writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@413 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04+ Improved text wrapping algorithm in markdown, docbook, and RST writers.fiddlosopher4-11/+20
LineBreaks no longer cause ugly wrapping in Markdown output. + Replaced splitBySpace with the more general, polymorphic function splitBy (in Text/Pandoc/Shared). git-svn-id: https://pandoc.googlecode.com/svn/trunk@411 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-03Modified HTML reader to skip a newline following a <br> tag.fiddlosopher1-0/+1
Otherwise the newline will be treated as a space at the beginning of the next line. git-svn-id: https://pandoc.googlecode.com/svn/trunk@410 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-03Removed unneeded WRAPPER_ARGS and WRAPPEE_ARGS variablesfiddlosopher1-2/+0
from src/wrappers/common.sh. git-svn-id: https://pandoc.googlecode.com/svn/trunk@409 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02Modified main 'pandoc' program so that if it is called with programfiddlosopher1-7/+18
name = 'hsmarkdown' (e.g. through a symlink, on a system with real symbolic links), it will translate markdown to HTML in strict mode and interpret all command-line options as arguments, like Markdown.pl. git-svn-id: https://pandoc.googlecode.com/svn/trunk@405 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02Moved hsmarkdown to src/wrappers/hsmarkdown.in, so it worksfiddlosopher1-0/+5
with our existing build process. There's no harm in having it be a template, even though there's nothing to fill it. git-svn-id: https://pandoc.googlecode.com/svn/trunk@400 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02Change 'HtmlEntities' module to 'Entities'. Adjusted callingfiddlosopher6-20/+21
code accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@395 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02Use entities for all characters above 127 in docbook output.fiddlosopher2-12/+17
Though XML tools should support unicode, some people will be using SGML tools, and these do not. Using entities makes the docbook files more portable. Also refactored encodeEntities and charToHtmlEntity in HtmlEntities.hs git-svn-id: https://pandoc.googlecode.com/svn/trunk@394 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Changed representation of code blocks to use <screen> andfiddlosopher1-1/+1
escaped characters rather than <programlisting> and CDATA. Reason: XML source more easily editable and readable. git-svn-id: https://pandoc.googlecode.com/svn/trunk@393 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Removed a line that was causing a compiler warning in docbookfiddlosopher1-1/+0
writer. The line isn't necessary, since we have a case for every kind of block element. git-svn-id: https://pandoc.googlecode.com/svn/trunk@388 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Merged changes from docbook branch since r363.fiddlosopher6-3/+255
git-svn-id: https://pandoc.googlecode.com/svn/trunk@386 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01Refactored fillTemplates.pl.fiddlosopher1-25/+14
git-svn-id: https://pandoc.googlecode.com/svn/trunk@366 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31Revised inline code parsing in Markdown reader to conform tofiddlosopher1-14/+6
Markdown.pl. Now any number of `'s can begin inline code, which will end with the same number of `'s. For example, to have two backticks as code, write ``` `` ``` git-svn-id: https://pandoc.googlecode.com/svn/trunk@360 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31Simplified list parsing code in RST reader.fiddlosopher1-7/+8
git-svn-id: https://pandoc.googlecode.com/svn/trunk@356 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31Cleaned up some code in RST reader.fiddlosopher1-20/+15
git-svn-id: https://pandoc.googlecode.com/svn/trunk@354 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31Changed Markdown reader so that the first pass, in which a listfiddlosopher2-2/+8
of reference keys is made, is much faster. This gets us a big performance boost. git-svn-id: https://pandoc.googlecode.com/svn/trunk@353 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31Removed unneeded 'do' block from 'parseBlocks' definitionfiddlosopher1-3/+1
in Markdown reader. git-svn-id: https://pandoc.googlecode.com/svn/trunk@352 788f1e2b-df1e-0410-8736-df70ead52e1b