From: Istvan Modos Date: Mon, 15 Jan 2018 12:51:58 +0000 (+0100) Subject: Initial dump X-Git-Url: http://rtime.felk.cvut.cz/gitweb/modosist/iidtitlepage.git/commitdiff_plain/6db8b76f865973b84e98377c8fcf94307d5286b7 Initial dump --- 6db8b76f865973b84e98377c8fcf94307d5286b7 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bb6336 --- /dev/null +++ b/.gitignore @@ -0,0 +1,225 @@ +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlo + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# easy-todo +*.lod + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta diff --git a/README.html b/README.html new file mode 100644 index 0000000..8c1219e --- /dev/null +++ b/README.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +

Documentation for iidtitlepage package

+

TODO: what is it

+

Package installation

+

Put files iidtitlepage.sty and cvut-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}
+ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..91a3524 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# Documentation for `iidtitlepage` package +TODO: what is it + + +## Package installation +Put files `iidtitlepage.sty` and `cvut-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 +```latex +\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 +```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} + +% 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 +```latex +\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 +```latex +\begin{document} +... +\IidTitlePage{} +... +\maketitle +... +\end{document} +``` diff --git a/bibfile.bib b/bibfile.bib new file mode 100644 index 0000000..e753653 --- /dev/null +++ b/bibfile.bib @@ -0,0 +1,12 @@ +@article{modos2018, +title = "An example document using iidtitlepage package", +journal = "Computers \& Industrial Engineering", +volume = "112", +number = "Supplement C", +pages = "391 - 408", +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", +} \ No newline at end of file diff --git a/cvut-logo.pdf b/cvut-logo.pdf new file mode 100644 index 0000000..be93212 Binary files /dev/null and b/cvut-logo.pdf differ diff --git a/example.pdf b/example.pdf new file mode 100644 index 0000000..4b9322c Binary files /dev/null and b/example.pdf differ diff --git a/example.tex b/example.tex new file mode 100644 index 0000000..e148fc1 --- /dev/null +++ b/example.tex @@ -0,0 +1,28 @@ +\documentclass[twocolumn,a4paper,12pt]{article} + +\usepackage[elsevier]{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 new file mode 100644 index 0000000..d61d579 --- /dev/null +++ b/iidtitlepage.sty @@ -0,0 +1,97 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{iidtitlepage} + +\RequirePackage{etoolbox} +\RequirePackage{geometry} +\RequirePackage{graphicx} +\RequirePackage{hyperref} +\RequirePackage{bibentry} +\RequirePackage{natbib} +\RequirePackage{hyphenat} +\RequirePackage{xcolor} +\RequirePackage{mdframed} +\RequirePackage{fancyhdr} + +\newtoggle{iidieee} +\newtoggle{iidelsevier} + +\DeclareOption{ieee}{ \toggletrue{iidieee} } +\DeclareOption{elsevier}{ \toggletrue{iidelsevier} } +\ProcessOptions{} + +\newcommand{\IidTitlePageAuthors}[1]{ + \newcommand{\@IidTitlePageAuthors}{#1} +} + +\newcommand{\IidTitlePageYear}[1]{ + \newcommand{\@IidTitlePageYear}{#1} +} + +\newcommand{\IidTitlePageDoi}[1]{ + \newcommand{\@IidTitlePageDoi}{#1} +} + +\newcommand{\IidTitlePageCiteAs}[1]{ + \newcommand{\@IidTitlePageCiteAs}{#1} +} + +\newcommand{\IidTitlePageSourceCodes}[1]{ + \newcommand{\@IidTitlePageSourceCodes}{#1} +} + +\newcommand{\IidTitlePage}{ + \makeatletter + \nobibliography* + \definecolor{CtuBlue}{RGB}{0,125,198} + \fancypagestyle{IidTitlePageFancyStyle} + { + \fancyhf{} + \renewcommand{\headrulewidth}{0pt} + \fancyfoot[L]{\footnotesize + \iftoggle{iidelsevier}{ + \copyright~\@IidTitlePageYear. This manuscript version is made available under the CC-BY-NC-ND 4.0 license, see \url{http://creativecommons.org/licenses/by-nc-nd/4.0/} + }{} + \iftoggle{iidieee}{ + \copyright~\@IidTitlePageYear\ IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. + }{} + } + } + + \begin{titlepage} + \thispagestyle{IidTitlePageFancyStyle} + + \begin{figure} + \includegraphics[height=28mm]{cvut-logo.pdf} % CTU guidelines: recommended height of 28mm on a4 paper. + \end{figure} + \vspace{5cm} + + \noindent\nohyphens{{\LARGE \textbf{\@title}}} + + \vspace{0.3cm} + + \noindent\nohyphens{{\large \@IidTitlePageAuthors}} + + + \vfill + \begin{mdframed}[topline=false,bottomline=false,rightline=false,linecolor=CtuBlue,linewidth=2pt] + + \ifdef{\@IidTitlePageDoi}{ + \noindent\nohyphens{\textbf{DOI:} \url{\@IidTitlePageDoi}} + } + + + \noindent\nohyphens{\textbf{Cite as:} \bibentry{\@IidTitlePageCiteAs}} + + + \ifdef{\@IidTitlePageSourceCodes}{ + \noindent\nohyphens{\textbf{Source code:} \url{\@IidTitlePageSourceCodes}} + } + + \end{mdframed} + + \end{titlepage} + \makeatother + \restoregeometry{} +} + +\endinput \ No newline at end of file