Commit graph

23 commits

Author SHA1 Message Date
Yihui Xie
ee44d44f20 Keep the \author{} command even if author is not specified (#5961)
Otherwise there will be a LaTeX warning "No \author given" when the .tex file is compiled.
This does not affect spacing in the title block.
2019-12-05 10:22:31 -08:00
John MacFarlane
2cd1c7b30f Update test for skylighting 0.8.1.1. 2019-06-13 19:33:52 -07:00
Andrew Dunning
3d1409347a LaTeX template: Ensure correct heading/table order (#5421)
Improve the workaround for #1658, adapting a solution by @u-fischer in
<https://github.com/latex3/latex2e/issues/131> that works whether or not
the `indent` variable is enabled.

Remove `subparagraph` variable in LaTeX template.  The default is now
to use run-in style for level 4 and 5 headings (`\paragraph` and `\subparagraph`).
To get the previous default behavior (where these were formatted as blocks,
like `\subsubsection`), set the `block-headings` variable.

An example is given in the manual of reformatting the appearance of headings
more thoroughly using KOMA-Script.

Closes #5365.
2019-04-02 18:18:36 -06:00
Andrew Dunning
c21db81efd LaTeX template: Add pandoc to PDF metadata (#5388)
Credits pandoc in content creator metadata (the default is 'LaTeX with hyperref').
2019-03-25 22:36:14 -06:00
Andrew Dunning
e91af0a8a3 LaTeX template: Group graphics-related code (#5389)
* LaTeX template: Group graphics-related code

The default figure placement was added in <f3ab4bc2b9>; there does not appear to have been a reason for placing it at the end of the preamble.

* Update tests
2019-03-22 22:35:55 -06:00
Andrew Dunning
bbe2da390e LaTeX template: Improve readability (#5363)
+ LaTeX template: Improve template readability
  Use `hidelinks` option for hyperref, which has the same effect as `pdfborder={0 0 0}`,
  but its purpose is clearer. Use a simpler conditional for Polyglossia/Babel. Format
  comments more consistently.
+ Update tests
+ Remove hyperref breaklinks option.  According to the documentation, hyperref
  sets this automatically as appropriate to the driver.
2019-03-13 18:22:28 -06:00
Andrew Dunning
d7f56f8189 LaTeX template: Robust section numbering removal (#5351)
Ensures that section numbering does not reappear with custom section levels. See <https://tex.stackexchange.com/questions/473653/>.

Update tests
2019-03-04 16:58:20 -07:00
John MacFarlane
b6cf490efd Use latest skylighting. 2019-02-10 08:06:53 -08:00
Andrew Dunning
3ad2255717 LaTeX template: Respect numbersections for books (#5235)
Ensure that `\part` and `\chapter` are only numbered if `numbersections` is set. To return to the previous behaviour, use `-V numbersections -V secnumdepth=0`.

Notes on secnumdepth:

1 = Number `\section`
0 = Number `\chapter`
-1 = Number `\part`
-2 = No numbering
2019-01-22 21:11:13 -08:00
Andrew Dunning
96892ea8d7 LaTeX template: Simplify fontspec usage (#5218)
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option).

With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc.

Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`.

For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
2019-01-12 17:39:47 -08:00
Andrew Dunning
666bf8ac5c LaTeX template: Prevent scaling of main font (#5212)
When `Scale=MatchLowercase` is set as a default font option, this scales `mainfont` against the old default, meaning that it resizes whatever is set as the main font to match the metrics of Latin Modern. This can result, for example, in a document set to 12pt appearing in 11pt or 13pt. Setting this option for individual families allows everything to scale against the main font, and permits the user to override the setting if desired. Note that it is not necessary to specify `Ligatures=TeX`, as this is already set by default for the appropriate families. See the `fontspec` manual: <https://ctan.org/pkg/fontspec>.

Those who specify font-options in metadata may need to add `Scale=MatchLowercase`, which will now only be provided if `(roman|sans|math|mono)fontoptions` aren't given explicitly.
2019-01-10 11:24:27 -08:00
Andrew Dunning
f3709ccba3 LaTeX template: Require xcolor 2019-01-02 22:34:17 -05:00
Andrew Dunning
2c0af6e3a3 Update LaTeX tests 2019-01-01 17:47:02 -05:00
Enno
dc8caf10df template:latex: make @ letter before using it (#5145)
This fixes the previous commit for parskip and KOMA classes.
2018-12-11 16:21:45 -05:00
Enno
84147eeff1 Let KOMA document class handle parskip when applicable (#5143)
This is just a change to the default latex template.
2018-12-11 13:22:31 -05:00
John MacFarlane
58eb78c437 Fixed tests for new skylighting. 2018-10-08 23:16:50 -07:00
John MacFarlane
5e039d913f Changes for skylighting-0.5.
This fixes a bug in 2.0.4, whereby pandoc could not
read the theme files generated with `--print-highlight-style`.

It also fixes some CSS issues involving line numbers.
Highlighted code blocks are now enclosed in a div with class
sourceCode.

Highlighting CSS no longer sets a generic color for pre
and code; we only set these for class `sourceCode`.

This will close #4133 and #4128.
2017-12-10 21:13:05 -08:00
John MacFarlane
2358229876 Adjusted some tests for last commit. 2017-09-08 16:34:33 -07:00
John MacFarlane
9c577b17b7 Update tests for changes to LaTeX template. 2017-08-14 13:19:54 -07:00
Václav Haisman
7bdf38ef2e LaTeX: Load parskip before hyperref. (#3654)
* LaTeX: Load `parskip` before `hyperref`.

According to `hyperref` package's `README.pdf`, page 22, `hyperref` package
should be loaded after `parskip` package.

* Adjust tests for previous change.
2017-05-09 22:09:10 +02:00
John MacFarlane
fe4311d5a1 LaTeX writer: always add hypertarget when there's a non-empty identifier.
Previously the hypertargets were only added when there was actually
a link to that identifier.  Closes #2719.
2017-03-01 21:38:28 +01:00
John MacFarlane
fc8208e8bc Use unicode-math by default in default.latex template.
mathspec will be used in xelatex if the `mathspec` variable is
set; otherwise unicode-math will be used.

Thanks to Václav Haisman.
2017-02-06 10:50:36 +01:00
John MacFarlane
18ab864269 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
Renamed from tests/lhs-test.latex (Browse further)