-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for citations in PDFs/LaTeX
Co-authored-by: Sukera <[email protected]>
- Loading branch information
1 parent
07d99f0
commit ef4bfa9
Showing
19 changed files
with
849 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,46 @@ | ||
# In a future version, this script will generate a PDF version of the package | ||
# documentation | ||
using DocumenterCitations | ||
using Documenter | ||
using Pkg | ||
|
||
|
||
# Note: Set environment variable `DOCUMENTER_LATEX_DEBUG=1` in order get a copy | ||
# of the generated tex file (or, add `platform="none"` to the | ||
# `Documenter.LaTeX` call) | ||
|
||
|
||
PROJECT_TOML = Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml")) | ||
VERSION = PROJECT_TOML["version"] | ||
NAME = PROJECT_TOML["name"] | ||
AUTHORS = join(PROJECT_TOML["authors"], ", ") * " and contributors" | ||
GITHUB = "https://github.com/JuliaDocs/DocumenterCitations.jl" | ||
|
||
bib = CitationBibliography( | ||
joinpath(@__DIR__, "src", "refs.bib"); | ||
style=:numeric # default | ||
) | ||
|
||
println("Starting makedocs") | ||
|
||
include("custom_styles/enumauthoryear.jl") | ||
include("custom_styles/keylabels.jl") | ||
|
||
withenv("DOCUMENTER_BUILD_PDF" => "1") do | ||
makedocs( | ||
authors=AUTHORS, | ||
linkcheck=true, | ||
warnonly=[:linkcheck,], | ||
sitename="DocumenterCitations.jl", | ||
format=Documenter.LaTeX(; version=VERSION), | ||
pages=[ | ||
"Home" => "index.md", | ||
"Syntax" => "syntax.md", | ||
"Citation Style Gallery" => "gallery.md", | ||
"CSS Styling" => "styling.md", | ||
"Internals" => "internals.md", | ||
"References" => "references.md", | ||
], | ||
plugins=[bib], | ||
) | ||
end | ||
|
||
println("Finished makedocs") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
\documentclass[oneside]{memoir} | ||
\usepackage{./documenter} | ||
\usepackage{./custom} | ||
|
||
\renewcommand{\part}[1]{} | ||
|
||
|
||
\AfterPreamble{\hypersetup{ | ||
pdfauthor={Michael H. Goerz and Contributors}, | ||
pdftitle={\DocMainTitle{} v\DocVersion{}}, | ||
pdfsubject={Documentation of Julia package \DocMainTitle{}} | ||
}} | ||
|
||
|
||
%% Title Page | ||
\title{% | ||
{\HUGE\DocMainTitle{}}\\ | ||
\vspace{16pt} | ||
{\Large version \DocVersion{}} | ||
} | ||
\author{Michael H. Goerz and Contributors} | ||
|
||
|
||
\settocdepth{section} | ||
|
||
|
||
%% Main document begin | ||
\begin{document} | ||
\frontmatter | ||
\maketitle | ||
%\clearpage | ||
\tableofcontents | ||
\widowpenalty10000 | ||
\clubpenalty10000 | ||
\raggedright% | ||
\mainmatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.