From: Istvan Modos Date: Tue, 6 Feb 2018 18:49:49 +0000 (+0100) Subject: Separate creating the title page and including it in manuscript X-Git-Url: http://rtime.felk.cvut.cz/gitweb/modosist/iidtitlepage.git/commitdiff_plain/df206dd035fcb45ccf20ade40c6f9df63ba1aaaf Separate creating the title page and including it in manuscript --- diff --git a/README.html b/README.html index 1f52d4f..aafa360 100644 --- a/README.html +++ b/README.html @@ -47,37 +47,26 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

Documentation for iidtitlepage package

TODO: what is it

-

Package installation

-

Put files iidtitlepage.sty and iid-logo.pdf into the root directory of your article, i.e., where your main .tex file is located. The package has a few dependencies, you may either check them in .sty file (\RequirePackage commands) or just keep building your article until you will have no errors left ;).

-

TODO: installation to system LaTeX?

Package usage

-

File example.tex shows a complete example on how to use the package.

-

To import the package, use following

-
\usepackage[elsevier]{iidtitlepage}
-

The package has one mandatory argument which is either elsevier or ieee, depending on the publisher of your article.

-

Then, you need to provide some mandatory information such as title name, authors, year and citation text

-
% Title.
-\title{An example document using \texttt{iidtitlepage} package}
-
-% Authors.
-% Unfortunately, we cannot use \author command, since some journal templates require to use a specific macros that might be not compatible with the package.
-\IidTitlePageAuthors{Istv\'{a}n M\'{o}dos, Va\v{s}ek Chv\'{a}tal}
-
-% Year of publication.
-\IidTitlePageYear{2017}
-
-% How to cite this article. Can be either full-text or, as in this case, a bibtex entry.
-\IidTitlePageCiteAs{modos2018}
-

You may specify some optional information such as DOI and source code url

-
\IidTitlePageDoi{https://doi.org/10.1016/j.cie.2017.08.011}
-\IidTitlePageSourceCodes{https://github.com/torvalds/linux}
-

After all information is specified, call \IidTitlePage{} to create a title page

-
\begin{document}
-...
-\IidTitlePage{}
-...
-\maketitle
-...
-\end{document}
+

The process of adding the title page to your manuscript is following:

+
    +
  1. Create the PDF file of title page with all the information.
  2. +
  3. Include the title page into your manuscript.
  4. +
+

Creating the title page PDF

+

First, either download the whole iidtitlepage project or clone its git. To change the information on the title page (such as name of the authors, title etc.), edit the file title_page.tex using your favorite editor and follow the LaTeX comments to include the necessary info. Build the title page PDF using pdflatex command.

+

Including the title page into your manuscript

+

Copy the generated title page title_page.pdf to directory with your manuscript LaTeX project. Include a pdfpages package into your project

+
\usepackage{pdfpages}
+

The following action depends on the journal publisher.

+

Elsevier

+

Locate \begin{frontmatter} command and replace it with the following

+
\begin{frontmatter}
+\includepdf[pages=1,fitpaper,noautoscale]{title_page.pdf}
+

IEEE and Springer

+

Locate \maketitle command and replace it with the following

+
\null
+\includepdf[pages=1,fitpaper,noautoscale]{title_page.pdf}
+\maketitle
diff --git a/README.md b/README.md index 700dfd3..f9b11ae 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,37 @@ # Documentation for `iidtitlepage` package TODO: what is it +## Package usage +The process of adding the title page to your manuscript is following: -## Package installation -Put files `iidtitlepage.sty` and `iid-logo.pdf` into the root directory of your article, i.e., where your main `.tex` file is located. -The package has a few dependencies, you may either check them in `.sty` file (`\RequirePackage` commands) or just keep building your article until you will have no errors left ;). - -TODO: installation to system LaTeX? +1. Create the PDF file of title page with all the information. +2. Include the title page into your manuscript. -## Package usage -File `example.tex` shows a complete example on how to use the package. +### Creating the title page PDF +First, either download the whole `iidtitlepage` project or clone its git. +To change the information on the title page (such as name of the authors, title etc.), edit the file `title_page.tex` using your favorite editor and follow the LaTeX comments to include the necessary info. +Build the title page PDF using `pdflatex` command. -To import the package, use following +### Including the title page into your manuscript +Copy the generated title page `title_page.pdf` to directory with your manuscript LaTeX project. +Include a `pdfpages` package into your project ```latex -\usepackage[elsevier]{iidtitlepage} +\usepackage{pdfpages} ``` -The package has one mandatory argument which is either `elsevier` or `ieee`, depending on the publisher of your article. - -Then, you need to provide some mandatory information such as title name, authors, year and citation text -```latex -% Title. -\title{An example document using \texttt{iidtitlepage} package} -% Authors. -% Unfortunately, we cannot use \author command, since some journal templates require to use a specific macros that might be not compatible with the package. -\IidTitlePageAuthors{Istv\'{a}n M\'{o}dos, Va\v{s}ek Chv\'{a}tal} +The following action depends on the journal publisher. -% Year of publication. -\IidTitlePageYear{2017} - -% How to cite this article. Can be either full-text or, as in this case, a bibtex entry. -\IidTitlePageCiteAs{modos2018} -``` - -You may specify some optional information such as DOI and source code url +#### Elsevier +Locate `\begin{frontmatter}` command and replace it with the following ```latex -\IidTitlePageDoi{https://doi.org/10.1016/j.cie.2017.08.011} -\IidTitlePageSourceCodes{https://github.com/torvalds/linux} +\begin{frontmatter} +\includepdf[pages=1,fitpaper,noautoscale]{title_page.pdf} ``` -After all information is specified, call `\IidTitlePage{}` to create a title page +#### IEEE and Springer +Locate `\maketitle` command and replace it with the following ```latex -\begin{document} -... -\IidTitlePage{} -... +\null +\includepdf[pages=1,fitpaper,noautoscale]{title_page.pdf} \maketitle -... -\end{document} -``` +``` \ No newline at end of file diff --git a/bibfile.bib b/bibfile.bib index e753653..e50f4ad 100644 --- a/bibfile.bib +++ b/bibfile.bib @@ -1,4 +1,4 @@ -@article{modos2018, +@article{manuscript, title = "An example document using iidtitlepage package", journal = "Computers \& Industrial Engineering", volume = "112", @@ -8,5 +8,5 @@ year = "2017", issn = "0360-8352", doi = "https://doi.org/10.1016/j.cie.2017.08.011", url = "http://www.sciencedirect.com/science/article/pii/S0360835217303534", -author = "Istvan Modos and Vasek Chvatal", +author = "Erdős, Pál and Chvátal, Vašek", } \ No newline at end of file diff --git a/example.pdf b/example.pdf deleted file mode 100644 index 0019617..0000000 Binary files a/example.pdf and /dev/null differ diff --git a/example.tex b/example.tex deleted file mode 100644 index 85b2c0c..0000000 --- a/example.tex +++ /dev/null @@ -1,28 +0,0 @@ -\documentclass[twocolumn,a4paper,12pt]{article} - -\usepackage[springer]{iidtitlepage} - -% Lorem ipsum, dummy text -\usepackage{blindtext} - -\title{An example document using \texttt{iidtitlepage} package} -\author{Istv\'{a}n M\'{o}dos, Va\v{s}ek Chv\'{a}tal} -\IidTitlePageAuthors{Istv\'{a}n M\'{o}dos, Va\v{s}ek Chv\'{a}tal} -\IidTitlePageDoi{https://doi.org/10.1016/j.cie.2017.08.011} -\IidTitlePageYear{2017} -\IidTitlePageCiteAs{modos2018} -\IidTitlePageSourceCodes{https://github.com/torvalds/linux} -\date{\today} - -\begin{document} - -\IidTitlePage{} - -\maketitle - -\cite{modos2018}\Blindtext - -\bibliographystyle{abbrv} -\bibliography{bibfile} - -\end{document} diff --git a/iidtitlepage.sty b/iidtitlepage.sty index a5f3e96..8a9e354 100644 --- a/iidtitlepage.sty +++ b/iidtitlepage.sty @@ -1,6 +1,8 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{iidtitlepage} +\RequirePackage[utf8]{inputenc} +\RequirePackage[czech]{babel} \RequirePackage{etoolbox} \RequirePackage{geometry} \RequirePackage{graphicx} @@ -12,6 +14,8 @@ \RequirePackage{mdframed} \RequirePackage{fancyhdr} +\bibliographystyle{abbrv} + \newtoggle{iidieee} \newtoggle{iidelsevier} \newtoggle{iidspringer} @@ -21,10 +25,6 @@ \DeclareOption{springer}{ \toggletrue{iidspringer} } \ProcessOptions{} -\newcommand{\IidTitlePageAuthors}[1]{ - \newcommand{\@IidTitlePageAuthors}{#1} -} - \newcommand{\IidTitlePageYear}[1]{ \newcommand{\@IidTitlePageYear}{#1} } @@ -74,7 +74,7 @@ \vspace{0.3cm} - \noindent\nohyphens{{\large \@IidTitlePageAuthors}} + \noindent\nohyphens{{\large \@author}} \vfill @@ -97,6 +97,7 @@ \end{titlepage} \makeatother \restoregeometry{} + \nobibliography{bibfile} } \endinput \ No newline at end of file diff --git a/title_page.pdf b/title_page.pdf new file mode 100644 index 0000000..7b50243 Binary files /dev/null and b/title_page.pdf differ diff --git a/title_page.tex b/title_page.tex new file mode 100644 index 0000000..6f5ed52 --- /dev/null +++ b/title_page.tex @@ -0,0 +1,29 @@ +% DO NOT CHANGE THIS! +\documentclass[a4paper,12pt]{article} + +% Select the journal template for your manuscript. +% Options: elsevier, ieee, springer +\usepackage[elsevier]{iidtitlepage} + +% Mandatory: The title of the manuscript. +\title{An example title page using \texttt{iidtitlepage} package} + +% Mandatory: the authors. Will appear on the title page exactly as provided to the command. +\author{Pál Erdős and Vašek Chvátal} + +% Optional: DOI of the journal article. +\IidTitlePageDoi{https://doi.org/10.1007/s10479-016-2184-6} + +% Mandatory: year when the manuscript was produced. +\IidTitlePageYear{2017} + +% Optional: link to the corresponding source codes (e.g., for algorithm described in the manuscript). +\IidTitlePageSourceCodes{https://github.com/torvalds/linux} + +% Mandatory: bibtex entry that represents the citation to the manuscript. To change the citation, modify bibfile.bib file. +\IidTitlePageCiteAs{manuscript} + +% Generates the title page. +\begin{document} +\IidTitlePage{} +\end{document}