Skip to content

Commit 6b97d6b

Browse files
authored
Merge pull request #21 from KukovecRok/main
Address Issue #20
2 parents 95bae79 + 424086b commit 6b97d6b

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- name: Set up Git repository
8-
uses: actions/checkout@v3
8+
uses: actions/checkout@v4
99
- name: Compile LaTeX document
10-
uses: xu-cheng/latex-action@v2
10+
uses: xu-cheng/latex-action@v3
1111
with:
1212
root_file: jourcl.tex
1313
- name: Upload PDF file
14-
uses: actions/upload-artifact@v3
14+
uses: actions/upload-artifact@v4
1515
with:
1616
name: PDF
17-
path: jourcl.pdf
17+
path: jourcl.pdf

jourcl.cls

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
% Top position of reviewers
2525
\DeclareOption{top}{%
26-
    \newcommand{\addreviewersPosition}{1}
26+
\newcommand{\addreviewersPosition}{1}
2727
}
2828
% Top position of reviewers
2929
\DeclareOption{afterToEditor}{%
@@ -75,6 +75,39 @@
7575
\def\ImagePath#1{\def\@ImagePath{#1}}
7676
\newcommand{\pImagePath}{\@ImagePath}
7777

78+
% Logo width, height OR scale, use default values if not specified
79+
\def\LogoWidth#1{\def\@LogoWidth{#1}}
80+
\newcommand{\pLogoWidth}{\ifcsname @LogoWidth\endcsname\@LogoWidth\else 7cm\fi}
81+
\def\LogoHeight#1{\def\@LogoHeight{#1}}
82+
\newcommand{\pLogoHeight}{\ifcsname @LogoHeight\endcsname\@LogoHeight\else 4cm\fi}
83+
\def\LogoScale#1{\def\@LogoScale{#1}}
84+
\newcommand{\pLogoScale}{\ifcsname @LogoScale\endcsname\@LogoScale\else 1.0\fi}
85+
% Command to switch which \includegraphics to use, based on set commands in .tex
86+
\newcommand{\includelogo}{%
87+
\ifcsname @LogoScale\endcsname
88+
% if Scale is set: use only scale
89+
\includegraphics[scale=\@LogoScale]{\pImagePath}%
90+
\else
91+
% if Scale is not set: check width/height
92+
\ifcsname @LogoWidth\endcsname
93+
\ifcsname @LogoHeight\endcsname
94+
% Both width and height are set
95+
\includegraphics[width=\@LogoWidth,height=\@LogoHeight,keepaspectratio]{\pImagePath}%
96+
\else
97+
% Only width is set
98+
\includegraphics[width=\@LogoWidth]{\pImagePath}%
99+
\fi
100+
\else
101+
\ifcsname @LogoHeight\endcsname
102+
% Only height is set
103+
\includegraphics[height=\@LogoHeight]{\pImagePath}%
104+
\else
105+
% if none is set: use defaults
106+
\includegraphics[width=7cm,height=4cm,keepaspectratio]{\pImagePath}%
107+
\fi
108+
\fi
109+
\fi
110+
}
78111
%----------------------------------------------------------------------
79112
% new command for the information of the author
80113
\newcommand{\aboutme}[1]{
@@ -86,7 +119,7 @@
86119
\fancyhf{}
87120
% show logo of author's institution on the left side
88121
\fancyhead[L]{\raisebox{\dimexpr-\height+\baselineskip}[0pt][0pt]{
89-
\includegraphics[width=7cm,height=4cm,keepaspectratio]{\pImagePath}
122+
\includelogo
90123
}}
91124
% show address on the rigt side
92125
\fancyhead[R]{\leavevmode\large

jourcl.pdf

9 Bytes
Binary file not shown.

jourcl.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
% Path to your logo
44
\ImagePath{imgs/jourcl-logo.png}
5+
% You can set custom logo size, where Scale > Width > Height
6+
% \LogoScale{.3}
7+
\LogoWidth{5cm}
8+
\LogoHeight{7cm}
9+
510
% Path to your signature (if you have one).
611
\signaturePath{imgs/jourcl-signature.png}
712

0 commit comments

Comments
 (0)