npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tex2gift2tex

v0.0.0

Published

```js import {tex2GIFT, GIFT2tex} from "tex2gift2tex";

Downloads

7

Readme

Usage:

import {tex2GIFT, GIFT2tex} from "tex2gift2tex";

// Translate a LaTeX File into a GIFT file. LaTeX files must be formatted.
tex2GIFT(/* Filepath and filename of latex file*/,/* Filepath and filename of gift file */ );

// Translate a GIFT File into a LaTeX file. GIFT files must be formatted.
GIFT2tex(/* Filepath and filename of GIFT file*/, /* Filepath and filename of LaTeX file */ );

LaTeX file format

To be translated into a gift file, Latex files must have at least one \questions environment.

Every \question in the environment will be turned into a single gift question.

Example

The following example has questions essay questions, true/false questions, short answer questions, numerical questions and multiple choice questions.

\documentclass{exam}
\usepackage{amsmath}
\usepackage{amsfonts}
\begin{document}

    \section{Respuestas redacción}
    \begin{questions}
        \question Redacción 1. Sin extras.
        \question Redacción 2. \underline{\hspace{3cm}}. Con un subrayado. 
        \question Redacción 3.  \[\int_{0}^{\infty} \frac{\sin(x)}{x}\] . Con fórmula.
        \question Redacción 4.  \[\int_{0}^{\infty} \frac{\sin(x)}{x}\] . \underline{\hspace{3cm}}. Con subrayado y fórmula.
    \end{questions}

    \section{Respuestas verdadero falso}
    \begin{questions}
        \question VF 1. Sin extras. Respuesta al final del enunciado. \fillin[T]
        \question VF 2. \fillin[F] Sin extras. Respuesta en medio del enunciado
        \question \fillin[verdadero] VF 3. Sin extras. Respuesta al inicio del enunciado
        \question VF 4.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al final del enunciado. \fillin[T]
        \question VF 5. \fillin[F]  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta en medio del enunciado
        \question \fillin[falso] VF 6.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al inicio del enunciado
        \question VF 7. \underline{\hspace{3cm}}. Con un subrayado. Respuesta al final del enunciado. \fillin[True]
        \question VF 8. \fillin[False] \underline{\hspace{3cm}}. Con un subrayado.  Respuesta en medio del enunciado
        \question \fillin[mentira] VF 9. \underline{\hspace{3cm}}. Con un subrayado.  Respuesta al inicio del enunciado
        \question VF 10.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula. Respuesta al final del enunciado. \fillin[T]
        \question VF 11. \fillin[F]  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula. Respuesta en medio del enunciado
        \question \fillin[falso] VF 12.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ .\underline{\hspace{3cm}}. Con subrayado y fórmula. Respuesta al inicio del enunciado
    \end{questions}

    \section{Respuestas cortas y numéricas}
    \begin{questions}
        \question Corta 1. Sin extras. Respuesta al final del enunciado. \fillin[respuesta]
        \question Corta 2. \fillin[respuesta] Sin extras. Respuesta en medio del enunciado
        \question \fillin[respuesta] Corta 3. Sin extras. Respuesta al inicio del enunciado
        \question Corta 4.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al final del enunciado. \fillin[respuesta]
        \question Corta 5. \fillin[respuesta]  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta en medio del enunciado
        \question \fillin[respuesta] Corta 6.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al inicio del enunciado

        \question Numérica 1. Sin extras. Respuesta al final del enunciado. \fillin[3.14]
        \question Numérica 2. \fillin[3.14] Sin extras. Respuesta en medio del enunciado
        \question \fillin[3.14] Numérica 3. Sin extras. Respuesta al inicio del enunciado
        \question Numérica 4.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al final del enunciado. \fillin[3.14]
        \question Numérica 5. \fillin[3.14]  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta en medio del enunciado
        \question \fillin[3.14] Numérica 6.  $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . Con fórmula. Respuesta al inicio del enunciado
    \end{questions}

    \section{Respuesta tipo test}
    \begin{questions}
        \question Única correcta 1. Usando checkboxes. Primera correcta.
            \begin{checkboxes}
                \correctchoice Correcta. Sin extras.
                \choice Incorrecta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \choice Incorrecta. \underline{\hspace{3cm}}. Con subrayado
                \choice Incorrecta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{checkboxes}
        \question Única correcta 2. Usando choices. Segunda correcta.
            \begin{choices}
                \choice Incorrecta. Sin extras.
                \correctchoice Correcta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \choice Incorrecta. \underline{\hspace{3cm}}. Con subrayado
                \choice Incorrecta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{choices}
        \question Única correcta 3. Usando oneparchoices. Última correcta.
            \begin{oneparchoices}
                \choice Incorrecta. Sin extras.
                \choice Incorrecta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \choice Incorrecta. \underline{\hspace{3cm}}. Con subrayado
                \correctchoice Correcta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{oneparchoices}
        
            \question Múltiples correctas 1. Usando checkboxes. Primera y segunda correcta.
            \begin{checkboxes}
                \correctchoice Correcta. Sin extras.
                \correctchoice Correcta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \choice Incorrecta. \underline{\hspace{3cm}}. Con subrayado
                \choice Incorrecta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{checkboxes}
        \question Múltiples correctas 2. Usando choices. Tercera y última correcta.
            \begin{choices}
                \choice Incorrecta. Sin extras.
                \choice Incorrecta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \correctchoice Correcta. \underline{\hspace{3cm}}. Con subrayado
                \correctchoice Correcta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{choices}
        \question Múltiples correctas 3. Usando oneparchoices. Primera y última correcta.
            \begin{oneparchoices}
                \correctchoice Correcta. Sin extras.
                \choice Incorrecta. $\begin{pmatrix} 1 & 0 & 1 \\ 2 & 1 & 0 \\ 3 & 1 & 0 \end{pmatrix}X=\begin{pmatrix} 6 & 4 & 2 \\ 7 & 6 & 5 \\ 10 & 8 & 6 \end{pmatrix}$. Con fórmula.
                \choice Incorrecta. \underline{\hspace{3cm}}. Con subrayado
                \correctchoice Correcta. $ \int_{0}^{\infty} \frac{\sin(x)}{x} $ . \underline{\hspace{3cm}}. Con subrayado y fórmula.
            \end{oneparchoices}

    \end{questions}
    
    

\end{document}

Question limitations

Short answer and numerical questions

Short answer and numerical questions cannot have multiple answers nor underlines, and its answers cannot have underlines or math formulas or be empty.

Multiple Choice questions

Multiple choice questions cannot have any \fillin[] macros.

GIFT file format.

The following example has questions essay questions, true/false questions, short answer questions, numerical questions, multiple choice questions and matching questions.

Redacción 1. Sin extras.{}

Redacción 2. _____. Con un subrayado.{}

Redacción 3. $$ \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}\\ $$ . Con fórmula.{}

Redacción 4. $$ \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}\\ $$ . _____. Con subrayado y fórmula.{}

Redacción 5. Sin extras.{} Respuesta en medio.

Redacción 6. _____. Con un subrayado.{} Respuesta en medio.

Redacción 7. $$ \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}\\ $$ . Con fórmula. {} Respuesta en medio.

Redacción 8. $$ \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}\\ $$ . _____. Con subrayado y fórmula. {} Respuesta en medio.

VF 1. Sin extras. Respuesta al final del enunciado.{T}

VF 2.  Sin extras. {F} Respuesta en medio del enunciado

{T} VF 3. Sin extras. Respuesta al inicio del enunciado

VF 4. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al final del enunciado.{T}

VF 5.  $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. {F} Respuesta en medio del enunciado

{F} VF 6. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al inicio del enunciado

VF 7. _____. Con un subrayado. Respuesta al final del enunciado.{T}

VF 8. _____. Con un subrayado. {F} Respuesta en medio del enunciado

{F} VF 9. _____. Con un subrayado. Respuesta al inicio del enunciado

VF 10. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula. Respuesta al final del enunciado.{T}

VF 11.  $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula. {T} Respuesta en medio del enunciado

{T} VF 12. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ ._____. Con subrayado y fórmula. Respuesta al inicio del enunciado

Corta 1. Sin extras. Respuesta al final del enunciado. {=respuesta}

Corta 2. {=respuesta} Sin extras. Respuesta en medio del enunciado

{=respuesta} Corta 3. Sin extras. Respuesta al inicio del enunciado

Corta 4. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al final del enunciado. {=respuesta}

Corta 5. {=respuesta} $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta en medio del enunciado

{=respuesta} Corta 6. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al inicio del enunciado

Numerica 1. Sin extras. Respuesta al final del enunciado. {#3.14:0.1}

Numerica 2. {#3.14:0.1} Sin extras. Respuesta en medio del enunciado

{#3.14:0.1} Numerica 3. Sin extras. Respuesta al inicio del enunciado

Numerica 4. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al final del enunciado. {#3.14:0.1}

Numerica 5. {#3.14:0.1} $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta en medio del enunciado

{#3.14:0.1} Numerica 6. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . Con fórmula. Respuesta al inicio del enunciado

Única correcta 1.  Primera correcta.{
    =Correcta. Sin extras.
    ~Incorrecta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~Incorrecta. _____. Con subrayado
    ~Incorrecta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}



Única correcta 2.  Segunda correcta.{
    ~Incorrecta. Sin extras.
    =Correcta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~Incorrecta. _____. Con subrayado
    ~Incorrecta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}



Única correcta 3. Última correcta.{
    ~Incorrecta. Sin extras.
    ~Incorrecta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~Incorrecta. _____. Con subrayado
    =Correcta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}



Múltiples correctas 1. Primera y segunda correcta.{
    ~%50.00%Correcta. Sin extras.
    ~%50.00%Correcta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~%-50.00%Incorrecta. _____. Con subrayado
    ~%-50.00%Incorrecta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}


Múltiples correctas 2. Tercera y última correcta.{
    ~%-50.00%Incorrecta. Sin extras.
    ~%-50.00%Incorrecta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~%50.00%Correcta. _____. Con subrayado
    ~%50.00%Correcta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}


Múltiples correctas 3. Primera y última correcta. Pesos variados{
    ~%25.00%Correcta. Sin extras.
    ~%-90.00%Incorrecta. $$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$. Con fórmula.
    ~%-10.00%Incorrecta. _____. Con subrayado
    ~%75.00%Correcta. $$  \\int_\{0\}^\{\\infty\} \\frac\{\\sin(x)\}\{x\}  $$ . _____. Con subrayado y fórmula.
}

Relación 1. {
   =Sin extras. -> Sin extras.
   =$$ \\begin\{pmatrix\} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 3 & 1 & 0 \\end\{pmatrix\}X\=\\begin\{pmatrix\} 6 & 4 & 2 \\\\ 7 & 6 & 5 \\\\ 10 & 8 & 6 \\end\{pmatrix\} $$  -> Con fórmula
   }

Question limitations

Aside from the limitations of the GIFT format:

Short answer and numerical questions

Short answer and numerical questions cannot have underlines, and its answers cannot have underlines or math formulas.

Matching questions

Matching questions will turn into short answer questions when translated to LaTeX, so the same limitations apply. Short answer and numerical questions cannot have underlines, and its answers cannot have underlines or math formulas.