Commit graph

134 commits

Author SHA1 Message Date
John MacFarlane
03167bb447 Updated test suite. 2016-09-28 12:01:42 +02:00
Vaclav Zeman
df33d13587 LaTeX: Do not set [htbp] figure placement options.
Do not set `[htbp]` placement options on each figure to allow overriding
them by them using `\fps@figure` redefintion either in header or in
template.
2016-08-29 10:03:09 +02:00
John MacFarlane
4136ec0f4a latex template: fix for obscure hyperref/xelatex issue.
Here's a minimal case:

    \documentclass[]{article}
    \usepackage{hyperref}
    \begin{document}
    \section{\%á}
    \end{document}

Without this change, this fails on the second invocation of xelatex.
See https://tex.stackexchange.com/questions/313266/and-non-ascii-characters-in-headings

This affects inputs this like

    # %á

with pdf output via xelatex.
2016-06-07 10:11:48 -07:00
John MacFarlane
28b2d86b21 LaTeX/Beamer template changes (Thomas Hodgson):
* Added `thanks` variable
* Use `parskip.sty` when `indent` isn't set (fall
  back to using `setlength` as before if `parskip.sty`
  isn't available).
* Use `biblio-style` with biblatex.
* Added `biblatexoptions` variable.
* Added `section-titles` variable (defaults to true)
  to enable/suppress section title pages in beamer
  slide shows.
* Moved beamer themes after fonts, so that themes can
  change fonts.  (Previously the fonts set were being
  clobbered by lmodern.sty.)
2015-12-19 18:50:45 -08:00
John MacFarlane
e5c72caf29 LaTeX template changes:
- only pass options to color package if colorlinks is set
- make definition of `\euro` conditional in xelatex/lualatex,
  as it is already for pdflatex

(Andrew Dunning)
2015-12-03 10:45:11 -08:00
John MacFarlane
e5573bca8f latex template changes.
* Removed setting of `subject` in PDF metadata.
  This used to be set to the subtitle, but really the subtitle
  need not give the subject.  Also, `subtitle` can contain formatting,
  so we'd need, at least, a plain text version for this.

* Moved `header-includes` before setting of `\title`, `\author`,
  etc.  This allows these macros to be redefined.

* Use `\subtitle` command for `subtitle`, instead of tacking it
  on to the title as before.  We give a no-op fallback definition if it is
  not defined.  This change should produce much better results
  in classes that support `\subtitle`.  With the default article
  class, which does not define `\subtitle`, subtitles will no
  longer be printed unless the user defines `\subtitle` and
  redefines `\maketitle`.

* Moved redefinitions of `\paragraph` and `\subparagraph` to
  before header-includes.
2015-11-20 14:40:27 -08:00
John MacFarlane
0fd138167c Updated tests for template changes. 2015-11-12 16:09:41 -08:00
John MacFarlane
652b60f141 Updated tests for latex/context template changes. 2015-10-20 15:22:52 -07:00
John MacFarlane
d028dcb8a9 Updated tests for template changes. 2015-10-18 21:58:10 -07:00
John MacFarlane
74476e1f66 Fixed tests for template changes. 2015-10-13 20:50:40 -07:00
John MacFarlane
e3a5abc64f Removed xltxtra, xunicode from LaTeX template.
Thanks Andrew Dunning.

Updated tests and changelog.
2015-10-10 16:12:50 -07:00
John MacFarlane
e32ab441be Updated tests for changes to latex template. 2015-10-04 21:52:08 -07:00
John MacFarlane
ba76e6fcf1 Updated latex writer tests for last template change. 2015-06-27 18:37:59 -07:00
John MacFarlane
68b460db92 LaTeX template: Move hyperref before polyglossia.
This avoids an error "Please load package hyperref before bidi package,
and then try to run xelatex on your document again".  See
jgm/pandoc-templates #96.
2015-05-27 12:30:10 -07:00
John MacFarlane
7979db0f77 Test updates for 15d16e8456. 2015-05-04 10:05:11 -07:00
John MacFarlane
8245d672bd Fixed tests for change to latex template. 2015-05-02 10:16:26 -07:00
John MacFarlane
764f677530 Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
Conflicts:
	data/templates
2015-04-17 19:23:13 -07:00
John MacFarlane
9ad336f586 LaTeX template: redefine \paragraph, \subparagraph...
to behave more like section headers.  Closes #1658.
2015-04-17 18:51:36 -07:00
John MacFarlane
c5acaec3b5 LaTeX template: include grffile together with graphicx.
This properly handles filenames containing spaces and dots.
Closes #2074.
2015-04-13 09:00:55 -07:00
Tim Lin
0c18f3a854 Append newline to the LineBreak of various writers
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected:

* Dokuwiki
* HTML
* EPUB (via HTML)
* LaTeX
* MediaWiki
* OpenDocument
* Texinfo

This commit resolves #1924
2015-02-04 22:42:22 -08:00
John MacFarlane
47c360e079 Improved texorpdfstring patch #1148.
* Make LaTeX reader recognize texorpdfstring.
* Don't use texorpdfstring unless it's actually needed.
* Fix tests.
2014-12-15 10:06:03 -08:00
John MacFarlane
544f3e5b45 Merge branch 'use-texorpdfstring' of https://github.com/wilx/pandoc into wilx-use-texorpdfstring
Conflicts:
	src/Text/Pandoc/Writers/LaTeX.hs
	tests/Tests/Writers/LaTeX.hs
2014-12-15 10:01:50 -08:00
Bjorn Buckwalter
7960013cd4 Escape spaces. Fixes jgm/pandoc#1694. 2014-10-15 21:06:41 +02:00
John MacFarlane
0de27f3579 Updated tests for #1616 change. 2014-09-09 10:09:05 -07:00
Jose Luis Duran
9557eb6f8e LaTeX writer: Use a declaration for tight lists
Currently, pandoc has hard-coded the following in order to make tight lists in
LaTeX:

```hs
text "\\itemsep1pt\\parskip0pt\\parsep0pt"
```

Which is fine, but does not allow customizations.  For example, the `memoir`
class already has a `\tightlist` declaration for this purpose:

```tex
\newcommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
```

I'm proposing to use a similar solution:

```diff
@@ In Writers/LaTeX.hs:
-then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
+then text "\\tightlist"

@@ In templates/default.latex:
+\newcommand{\tightlist}{%
+  \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}}
```

This allows us to customize the tightness to our needs.

Backward Compatibility

If a person is using a custom LaTeX template (not based upon the `memoir`
class), the `\tightlist` declaration must be added.
2014-09-01 05:08:24 +00:00
Jose Luis Duran
1fc665c07d LaTeX writer: Make Horizontal Rules more flexible
Currently, pandoc has hard-coded the following in order to make horizontal
rules in LaTeX:

```hs
"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
```

Which is fine, but does not allow customizations.  It also does not take into
consideration the current line width.

I'm proposing this change:

```diff
@@ In Writers/LaTeX.hs:
-"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
+"\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}"
```
2014-08-28 03:12:37 +00:00
John MacFarlane
7e69f4a4fa Updated tests. 2014-08-20 09:23:19 -07:00
John MacFarlane
8c2ed54e2e LaTeX writer: use \(..\) instead of $..$ for inline math.
Closes #1464.
2014-07-29 20:45:49 -07:00
John MacFarlane
c24ab14918 LaTeX writer: Use \nolinkurl in email autolinks.
This allows them to be styled using `\urlstyle{tt}`.

Thanks to Ulrike Fischer for the solution.
2014-07-15 16:42:39 -07:00
John MacFarlane
e7b42947bf Updated tests for template changes. 2014-05-06 20:20:28 -07:00
John MacFarlane
ac104c4fdb Updated tests for new LaTeX template. 2014-04-30 23:29:10 -07:00
John MacFarlane
b677ce0663 Revised tests for new latex template. 2014-02-20 09:43:02 -08:00
Vaclav Zeman
08d80809c2
Update tests suite to expect \texorpdfstring. 2014-02-13 00:03:54 +01:00
John MacFarlane
08631ef1a3 Some test suite fixes for new metadata. 2013-06-25 22:32:50 -07:00
John MacFarlane
8d19e45b97 LaTeX writer: Always create labels for sections.
Previously the labels were only created when there were links to
the section in the document.

Closes #871.
2013-06-02 14:38:18 -07:00
John MacFarlane
816a5540f4 Updated tests for template changes. 2013-05-07 19:50:23 -07:00
John MacFarlane
fdd5f26d14 Updated tests for changes in LaTeX template. 2013-04-26 08:59:18 -07:00
John MacFarlane
d5c2ace9ae Updated tests for latex template change (microtype). 2013-02-27 19:42:54 -08:00
John MacFarlane
f468db9277 LaTeX template: Use \urlstyle{same} to avoid monospace URLs. 2013-01-21 11:52:00 -08:00
John MacFarlane
27e7c57721 LaTeX test updates for latest changes to template & h-k. 2013-01-19 10:41:42 -08:00
John MacFarlane
8ff81dc9ca Updated tests for tight/loose lists.
Taking into account new context/latex output, and fixing
some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt.
(We had the wrong order of expected/actual in the diff output.)
2013-01-07 20:58:49 -08:00
John MacFarlane
8c48bd8feb Don't put the text of an autolink in Code font. 2013-01-06 20:51:51 -08:00
John MacFarlane
e1be934dc2 LaTeX writer: Don't rely on the enumerate package.
Instead, use standard LaTeX commands to change numbering style.
2012-09-16 22:24:55 -07:00
John MacFarlane
1e2b20f8bc LaTeX writer: Properly escape strings inside \url{}.
Closes #576.
2012-09-16 11:20:53 -07:00
John MacFarlane
d9e34ce34d LaTeX writer: don't escape _ in url. 2012-09-15 20:43:36 -07:00
John MacFarlane
a08650a603 Updated tests for changes in LaTeX template. 2012-06-08 11:00:27 -07:00
John MacFarlane
3982aaaed6 Updated tests for changes in LaTeX changes. 2012-06-05 22:25:54 -07:00
John MacFarlane
337735ae32 Updated tests for changes in latex template. 2012-06-05 11:52:57 -07:00
John MacFarlane
9ab5b00221 Updated test suite. 2012-06-03 11:08:57 -07:00
John MacFarlane
4e35c67c23 LaTeX writer: More consistent interblock spacing. 2012-05-14 07:04:47 -07:00