Latex Notebook



I made a resource for teaching people how to use Jupyter notebooks. Really it’s about learning LaTeX anywhere, but Jupyter notebooks are very well suited to this.

The notebook is available for download here.

An online LaTeX editor that's easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more. ' Sphinx and LaTeX transformation to apply on each notebook. Parameters - nb: NotebookNode Notebook being converted resources: dictionary.

1. Authentic resource

The jupyter notebook is available for download here. The intention is for it to be run on your free UCalgary syzygy server. The document can be read on Github, but on Syzygy it can be interacted with.

2. Background

LaTeX (pronounced “Lay-Tech” or “Laa-Tech” ) is a computer language used by mathematicians and physicists to nicely format mathematical expressions. Every math student will eventually need to know how to write in LaTeX, since all math journals are written using LaTeX. It is also used in every online platform that supports math writting, such as D2L discussion posts, Github, WordPress blogs, and Mathoverflow.

Jupyter notebooks are a file type that blends HTML, formatted text (markdown), formatted mathematical formulas (LaTeX) and runnable code (Python). It is the standard way that data scientists communicate with each other online.

Source: https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook

3. Description

My resource is an interactive guide to properly typing LaTeX. The format is a Jupyter notebook which is an authentic way in which LaTeX is used by data scientists. The resource could be used in any first-year course at the University of Calgary that requires written mathematics (such as MATH 265 – Calculus 1 or MATH 311 – Linear Algebra 2). The examples are geared towards students in those courses.

4. Rationale

This was designed to be used as a resource outside of class that students could use whenever they want, as often as they want. In this sense it is a “flipped or blended” resource [3]. The nature of a jupyter notebook (it’s a fancy text file) means that students necessarily must download their own version of it and edit it as they go. This encourages them to personalize the material and take ownership of it. They can even modify the examples in the text instantly see how it changes the outcome.

In the SAMR model [2] this is firmly in the “Redefinition” category, as the Jupyter notebook simultaneously acts as information, scratch pad, code compiler, notebook, and authentic outcome. In addition, completing the exercises in a Jupyter notebook is an authentic use of the skill being trained.

The main driver of solid pedagogical underpinnings is the Universal Design guidelines [1]. There I used all nine principles to make the resource more robust and drive student learning in many different, but natural, ways. In particular, the resource is low in passive learning, and high in active learning. Each section is a couple sentences, some examples, then right into activities. The activities are of use to a student in a first year math class, and many additional, alternative explanations are offered. See my activity design post for more discussion about this.

5. References

  1. CAST (2018). Universal Design for Learning Guidelines version 2.2. Retrieved from http://udlguidelines.cast.org
  2. Hamilton, Erica R., Joshua M. Rosenberg, and Mete Akcaoglu. “The substitution augmentation modification redefinition (SAMR) model: A critical review and suggestions for its use.” TechTrends 60.5 (2016): 433-441.
  3. Kelly, Patrick, and Isabelle Barette-Ng. “Small FLICS to Big Flips: A Step-by-Step Guide to Flipping Your Classroom.” (2015). https://prism.ucalgary.ca/handle/1880/50856

В настоящее время со следующей командой моего файла .ipynb :

С IPython 2.1 я получил латексный файл, который отформатирован со стандартным классическим стилем:

Мои вопросы:

  1. Что я должен сделать, чтобы получить следующий стиль, прямо из команды ipython?

  2. Почему приведенная выше команда не позволяет автору отображаться?

Как и OP, я не очень доволен выходом IPython 2 из nbconvert . Поскольку конвертер больше не использует класс документов Sphinx или систему предварительной обработки Sphinx, вы не можете использовать вызовы SphinxTransformer на линии nbconverter.

Грубый и сырой путь

Drop --post PDF поэтому nbconvert создает только файл .tex . Затем отредактируйте файл .tex чтобы сделать его более .tex . Затем запустите pdflatex на нем несколько раз.

Чтобы сделать себя автором, добавьте строку, как .tex ниже, после строки title в файле .tex :

Вы можете найти красивые шаблоны, которые помогут вам сделать вывод похожим на то, что вы хотите на latextemplates.com .

Путь пользователя root

Latex notebook

Другой подход заключается в том, чтобы свернуть новый шаблон, начиная с тех, что .../IPython/nbconvert/templates/latex в .../IPython/nbconvert/templates/latex . В качестве пользователя root добавьте файл report.tplx рядом с report.tplx и report.tplx . Следующая версия создает другой стиль вывода, который я лично считаю полезным. Блок «поля» создает фронт-материал для LaTex, а блок «predoc» создает команды и текст, которые вставлены в начале документа. Я затушевываю блок «maketitle», поэтому нет титульной страницы. Удалите мой пустой блок «maketitle», если вы хотите иметь титульную страницу с автором и дату.

(some) LaTeX Environments For Jupyter Notebook — Jupyter ...

Использование: nbconvert --to latex yourNotebook.ipynb --template article1 --to PDF

Решение этой проблемы – настоящая боль в сущности. Мне также понравились стили iPython 0.x и 1.x. Если вам это нужно , вот как вы можете это сделать.

Люди упомянули, что вы можете создать свой собственный шаблон. Ну, у iPython 1.x были отличные шаблоны, поэтому давайте их использовать. Я предполагаю, что у вас есть root на вашей машине, потому что мы собираемся взломать наш шаблон iPython / каталог латекса.

Теперь, следующий шаг – применить патч к sphinx.tplx.

Вырежьте и вставьте вышеуказанный код, чтобы создать файл исправления. Затем вы можете применить его с:

Мы еще не закончили. Эти шаблоны нуждаются в некоторой поддержке.

Мы сделаем это снова в каталоге, где вы хотите конвертировать жизнь в блокнот. Мы собираемся создать два файла python. Первый (я назвал его oldschool.py) делает предварительную обработку, необходимую для использования старых шаблонов. Он в основном выскользнул из версии 1.x nbconvert / transformers / sphinx.py iPython и взломан как современный препроцессор:

Последний файл прост ({config.py}).

Теперь в командной строке вы можете:

Question Paper Template In LaTeX?

Если вы хотите использовать базовый файл (aka, {old_latex_basic.tplx)), вам придется взломать основной блок кода, который мы добавили в sphinx.tplx (часть между комментариями% MEF NEW NEW MEF).

See More Results

Возможно, вам придется либо выбрать другой шаблон , либо создать собственный. Попробуйте, например, добавить аргумент --template book в команду nbconvert .

Typography - What Is The Degree Symbol? - TeX - LaTeX Stack ...

Так как у IPython 2 больше нет шаблона book , вам, вероятно, придется катиться самостоятельно.