% ============================================================================
% main-biblatex.tex — Comprehensive INFEDU example (biblatex + biber, APA)
% ============================================================================
% This file is intended as a practical, "copy-and-edit" starting point for
% authors preparing a manuscript for *Informatics in Education (INFEDU)*.
%
% Bibliography workflow in this example:
%   - biblatex + biber
%   - APA author–date style via biblatex-apa (style=apa)
%
% IMPORTANT:
%   - For biblatex, do NOT load natbib.
%   - The INFEDU class loads natbib by default. To prevent that, keep the
%     provided vtexnatbib.sty stub in the same folder as this file.
%
% Compile (command line):
%   lualatex main-biblatex.tex
%   biber    main-biblatex
%   lualatex main-biblatex.tex
%   lualatex main-biblatex.tex
%
% (MiKTeX/TeXstudio/TeXworks: set the bibliography tool to Biber.)
% ============================================================================

\documentclass{infedu}

% ----------------------------------------------------------------------------
% Journal metadata (keep placeholders if unknown at submission stage)
% ----------------------------------------------------------------------------
\volume{0}
\issue{0}
\pubyear{2026}
\articletype{research-article}
\doi{10.15388/infedu.0000.000}
\received{January 2, 2026}

% ----------------------------------------------------------------------------
% Copyright line in the header
% ----------------------------------------------------------------------------
% The current class prints "\copyright\ <year> Vilnius University".
% The journal's copyright notice states that, from Vol. 20(1) (2021), copyright
% and publishing rights are held by the author. Adjusting \@publisher updates
% the header without editing the class file.
\makeatletter
\def\@publisher{Authors}
\makeatother

% ----------------------------------------------------------------------------
% Language + quotation handling (recommended for biblatex)
% ----------------------------------------------------------------------------
\usepackage[american]{babel}
\usepackage{csquotes}

% ----------------------------------------------------------------------------
% Tables and small utilities
% ----------------------------------------------------------------------------
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{longtable}

% ----------------------------------------------------------------------------
% Bibliography (biblatex + APA)
% ----------------------------------------------------------------------------
% Compatibility note:
%   The INFEDU class defines a counter named "author" (used for front-matter)
%   and also defines \bibfont. Both names are also used internally by biblatex.
%   Without the small reset below you will see errors like:
%     ! LaTeX Error: Command \c@author already defined.
%     ! LaTeX Error: Command \bibfont already defined.
%
%   We reset those names *before* loading biblatex so biblatex can define its
%   own internals cleanly.
\makeatletter
\let\bibfont\relax
\let\c@author\relax
\makeatother

\usepackage[
  backend=biber,
  style=apa,
  natbib=true, % enables \citet/\citep aliases in addition to \textcite/\parencite
  sortcites=true
]{biblatex}
% Keep the bibliography font consistent with the INFEDU class defaults.
\renewcommand*{\bibfont}{\footnotesize}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{references.bib}

% ----------------------------------------------------------------------------
% Front matter
% ----------------------------------------------------------------------------
\begin{document}

\pretitle{Research Article}
% NOTE: The INFEDU class' \title does **not** take an optional short title.
% Use \runtitle for the running header instead.
\title{A Comprehensive \LaTeX\ Template for INFEDU Using \texttt{biblatex} (APA Author--Date)}
\runtitle{INFEDU \LaTeX\ Template (biblatex)}

\begin{frontmatter}

\author[a]{\inits{A.}~\fnms{Alice}~\snm{Author}\ead[label=e1]{alice.author@example.edu}\orcid{0000-0000-0000-0000}}
\author[b]{\inits{B.}~\fnms{Bob}~\snm{Contributor}\ead[label=e2]{bob.contributor@example.edu}\orcid{0000-0000-0000-0000}}

\address[a]{Department of Example Studies, Example University, Example City, Country}
\address[b]{Institute of Sample Research, Sample University, Sample City, Country}

\begin{abstract}
This document is a neutral, demonstration-only manuscript showing how to prepare
an INFEDU submission in \LaTeX\ with common elements such as sections, subsections
and subsubsections, tables, figures, mathematics, lists, cross-references,
appendices, and an APA-style bibliography.

The text focuses on *how* things are done rather than reporting real results.
Authors can replace the placeholder content with their own study while keeping
structure and formatting.
\end{abstract}

\begin{keywords}
\kwd{INFEDU}
\kwd{\LaTeX\ template}
\kwd{APA}
\kwd{biblatex}
\kwd{tables and figures}
\end{keywords}

\end{frontmatter}

% ============================================================================
\section{Introduction}
% ============================================================================

This section illustrates the typical opening of a manuscript. Write complete
paragraphs and avoid manual line breaks (do not use \\ to format paragraphs).
The INFEDU class produces fully justified text by default.

Citations in this example use APA author--date formatting. In \texttt{biblatex},
use \verb|\textcite| for narrative citations and \verb|\parencite| for
parenthetical citations. For example, \textcite{lamport1994} introduces the
\LaTeX\ system, and a general APA guideline is provided by
\parencite{apa2020manual}.

\subsection{Document structure and cross-references}

Use \verb|\label| and \verb|\ref| to create cross-references. For example,
Table~\ref{tab:basic} demonstrates a compact table, while
Figure~\ref{fig:placeholder} shows a figure with a placeholder graphic.

\subsubsection{Subsubsections}

INFEDU supports standard sectioning down to subsubsections. Use deeper levels
only when they improve readability.

\paragraph{Inline formatting}
Use \emph{italics} for emphasis, \textbf{bold} sparingly, and \texttt{monospace}
for literal code or file names (e.g., \texttt{references.bib}). Quotation marks
should be typeset with \verb|\enquote{...}| from \texttt{csquotes}, for example
\enquote{this is a quoted phrase}.

% ============================================================================
\section{Tables}
% ============================================================================

Tables should be created with the \texttt{table} float, a caption, and a label.
Place \verb|\label| after \verb|\caption| so references point to the correct
number.

\begin{table}[t]
\caption{A basic table with aligned columns and a clear caption.}
\label{tab:basic}
\centering
\begin{tabular}{@{}llr@{}}
\toprule
Category & Description & Count \\
\midrule
A & Short text & 12 \\
B & Slightly longer text & 5 \\
C & Text with a number (e.g., 3.14) & 19 \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Tables with paragraph columns}

When table cells contain longer text, use paragraph columns (\verb|p{...}|) to
wrap the content neatly.

\begin{table}[t]
\caption{A table using paragraph columns for wrapped text.}
\label{tab:wrapped}
\centering
\begin{tabular}{@{}p{0.22\linewidth}p{0.65\linewidth}@{}}
\toprule
Element & Guidance \\
\midrule
Captions & Write complete, descriptive captions that allow a table to be
understood without reading the main text. \\
Alignment & Use consistent alignment: text in left-aligned columns and numbers
right-aligned when appropriate. \\
\bottomrule
\end{tabular}
\end{table}

% ============================================================================
\section{Figures}
% ============================================================================

Figures should be provided as vector graphics (PDF/SVG via conversion) when
possible, or as high-resolution raster images. In a template, it is useful to
include a placeholder figure that compiles without external files.

\begin{figure}[t]
\centering
\fbox{\parbox{0.85\linewidth}{\centering
\vspace{1.5cm}
Placeholder figure area\\
(Replace this box with \texttt{\textbackslash includegraphics})
\vspace{1.5cm}}}
\caption{A placeholder figure with a descriptive caption.}
\label{fig:placeholder}
\end{figure}

% ============================================================================
\section{Mathematics}
% ============================================================================

Use \texttt{amsmath} environments (already loaded by the INFEDU class) for
displayed equations. Inline math uses \verb|$...$|, for example $a^2+b^2=c^2$.

\subsection{Single equations}

\begin{equation}
\label{eq:single}
\mathrm{RMSE} = \sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(\hat{y}_i-y_i\right)^2}.
\end{equation}

Equation~\ref{eq:single} is referenced with \verb|\ref|.

\subsection{Aligned equations}

\begin{align}
\label{eq:align}
\mathbf{w}_{t+1} &= \mathbf{w}_{t} - \eta\,\nabla\mathcal{L}(\mathbf{w}_{t}),\\
\mathcal{L}(\mathbf{w}) &= \frac{1}{n}\sum_{i=1}^{n}\ell\bigl(f_{\mathbf{w}}(\mathbf{x}_i),\,y_i\bigr).
\end{align}

% ============================================================================
\section{Lists}
% ============================================================================

Lists are useful for concise exposition. Use \texttt{itemize} for unordered
lists and \texttt{enumerate} for ordered steps.

\subsection{Unordered lists}
\begin{itemize}
  \item Use one sentence or phrase per item.
  \item Keep punctuation consistent across items.
  \item Avoid excessive nesting.
\end{itemize}

\subsection{Ordered lists}
\begin{enumerate}
  \item Prepare the manuscript content (sections, figures, tables).
  \item Ensure references compile correctly (see Section~\ref{sec:refs}).
  \item Run a final build that resolves all cross-references.
\end{enumerate}

\subsection{Description lists}
\begin{description}
  \item[Goal] Demonstrate common INFEDU structures.
  \item[Non-goal] Report new empirical findings.
\end{description}

% ============================================================================
\section{Citations and references}
\label{sec:refs}
% ============================================================================

This section demonstrates typical citation patterns.

\subsection{Narrative and parenthetical citations}
\begin{itemize}
  \item Narrative: \textcite{knuth1984} discusses typesetting systems.
  \item Parenthetical: This is a parenthetical citation (\parencite{knuth1984}).
\end{itemize}

\subsection{Citing different entry types}
APA-style author--date citations work the same way for journal articles
(\textcite{smith2020}), edited-book chapters (\parencite{doe2019chapter}),
conference papers (\parencite{miller2022conf}), and web resources
(\parencite{who2023}).

\subsection{Citing multiple sources}
Multiple sources can be cited together \parencite{lamport1994,apa2020manual}.

\subsection{Adding page numbers for quotations}
For quotations or precise locations, add a postnote argument, e.g.,
\parencite[p.~44]{lamport1994}.

\subsection{A short code example}
Short code can be typeset with the built-in \texttt{verbatim} environment:

\begin{verbatim}
% Example: a labelled equation
\begin{equation}
  \label{eq:example}
  E = mc^2
\end{equation}
\end{verbatim}

% ============================================================================
\section{Conclusion}
% ============================================================================

This template demonstrates commonly required manuscript elements. In a real
submission, replace the placeholder text with the study content while keeping
the structural pattern: consistent sectioning, properly captioned floats,
mathematics in \texttt{amsmath} environments, and citations produced by the
selected bibliography workflow.

% ============================================================================
% Acknowledgements and funding (optional)
% ============================================================================

\begin{acknowledgement}[title={Acknowledgements}]
This section can acknowledge contributors, reviewers, or institutional support.
If there are no acknowledgements, this environment can be omitted.
\end{acknowledgement}

\begin{funding}
If the work was supported by a grant, describe it here (grant number, funder).
If there is no external funding, this environment can be omitted.
\end{funding}

% ============================================================================
% Appendix (optional)
% ============================================================================

\begin{appendix}
\section{Appendix: Example of a long table}

For material that is useful but not essential to the main narrative, place it
in an appendix. Long tables may be placed in an appendix using \texttt{longtable}.

\begin{longtable}{@{}ll@{}}
\caption{A small longtable example (continues automatically if needed).}\label{tab:long}\\
\toprule
Field & Meaning \\
\midrule
\endfirsthead
\toprule
Field & Meaning (continued) \\
\midrule
\endhead
Title & Manuscript title as it should appear in print. \\
Runtitle & Short title used in running headers. \\
DOI & Digital Object Identifier for the article (if assigned). \\
\bottomrule
\end{longtable}
\end{appendix}

% ============================================================================
% References
% ============================================================================

\printbibliography[title={References}]

% ============================================================================
% Author biographies (optional)
% ============================================================================

\begin{biography}\label{bio:author1}
\author{A. Author}
Alice Author is a placeholder author used to demonstrate the biography format.
Replace this text with a short biographical note (position, affiliation,
research interests).
\end{biography}

\begin{biography}\label{bio:author2}
\author{B. Contributor}
Bob Contributor is a placeholder author used to demonstrate the biography
format.
\end{biography}

\end{document}
