Document ClassesNew class for teacher beamerarticle-teacher

Information and discussion about specific document classes and how to create your own document classes.
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

New class for teacher beamerarticle-teacher

Post by benoitldr »

Hello

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: New class for teacher beamerarticle-teacher

Post by Stefan Kottwitz »

Hi Benoit,

welcome to the forum!

That's an interesting news, thank you,

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

New class for teacher beamerarticle-teacher

Post by Johannes_B »

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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

New class for teacher beamerarticle-teacher

Post by benoitldr »

Johannes_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.
Hi

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 ;)
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

New class for teacher beamerarticle-teacher

Post by Johannes_B »

I had a look at the files about a week ago, and wanted to write something about the doc as well. You are defining a lot of stuff in there provided by the stanrdard ltxdoc.cls

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 563 times
classfile.cls
(5.73 KiB) Downloaded 549 times
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

Re: New class for teacher beamerarticle-teacher

Post by benoitldr »

Hey

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 !
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

New class for teacher beamerarticle-teacher

Post by benoitldr »

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 
I can't manage to make with makefile... your version work but only in directly I put some {} around if else fi and nothing always the same error do you have an idea ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

New class for teacher beamerarticle-teacher

Post by Johannes_B »

Hi Benoit, i was working on another support project yesterday using \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}}
Sorry for the trouble.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
benoitldr
Posts: 8
Joined: Sat Sep 13, 2014 6:35 pm

Re: New class for teacher beamerarticle-teacher

Post by benoitldr »

Hey

I have found this error also ;)

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

New class for teacher beamerarticle-teacher

Post by Johannes_B »

Please inform the guys in the french forum about the crosspost. They might be interested in the stuff we have been talking about (as i was reading with interest just there).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply