Skip to content

Commit

Permalink
Merge pull request #10 from musoke/jcap-jhep
Browse files Browse the repository at this point in the history
- Add themes for JHEP and JCAP.
- MP now supports both Per-publisher themes and Per-journal themes.
  • Loading branch information
liuyxpp authored Apr 13, 2024
2 parents 58733de + 83f7ffe commit 9ed2213
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Read the [full documentation here](http://www.yxliu.group/MakiePublication.jl/de

## Features

* Provide a collection of custom themes for journal publishers: ACS, APS, RSC.
* Provide a collection of custom themes for journal publishers (ACS, APS, RSC) and some individual journals (JCAP, JHEP).
* Custom theme for making figures suitable for web pages.
* 15 color palettes based on well-known quality color schemes with special tweaked ordering for scientific publishing. (since v0.3.0)
* Support hollow markers. (since v0.3.1)
Expand Down Expand Up @@ -74,7 +74,7 @@ The demonstration of available color palettes can be found in the Pluto notebook

## Showcase of Themes

Note that all MakiePublication themes for journal publishers are essentially the same except the physical size of the figure. Hence following figures only different in the image sizes.
Note that all MakiePublication themes (except `theme_web`) are essentially the same except the physical size of the figure. Hence following figures only different in the image sizes.

- `theme_acs` for American Chemical Society (ACS)

Expand All @@ -96,5 +96,5 @@ The [full documentation](http://www.yxliu.group/MakiePublication.jl/dev/) is ava

* Star the package on [github.com](https://github.com/liuyxpp/MakiePublication.jl).
* File an issue or make a pull request on [github.com](https://github.com/liuyxpp/MakiePublication.jl).
* Pull requests of new schemes for other publishers are highly appreciated.
* Contact the author via email <lyx@fudan.edu.cn>.
* Pull requests of new schemes for other publishers and journals are highly appreciated.
* Contact the author via email <lyx@fudan.edu.cn>.
8 changes: 4 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Features

* Provide a collection of custom themes for journal publishers: ACS, APS, RSC.
* Provide a collection of custom themes for journal publishers (ACS, APS, RSC) and some individual journals (JCAP, JHEP).
* Custom theme for making figures suitable for web pages.
* 15 color palettes based on well-known quality color schemes with special tweaked ordering for scientific publishing. (since v0.3.0)
* Support hollow markers. (since v0.3.1)
Expand All @@ -23,7 +23,7 @@ julia> # Press the key "]"

## Showcase of Themes

Note that all MakiePublication themes for journal publishers are essentially the same except the physical size of the figure. Hence following figures only different in the image sizes.
Note that all MakiePublication themes (except `theme_web`) are essentially the same except the physical size of the figure. Hence following figures only different in the image sizes.

- `theme_acs` for American Chemical Society (ACS)

Expand All @@ -45,5 +45,5 @@ Note that all MakiePublication themes for journal publishers are essentially the

* Star the package on [github.com](https://github.com/liuyxpp/MakiePublication.jl).
* File an issue or make a pull request on [github.com](https://github.com/liuyxpp/MakiePublication.jl).
* Pull requests of new schemes for other publishers are highly appreciated.
* Contact the author via email <lyx@fudan.edu.cn>.
* Pull requests of new schemes for other publishers and journals are highly appreciated.
* Contact the author via email <lyx@fudan.edu.cn>.
4 changes: 3 additions & 1 deletion docs/src/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Makie Themes

MakiePublication provides 3 Makie themes suitable for creating publication quality figures and 1 theme for web presentation.
MakiePublication provides 5 Makie themes suitable for creating publication quality figures and 1 theme for web presentation.

```@docs
theme_acs
Expand All @@ -11,6 +11,8 @@ theme_acs_2col
theme_aps
theme_aps_1col
theme_aps_2col
theme_jcap
theme_jhep
theme_rsc
theme_rsc_1col
theme_rsc_2col
Expand Down
4 changes: 3 additions & 1 deletion src/MakiePublication.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ export
figsize,
savefig

include("schemes.jl")
include("themes.jl")
export
theme_acs,
theme_acs_1col,
theme_acs_2col,
theme_aps,
theme_aps_1col,
theme_aps_2col,
theme_jcap,
theme_jhep,
theme_rsc,
theme_rsc_1col,
theme_rsc_2col,
Expand Down
27 changes: 27 additions & 0 deletions src/journals.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
theme_jcap(; kwargs...)
Generate Makie theme for producing figures for JCAP (Journal of Cosmology and Astroparticle Physics).
The usage is the same as [`theme_acs`](@ref) except figure `width=6.08948`.
The value of `width` is obtained from `\\uselengthunit{in}\\printlength{\\linewidth}` and corresponds to 440pt.
JCAP is single column, so `theme_jcap_1col` and `theme_jcap_2col` are not defined.
See also [`theme_acs`](@ref), [`theme_aps`](@ref), [`theme_jhep`](@ref), [`theme_rsc`](@ref), and [`theme_web`](@ref).
"""
theme_jcap(; kwargs...) = theme_acs(; width=6.08948, kwargs...)

"""
theme_jhep(; kwargs...)
Generate Makie theme for producing figures for JHEP (Journal of High Energy Physics).
The usage is the same as [`theme_acs`](@ref) except figure `width=5.95393`.
The value of `width` is obtained from `\\uselengthunit{in}\\printlength{\\linewidth}`.
JHEP is single column, so `theme_jhep_1col` and `theme_jhep_2col` are not defined.
See also [`theme_acs`](@ref), [`theme_aps`](@ref), [`theme_jcap`](@ref), [`theme_rsc`](@ref), and [`theme_web`](@ref).
"""
theme_jhep(; kwargs...) = theme_acs(; width=5.95393, kwargs...)
6 changes: 4 additions & 2 deletions src/schemes.jl → src/themes.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include("acs.jl")
include("web.jl")
include("aps.jl")
include("rsc.jl")
include("rsc.jl")
include("web.jl")

include("journals.jl")

0 comments on commit 9ed2213

Please sign in to comment.