]> rtime.felk.cvut.cz Git - modosist/iidtitlepage.git/commitdiff
Initial dump
authorIstvan Modos <istvan.modos@cvut.cz>
Mon, 15 Jan 2018 12:51:58 +0000 (13:51 +0100)
committerIstvan Modos <istvan.modos@cvut.cz>
Mon, 15 Jan 2018 12:51:58 +0000 (13:51 +0100)
.gitignore [new file with mode: 0644]
README.html [new file with mode: 0644]
README.md [new file with mode: 0644]
bibfile.bib [new file with mode: 0644]
cvut-logo.pdf [new file with mode: 0644]
example.pdf [new file with mode: 0644]
example.tex [new file with mode: 0644]
iidtitlepage.sty [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..9bb6336
--- /dev/null
@@ -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 (file)
index 0000000..8c1219e
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta name="generator" content="pandoc" />
+  <title></title>
+  <style type="text/css">code{white-space: pre;}</style>
+  <style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+  margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+  </style>
+</head>
+<body>
+<h1 id="documentation-for-iidtitlepage-package">Documentation for <code>iidtitlepage</code> package</h1>
+<p>TODO: what is it</p>
+<h2 id="package-installation">Package installation</h2>
+<p>Put files <code>iidtitlepage.sty</code> and <code>cvut-logo.pdf</code> into the root directory of your article, i.e., where your main <code>.tex</code> file is located. The package has a few dependencies, you may either check them in <code>.sty</code> file (<code>\RequirePackage</code> commands) or just keep building your article until you will have no errors left ;).</p>
+<p>TODO: installation to system LaTeX?</p>
+<h2 id="package-usage">Package usage</h2>
+<p>File <code>example.tex</code> shows a complete example on how to use the package.</p>
+<p>To import the package, use following</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="bu">\usepackage</span>[elsevier]{<span class="ex">iidtitlepage</span>}</code></pre></div>
+<p>The package has one mandatory argument which is either <code>elsevier</code> or <code>ieee</code>, depending on the publisher of your article.</p>
+<p>Then, you need to provide some mandatory information such as title name, authors, year and citation text</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="co">% Title.</span>
+<span class="fu">\title</span>{An example document using <span class="fu">\texttt</span>{iidtitlepage} package}
+
+<span class="co">% Authors.</span>
+<span class="co">% Unfortunately, we cannot use \author command, since some journal templates require to use a specific macros that might be not compatible with the package.</span>
+<span class="fu">\IidTitlePageAuthors</span>{Istv<span class="fu">\'</span>{a}n M<span class="fu">\'</span>{o}dos, Va<span class="fu">\v</span>{s}ek Chv<span class="fu">\'</span>{a}tal}
+
+<span class="co">% Year of publication.</span>
+<span class="fu">\IidTitlePageYear</span>{2017}
+
+<span class="co">% How to cite this article. Can be either full-text or, as in this case, a bibtex entry.</span>
+<span class="fu">\IidTitlePageCiteAs</span>{modos2018}</code></pre></div>
+<p>You may specify some optional information such as DOI and source code url</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="fu">\IidTitlePageDoi</span>{https://doi.org/10.1016/j.cie.2017.08.011}
+<span class="fu">\IidTitlePageSourceCodes</span>{https://github.com/torvalds/linux}</code></pre></div>
+<p>After all information is specified, call <code>\IidTitlePage{}</code> to create a title page</p>
+<div class="sourceCode"><pre class="sourceCode latex"><code class="sourceCode latex"><span class="kw">\begin</span>{<span class="ex">document</span>}
+...
+<span class="fu">\IidTitlePage</span>{}
+...
+<span class="fu">\maketitle</span>
+...
+<span class="kw">\end</span>{<span class="ex">document</span>}</code></pre></div>
+</body>
+</html>
diff --git a/README.md b/README.md
new file mode 100644 (file)
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 (file)
index 0000000..e753653
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..4b9322c
Binary files /dev/null and b/example.pdf differ
diff --git a/example.tex b/example.tex
new file mode 100644 (file)
index 0000000..e148fc1
--- /dev/null
@@ -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 (file)
index 0000000..d61d579
--- /dev/null
@@ -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