Your Affiliation
This document serves as a comprehensive guide to using the rformat.php
template for writing and publishing papers. It explains all the features available and provides instructions on how to use them effectively.
To begin using rformat.php
, include the rpapersrender.php
file in your script. This file contains all the necessary functions to render different sections of your paper.
<?php
include '../inc/rpapersrender.php';
?>
Use the renderTextSection
function to create text sections in your paper. You can specify the title, content, heading level, and an optional ID for cross-referencing.
<?php
renderTextSection(
'Section Title',
'Section content goes here.',
1, // Heading level
'section-id' // Optional ID
);
?>
You can include images in your paper using the renderImageSection
function. It supports single images with positions (left, right, center) and captions.
<?php
renderImageSection('Figure 1: Example Image', [
'type' => 'single',
'src' => 'path/to/image.jpg',
'position' => 'center',
'caption' => 'An example image.'
]);
?>
To place an image alongside text, use the renderImageWithText
function. You can position the image to the left or right of the text.
<?php
renderImageWithText('Section Title', [
'src' => 'path/to/image.jpg',
'position' => 'left', // 'left' or 'right'
'text' => 'Text content goes here.',
'caption' => 'Image caption (optional)'
]);
?>
To display multiple images in a grid layout, use the renderImageSection
function with 'type' => 'grid'
. Specify the images and the number of columns.
<?php
renderImageSection('Figure 2: Image Grid', [
'type' => 'grid',
'images' => [
'path/to/image1.jpg',
'path/to/image2.jpg',
'path/to/image3.jpg'
],
'columns' => 3
]);
?>
Include mathematical equations using the renderEquation
function. Equations are written in LaTeX format and rendered using MathJax.
<?php
renderEquation('E = mc^2', 'equation-id');
?>
Use the renderTable
function to include tables in your paper. Provide the table title, headers, data, optional caption, and an optional ID.
<?php
$headers = ['Header 1', 'Header 2'];
$data = [
['Row 1 Col 1', 'Row 1 Col 2'],
['Row 2 Col 1', 'Row 2 Col 2']
];
renderTable('Table 1: Example Table', $headers, $data, 'Table caption', 'table-id');
?>
Include code snippets using the renderCodeBlock
function. You can specify the programming language for syntax highlighting.
<?php
renderCodeBlock('Example Code', "<?php
echo 'Hello, World!';
?>", 'php', 'code-id');
?>
Add footnotes to your paper using the renderFootnote
function. Place a superscript number where the footnote reference should appear.
This is an example sentence with a footnote.1
Cite sources in your paper and list them in the references section. Use anchor tags to link citations to reference entries.
<p>According to Smith (2020)<a href='#ref-1'>[1]</a>, the results are significant.</p>
Create ordered and unordered lists using the renderList
function.
<?php
$items = ['Item 1', 'Item 2', 'Item 3'];
renderList($items, true); // Ordered list
renderList($items, false); // Unordered list
?>
Include supplementary material in appendices using the renderAppendix
function.
<?php
renderAppendix('Appendix A: Additional Information', 'Content of the appendix.', 'appendix-a');
?>
This guide has covered all the features available in rformat.php
for writing and publishing papers. Use this document as a reference to utilize all the functionalities effectively.