John MacFarlane
6f2347635c
LaTeX reader: Initialize citationSuppressParens field.
2012-10-22 19:17:00 -07:00
John MacFarlane
cfab8eaecb
Revert "LaTeX reader: Use new suppressParens option for footnote citations."
...
This reverts commit 7499499b68
.
Conflicts:
src/Text/Pandoc/Readers/LaTeX.hs
2012-10-21 23:16:23 -07:00
John MacFarlane
6f9151c64e
LaTeX reader: Basic \enquote support.
2012-10-15 20:15:34 -07:00
John MacFarlane
7499499b68
LaTeX reader: Use new suppressParens option for footnote citations.
...
Also changed Biblio, Markdown reader, and LaTeX reader tests because
of new citationSuppressParens field in Citation.
2012-10-15 19:53:57 -07:00
John MacFarlane
19e1d746da
LaTeX reader: Use normal citations, not author-in-text, for fn cites.
...
Eventually it would be nice to use a "suppress outer parens" variant,
if citeproc-hs provides one.
2012-10-14 08:44:25 -07:00
John MacFarlane
b5dd06d303
Moved bibliography processing into readers.
...
Previously this was done in src/pandoc.hs, which made it difficult
for library users.
* Removed readerCitations in ReaderOptions.
* Added readerReferences and readerCitationStyle to ReaderOptions.
* Moved use of processBiblio from main program to the
markdown and LaTeX readers.
2012-10-13 11:33:55 -07:00
John MacFarlane
40128754ab
LaTeX reader: Made rawLaTeXInline more flexible.
...
Now it will also try to parse block commands. This is usually
what we want, given how rawLaTeXInline is used in the markdown
and textile readers. If a block-level LaTeX command is used
in the middle of a paragraph (e.g. `\subtitle` inside a title),
we can treat it as raw inline LaTeX.
2012-10-11 21:21:09 -07:00
John MacFarlane
cfc2e00b84
LaTeX reader: Make \noindent
inline rather than block.
2012-10-11 20:56:44 -07:00
John MacFarlane
4349097990
LaTeX reader: Better support for citation commands.
...
* Make `\cite` etc. an AuthorInText.
* Make `\footcite` etc. into citations in notes.
2012-10-10 19:41:39 -07:00
John MacFarlane
93e92a4716
Renamed removedLeadingTrailingSpace to trim.
...
Also removeLeadingSpace to triml,
removeTrailingSpace to trimr.
2012-09-29 17:09:34 -04:00
John MacFarlane
1038606036
LaTeX reader: Added a 'try' in rawLaTeXBlock.
...
This allows the markdown reader to treat '\begin' (not followed
by an argument) as a raw string rather than erroring out when
it doesn't find a '{'.
Closes #622 .
2012-09-22 13:00:59 -07:00
John MacFarlane
4076e2f8be
LaTeX reader: Better error messages for environments.
...
Now it should tell you that it was looking for \end{env},
instead of giving "unknown parse error."
2012-09-09 19:23:55 -07:00
John MacFarlane
14dba12f90
LaTeX reader: guard against "begin"/"end" in blockCommand.
2012-09-09 18:27:52 -07:00
John MacFarlane
ccf314829b
LaTeX reader: Guard against "begin", "end" in inlineCommand.
...
Removed these from list of inline commands.
2012-09-09 18:21:53 -07:00
John MacFarlane
7d0438897b
LaTeX reader: Support obeylines environment.
...
Closes #604 .
2012-09-06 16:27:01 -07:00
John MacFarlane
e2cc9e7ca1
LaTeX reader: Use curly quotes for bare straight quotes.
2012-09-06 16:02:56 -07:00
John MacFarlane
bc4f3af2c3
LaTeX reader: Fixed parsing of paragraphs beginning with a group.
...
Previously a paragraph beginning ``` {``}hello{''} ``` would be
parsed as two paragraphs.
Closes #606 .
2012-09-06 15:28:25 -07:00
John MacFarlane
784e6e65c4
LaTeX reader: Handle \slash command.
...
Closes #605 .
2012-09-04 23:21:15 -07:00
John MacFarlane
dfa4b76630
Changes to literate haskell options.
...
- Removed writerLiterateHaskell from WriterOptions.
- Removed readerLiterateHaskell from ReaderOptions.
- Added Ext_literate_haskell to Extensions. Test for this
instead of the above.
- Removed failUnlessLHS from Shared.
Note: At this point, +lhs and .lhs extension no longer has any effect.
Need to fix.
2012-08-08 23:18:19 -07:00
John MacFarlane
acde1e82d2
Changed reader parameters from ParserState to ReaderOptions.
2012-07-25 22:35:41 -07:00
John MacFarlane
ef0619cc6d
Moved ParseRaw from ParserState to ReaderOptions.
2012-07-25 11:43:56 -07:00
John MacFarlane
308436996e
Use catch from Control.Exception to avoid warnings.
2012-07-24 19:38:16 -07:00
John MacFarlane
2c30c48757
Use Parser as type synonym for Parsec.
2012-07-20 15:54:57 -07:00
John MacFarlane
5085962c28
Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.
...
No other module directly imports Parsec. This will make it easier
to change the parsing backend in the future, if we want to.
2012-07-20 14:41:44 -07:00
John MacFarlane
a4c28ead79
Use Text.Parsec instead of Text.ParserCombinators.Parsec.
2012-07-20 14:19:06 -07:00
John MacFarlane
2e4860bc6d
LaTeX reader: Support \centerline
.
2012-05-22 15:38:11 -07:00
John MacFarlane
206f261194
LaTeX reader: Allow skipping of unknown block commands in \author
section.
...
Closes #505 , which was a problem with `\vspace{10pt}` inside `\author`.
2012-05-11 20:50:00 -07:00
John MacFarlane
5a244bb7b3
LaTeX reader: Make \label and \ref sensitive to --parse-raw.
...
IF --parse-raw is selected, these will be parsed as raw latex
inlines, rather than bracketed text.
2012-04-15 17:41:45 -07:00
John MacFarlane
a388024a57
Small simplification of blank parser in LaTeX reader.
2012-04-11 08:52:16 -07:00
John MacFarlane
a4388279de
LaTeX reader: Parse 'dimension' arguments to unknown commands.
...
e.g. `\parindent0pt`
2012-04-10 18:56:08 -07:00
John MacFarlane
54c9d4348a
LaTeX reader: Control sequences can't be followed by a letter.
...
This fixes a bug where `\begingroup` was parsed as `\begin`
followed by `group`.
2012-04-10 18:25:18 -07:00
John MacFarlane
4fce1a63b1
LaTeX reader: Handle \bgroup, \egroup, \begingroup, \endgroup.
2012-04-07 16:16:43 -07:00
John MacFarlane
1db909e49b
Fixed bug parsing LaTeX tables with one column.
...
Thanks to Steven Solie for finding the bug.
2012-03-19 08:18:32 -07:00
John MacFarlane
a768844751
Fixed lstlisting environment in LaTeX reader.
...
Closes #443 .
2012-03-10 12:33:55 -08:00
John MacFarlane
c5fb21d524
Support "minted" as a LaTeX verbatim block.
...
Closes #431 .
2012-02-27 11:37:54 -08:00
John MacFarlane
bf4e59bc46
LaTeX reader: correctly handle \^{}.
2012-02-25 09:55:38 -08:00
John MacFarlane
14984a7130
LaTeX reader: Fixed accents.
...
\~{a}, \c{c}.
2012-02-25 09:24:39 -08:00
John MacFarlane
24e3a65167
LaTeX math environment fixes. Closes #423 .
...
`aligned` is now used instead of the nonexistent `aligned*`.
`multline` instead of the nonexistent `multiline`.
2012-02-19 21:11:07 -08:00
John MacFarlane
f59e33dd1a
LaTeX reader: Add ", " to suffix...
...
if it doesn't start w space or punctuation. Otherwise we
get no space between the year and the suffix in author-date styles.
2012-02-10 21:48:42 -08:00
John MacFarlane
ad4062fbff
Made LaTeX parser more robust.
...
+ Skip options after block commands.
+ Correctly handle {\\} in braced.
+ Added a needed 'try'.
2012-02-09 17:45:40 -08:00
John MacFarlane
5ac6f88e34
Better handling of raw latex environments in markdown.
...
Now
\begin{equation}
a_1
\end{equation}
turns into a raw latex block as expected.
2012-02-09 14:30:37 -08:00
John MacFarlane
1c432e72ea
Put LaTeX verse environments in blockquotes.
2012-02-08 14:03:55 -08:00
John MacFarlane
328c91e307
Handle escaped $ in latex math. Closes #186 .
2012-02-07 19:41:37 -08:00
John MacFarlane
df3f3ddb6e
LaTeX reader: use raw latex as fallback for Cites.
...
This way you can still get the raw latex back, even if you don't
process with citeproc. Previously, cites were not visible at all
unless you specified --biblio on the command line and converted
them using citeproc, or used --natbib or --biblatex.
2012-02-06 12:42:12 -08:00
John MacFarlane
9bf6e665ea
Removed outdated comment in LaTeX reader.
2012-02-05 22:51:42 -08:00
John MacFarlane
f97391c7de
Support \frametitle, \framesubtitle.
2012-02-05 09:28:56 -08:00
John MacFarlane
922469bbb2
LaTeX reader: Fixed bug in authors.
2012-02-05 09:06:34 -08:00
John MacFarlane
bae3b49a5a
LaTeX reader: Support \TeX, \LaTeX.
2012-02-05 08:50:25 -08:00
John MacFarlane
c54c3d50b0
LaTeX reader: Skip everything after \end{document}.
2012-02-05 08:46:04 -08:00
John MacFarlane
79f1594470
Added \vspace and \hspace to latex ignored block commands.
2012-02-04 23:19:09 -08:00