LaTeX forum ⇒ 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

Postby benoitldr » Sat Sep 13, 2014 6:39 pm

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

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8523
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Sep 15, 2014 2:32 pm

Hi Benoit,

welcome to the forum!

That's an interesting news, thank you,

Stefan
Site admin

User avatar
Johannes_B
Site Moderator
Posts: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Sep 16, 2014 10:21 am

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

Postby benoitldr » Fri Sep 26, 2014 8:56 pm

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: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Oct 05, 2014 7:10 pm

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 187 times
classfile.cls
(5.73 KiB) Downloaded 168 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

Postby benoitldr » Sun Oct 05, 2014 7:21 pm

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

Postby benoitldr » Sun Oct 05, 2014 8:08 pm

  1. LaTeX2e <2014/05/01>
  2. Babel <3.9k> and hyphenation patterns for 78 languages loaded.
  3. (./beamerarticle-teachert.cls
  4. Document Class: beamerarticle-teachert 2014/09/17 V2.0.a beamerarticle-teachert
  5.  
  6. )
  7. ! Incomplete \ifeof; all text was ignored after line 25.
  8. <inserted text>
  9. \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: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Oct 06, 2014 9:22 am

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:
  1. \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

Postby benoitldr » Mon Oct 13, 2014 8:13 pm

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: 3582
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Oct 29, 2014 9:09 pm

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.


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 1 guest