From 83f7ffe04ec4cfeb232322db1196b4ba6d364f22 Mon Sep 17 00:00:00 2001 From: Nathan Musoke Date: Wed, 3 Apr 2024 21:00:23 -0400 Subject: [PATCH] add themes for JHEP and JCAP JCAP (Journal of Cosmology and Astroparticle Physics) JHEP (Journal of High Energy Physics) are physics journals. They use the LaTeX styles `jcappub.sty` and `jheppub.sty` that define the layout of a page. Add themes with figure sizes based on the output of ``` linewidth=\uselengthunit{pt}\printlength{\linewidth} \\ linewidth=\uselengthunit{in}\printlength{\linewidth} ``` within these styles. For JCAP these are ``` 440.0pt 6.08948in ``` For JHEP these are ``` 430.20639pt 5.95393in ``` --- README.md | 8 ++++---- docs/src/index.md | 8 ++++---- docs/src/manual.md | 4 +++- src/MakiePublication.jl | 4 +++- src/journals.jl | 27 +++++++++++++++++++++++++++ src/{schemes.jl => themes.jl} | 6 ++++-- 6 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 src/journals.jl rename src/{schemes.jl => themes.jl} (56%) diff --git a/README.md b/README.md index f5f8e57..dd43534 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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) @@ -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 . \ No newline at end of file +* Pull requests of new schemes for other publishers and journals are highly appreciated. +* Contact the author via email . diff --git a/docs/src/index.md b/docs/src/index.md index ce9f572..837c1e2 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -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) @@ -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) @@ -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 . \ No newline at end of file +* Pull requests of new schemes for other publishers and journals are highly appreciated. +* Contact the author via email . diff --git a/docs/src/manual.md b/docs/src/manual.md index ed8d03d..84ed5c5 100644 --- a/docs/src/manual.md +++ b/docs/src/manual.md @@ -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 @@ -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 diff --git a/src/MakiePublication.jl b/src/MakiePublication.jl index a15b22a..c11cba7 100644 --- a/src/MakiePublication.jl +++ b/src/MakiePublication.jl @@ -12,7 +12,7 @@ export figsize, savefig -include("schemes.jl") +include("themes.jl") export theme_acs, theme_acs_1col, @@ -20,6 +20,8 @@ export theme_aps, theme_aps_1col, theme_aps_2col, + theme_jcap, + theme_jhep, theme_rsc, theme_rsc_1col, theme_rsc_2col, diff --git a/src/journals.jl b/src/journals.jl new file mode 100644 index 0000000..ec3edf2 --- /dev/null +++ b/src/journals.jl @@ -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...) diff --git a/src/schemes.jl b/src/themes.jl similarity index 56% rename from src/schemes.jl rename to src/themes.jl index eaccacd..b63e18f 100644 --- a/src/schemes.jl +++ b/src/themes.jl @@ -1,4 +1,6 @@ include("acs.jl") -include("web.jl") include("aps.jl") -include("rsc.jl") \ No newline at end of file +include("rsc.jl") +include("web.jl") + +include("journals.jl")