Document Classes ⇒ New class for teacher beamerarticle-teacher
New class for teacher beamerarticle-teacher
I developed a new class for teacher which permits from one source .tex to generate (with Makefile)
- BEAMER for presentation
- ARTICLE for STUDENT
- ARTICLE for TEACHER
Give me some feedback if you have time to test it.
The source is on GPLv2 here : https://github.com/landrieb/beamerarticle-teacher
see you
Benoit
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: New class for teacher beamerarticle-teacher
welcome to the forum!
That's an interesting news, thank you,
Stefan
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
New class for teacher beamerarticle-teacher
You are using if-switches in the class file for bools that were defined in the user document.
You switch the cls file into two different paths and load the same statement in both (i.e.
\NeedsTeXFormat{LaTeX2e}
). Why not doing this before checking the mode?Also, if you are writing the same thing more than once, consider defining a macro for that. This is in your case Chapitre 1 : Second degré.
It would be better to save second degré in a macro and use this macro in the different places. Make sure not to number things manually, but let LaTeX do it, as this can be very error-prone.
If you want to read more about developing own class and package files, please have a look at clsguide.
New class for teacher beamerarticle-teacher
HiJohannes_B wrote:I looked at your files but the implementation still is a bit messy.
You are using if-switches in the class file for bools that were defined in the user document.
You switch the cls file into two different paths and load the same statement in both (i.e.\NeedsTeXFormat{LaTeX2e}
). Why not doing this before checking the mode?
Also, if you are writing the same thing more than once, consider defining a macro for that. This is in your case Chapitre 1 : Second degré.
It would be better to save second degré in a macro and use this macro in the different places. Make sure not to number things manually, but let LaTeX do it, as this can be very error-prone.
If you want to read more about developing own class and package files, please have a look at clsguide.
I modified the class (now only one .cls), the github is updated with example and doc (in french only...)
https://github.com/landrieb/beamerarticle-teacher
if you're interested

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
New class for teacher beamerarticle-teacher
Back to the modified beamer class. I made some comments and improvements (at least i think so). Please have a look.
I just diffed with the latest commit, hence the different name.
- Attachments
-
- beamerarticle-teacher-example.tex
- (5.29 KiB) Downloaded 575 times
-
- classfile.cls
- (5.73 KiB) Downloaded 562 times
Re: New class for teacher beamerarticle-teacher
Thanks you for your return !
I have a look and it's definitely proper and more in latex class spirit

I will test and modify my source of tex to be compatible with your version !
New class for teacher beamerarticle-teacher
Code: Select all
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(./beamerarticle-teachert.cls
Document Class: beamerarticle-teachert 2014/09/17 V2.0.a beamerarticle-teachert
)
! Incomplete \ifeof; all text was ignored after line 25.
<inserted text>
\fi
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
New class for teacher beamerarticle-teacher
\InputIfFileExists
and noticed i used it wrong. Then i tought, this musst also be wrong in the document of that french guy, but it slipped my mind. The command
\InputIfFileExists
takes three arguments, the first is the filename, the second argument is processed if the file is found an input, the last is processed if the file was not found. A little bit like this:
Code: Select all
\InputIfFileExists{flag}{\typeout{Reading flag-file}}{\typeout{no flag-file found}}
Re: New class for teacher beamerarticle-teacher
I have found this error also

this option is great no need to modify the cls if you want to compile directly !
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm