Frontmatter and Endmatter Commands - FLexam 2023.05.21 Documentation (2023)

headline News

Any Latex command can appear in the Frontmatter area, but FLexam will evaluate itonlyAfter processing the following FLexam commands (these FLexam commands arecontinuouslyare calculated in the following order, regardless of where they appear in the Frontmatter area):

  • Exam appearance (two commands, each can appear more than once)
    \ layout specification key1=val1, key2=val2, ....
    \layout files (A file has severalkey=valuetestify)
    These commands describe the physical layout of the exam, including paper size and orientation, font size, margins, page numbers, spacing, indentation and spacing between paragraphs, question spacing, and more. FLexam uses sensible defaults, so these commands are usually only needed for special purposes, e.g. a capital letter exam for students with vision problems. Allowed keywords are listed inlayout parameter datei, lies inFLexam main folder.

  • Figure dimensions to scale
    Multiply the dimensions of the figure by the given factor (defaults to 1.0 if not specified). These commands are useful when a very large font is selected and the instructor wants to enlarge all figures without extensive editing of each figure.
    \scale figure foreword
    \scale figure question
    \scale figure terminal material
    \scale figure already (swap all numbers with the same coefficient)

  • Course information (the four commands are displayed in no particular order)
    \class name I semester}
    \teacher{name}
    \Exam Name}
    \exdate{date}

  • \head File
    This command formats course information for printing in Latex. iffilename = default, then the fileflexam_header_latex.texI amFLexam main folderIt is used.

  • \direction file
    This command lists test descriptions. iffilename = default, then the fileflexam_directions_latex.texI amFLexam main folderIt is used.

The following FLexam commands (in addition to the standard latex commands) are executed only after the above FLexam commands have been processed:

  • \ outside line
    Draws a horizontal line on the page. for delineation purposes.

  • \fxfigurecenter{width}{filename}
    Inserts an image (PDF, PNG, JPG, TIFF) with the specified width horizontally centered on the page

  • \pageeject
    Dump the current page. This is useful when you want to place the beginning of a formula sheet or question on a new page.

end command

this\emotional intelligence(or\endalpitania) command marks the end of the question, after which any Latex command and some FLexam commands can be issued. Possible FLexam commands are:

  • \fxfigurecenter{width}{filename}
    Inserts an image (PDF, PNG, JPG, TIFF) with the specified width horizontally centered on the page

  • \ outside line
    Draws a horizontal line on the page. For descriptive purposes, as described earlier.

  • \pageeject
    Dump the current page. It can be reused to make white paper for old paper.

  • \LOI(or\internal information). FLexam stops reading the text after this, allowing arbitrary text to be pasted.

Example: Exam phy2054

These commands are explained herephy2054 examthis createsPDF file. (referenced atthis folder.) The Que source file is shown below.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%This is a modified version of a Spring 2018 phy2054 exam, with 20 questions.%% 1. FLexam now compiles the exam to the Latex typesetting language,% extensively used in science and engineering. The question syntax% was also updated to the modern \beginquestion ... \endquestion% format from the archaic \QT format.%% 2. The \headerfile and \directionsfile commands are used to print exam% information and directions using default language and formatting.%% 3. Question figures are specified by \fxfigureright{width}{filename},% and are automatically aligned with the question text.%% 4. In Q6/Q7, the answers are arranged using "textwidth", in which% the answers are spread across the width of the question text rather% than the default of across the full width of the page (internally called% "fullwidth"). "textwidth" often makes the question look better and% shrinks its vertical size.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Define instructor(s), course name, exam name, exam date\instructor{Prof. Paul Avery, Prof. Guenakh Mitselmakher}\class{PHY 2054}\exam{Exam 2}\exdate{March 20, 2018}%Insert course information and exam directions using default files in the%main flexam folder. You can replace either file with a file of your choosing\headerfile default\directionsfile default%Insert list of constants\input constants_phy2054%Insert a horizontal line across the width of the page\exline%Start question block. Only question-related commands allowed until \EQ encountered\beginallquestions%********************************************************************************%Question 1 converted from \QT to \beginquestion format%********************************************************************************%Avery (from HW Chap. 21, OpenStax)% 1\beginquestion\parameters{qtype=QQ}\qtext{An automobile starter motor has an equivalent resistanceof 0.050~$\Omega$ and is supplied by a 12.0~V battery witha 0.015~$\Omega$ internal resistance. What power does themotor consume?}\answers{\answer{1} 1.7 kW\answer 510 W\answer 2.22 kW\answer 12.0 W\answer 9.2 W}\endquestion%********************************************************************************%Question 2 converted from \QT to \beginquestion format%********************************************************************************%Avery (modified from HW Chap. 21, OpenStax)% 2\beginquestion\parameters{qtype=QQ}\qtext{A car's 250~W headlight and 2.30~kW starter are normallyconnected in parallel with a 12.0~V battery. We insteadconnect this headlight and starter {\it in series} with anew battery. If the total power consumed is the same asbefore, what is the approximate emf of the new battery?(Ignore battery internal resistance.)}\answers{\answer{1} 40 V\answer 12 V\answer 20 V\answer 24 V\answer 18 V}\endquestion%********************************************************************************%Question 3 converted from \QT to \beginquestion format%********************************************************************************%Avery (modified from HW Chap. 21, OpenStax)% 3\beginquestion\parameters{qtype=QQ}\qtext{A galvanometer has a 21~$\Omega$ internal resistance andis to be used as an ammeter with a 10~A full-scale readingwhen a 4.4~m$\Omega$ resistance is placed in parallelwith it. What is the sensitivity of the galvanometer, i.e.,qwhat current passing through thegalvanometer causes a full-scale reading?}\answers{\answer{1} 2.1 mA\answer 0.63 mA\answer 0.84 mA\answer 1.2 mA\answer 3.4 mA}\endquestion%********************************************************************************%Question 4 converted from \QT to \beginquestion format%********************************************************************************%Avery (new problem, but idea used in previous exams)% 4\beginquestion\parameters{qtype=QQ}\qtext{You have large number of 60~$\Omega$ resistors that can beconnected together in various ways. What is the minimumnumber of resistors needed to create an equivalent resistanceof 75~$\Omega$?}\answers{\answer{1} 5\answer 6\answer 8\answer 10\answer 4}\endquestion%********************************************************************************%Question 5 converted from \QT to \beginquestion format%********************************************************************************%Avery (basic RC problem using current)% 5\beginquestion\parameters{qtype=QQ}\qtext{A 400~$\Omega$ resistor and an uncharged capacitor areconnected in series to a 6.0~V battery. 0.80~msec afterthey are connected, the current is measured to be 9.0~mA.What is the capacitance?}\answers{\answer{1} 3.9 $\mu$F\answer 12 $\mu$F\answer 18 $\mu$F\answer 24 $\mu$F\answer 5.9 $\mu$F}\endquestion%********************************************************************************%Question 6 converted from \QT to \beginquestion format%********************************************************************************%Avery (from exam 2, phy2054, s2009)% 6\beginquestion\parameters{qtype=QQ, textwidth}\qtext{In the circuit shown, what is $V_1 - V_3$ when $I_1 = 1.5$~A and$I_2 = 3.5$~A?\fxfigureright{1.50in}{figures/3batteries_3resistors.pdf}}\answers{\answer{1} $+8.0$ V\answer $+7.5$ V\answer $-6.0$ V\answer $-4.5$ V\answer $+4.0$ V}\endquestion%********************************************************************************%Question 7 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 7\beginquestion\parameters{qtype=QQ, textwidth}\qtext{An electron moves through a region of crossed electric and magnetic fields,with directions as shown in the figure.The field magnitudes are $E = 2000$~V/m and $B = 0.80$~T. For whatvelocity of the electron into the paper will the electric and magneticforces exactly cancel?\fxfigureright{1.00in}{figures/E_cross_B.pdf}}\answers{\answer{1} 2500 m/s\answer 4000 m/s\answer 5000 m/s\answer 8000 m/s\answer 10500 m/s}\endquestion%********************************************************************************%Question 8 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 8\beginquestion\parameters{qtype=QQ}\qtext{An electron is moving at a speed of $6.0 \times 10^6$~m/s at an angle of30$^\circ$ with respect to a uniform magnetic field of $8.0 \times 10^{-4}$~T.What is the radius of the resulting helical path?}\answers{\answer{1} 2.1 cm\answer 8.5 cm\answer 4.3 cm\answer 3.7 cm\answer 0.6 cm}\endquestion%********************************************************************************%Question 9 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 9\beginquestion\parameters{qtype=QQ, stack}\qtext{Two parallel wires are separated by 0.25~m. Wire A carries 5.0~A andWire B carries 10~A, both currents in the same direction.The force on 0.80~m of Wire A is:}\answers{\answer{1} toward Wire B.\answer half that on 0.80 m of Wire B.\answer one-fourth that on 0.80 m of Wire B.\answer zero\answer away from Wire B.}\endquestion%********************************************************************************%Question 10 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 10\beginquestion\parameters{qtype=QQ}\qtext{A wire carrying a 30~A current passes between the poles of a strong magnet(field perpendicular to the wire direction) and experiences a 2.16~N forceon the 4.0~cm of wire within the field. What is the average magneticfield strength?}\answers{\answer{1} 1.80 T\answer 0.85 T\answer 2.70 T\answer 3.00 T\answer 4.60 T}\endquestion%********************************************************************************%Question 11 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 11\beginquestion\parameters{qtype=QQ}\qtext{Two long parallel wires 20~cm apart carry currents in the same direction,as shown in the figure.Wire A carries 5.0~A and Wire B carries 8.0~A. Where is themagnetic field zero?\fxfigureright{1.00in}{figures/2wires_AB_parallel.pdf}}\answers{\answer{1} 7.7 cm below A\answer 8.8 cm below A\answer 33 cm above A\answer 75 cm above A\answer midway between wires}\endquestion%********************************************************************************%Question 12 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 12\beginquestion\parameters{qtype=QQ}\qtext{A circular coil of radius 40~cm has 160 turns and is embeddedin a uniform magneticfield. If the orientation of the coil is varied through all possiblepositions, the maximum torque on the coil by magnetic forces is0.16~N$\cdot$m when the current in the coil is 4.0~mA. What is the magnitudeof the magnetic field?}\answers{\answer{1} 0.50 T\answer 0.37 T\answer 1.6 T\answer 0.84 T\answer 1.2 T}\endquestion%********************************************************************************%Question 13 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 13\beginquestion\parameters{qtype=QQ}\qtext{A wire lies horizontally in the north-south direction and the horizontalmagnetic field is toward the east, as shown in the figure. Somepositive charges in the wire movenorth and an equal number of negative charges move south. The direction ofthe force on the wire will be:\fxfigureright{1.5in}{figures/wire_north_south.pdf}}\answers{\answer{1} down into page\answer up out of page\answer east\answer west\answer Magnetic force is zero}\endquestion%********************************************************************************%Question 14 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 14\beginquestion\parameters{qtype=QQ}\qtext{The motor in a toy car operates on a 6.0~V emf, developing a 4.50~V back emfat normal speed. If it draws 3.00~A at normal speed, what current does itdraw when starting?}\answers{\answer{1} 12.0 A\answer 1.22 A\answer 2.40 A\answer 7.85 A\answer zero}\endquestion%********************************************************************************%Question 15 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 15\beginquestion\parameters{qtype=QQ}\qtext{Camera flashes charge a capacitor to high voltage by switching the currentthrough an inductor on and off rapidly. In what time must the 0.10~A currentthrough a 2.0~mH inductor be switched on or off to induce a 500~V emf?}\answers{\answer{1} 0.40 $\mu$s\answer 0.25 $\mu$s\answer 0.65 $\mu$s\answer 20 $\mu$s\answer 0.80 $\mu$s}\endquestion%********************************************************************************%Question 16 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 16\beginquestion\parameters{qtype=QQ}\qtext{A large jetliner with a wingspan of 40~m flies horizontally and due northat a speed of 300~m/s in a region where the magnetic field of the earth is60~$\mu$T directed 50$^\circ$ below the horizontal. What is the magnitude ofthe induced emf between the ends of the wing?}\answers{\answer{1} 550 mV\answer 250 mV\answer 350 mV\answer 450 mV\answer 750 mV}\endquestion%********************************************************************************%Question 17 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 17\beginquestion\parameters{qtype=QQ}\qtext{A 500-turn circular coil of radius 12.6~cm is mounted on a rotatingframe that turns at a rate of 20~rad/s in the presence of a 0.050~Tuniform magnetic field oriented perpendicular to the axis of rotation.What is the instantaneous emf in the coil at the moment that the normalto its plane is at a 30$^\circ$ angle to the field?}\answers{\answer{1} 12.5 V\answer zero\answer 17.8 V\answer 21.6 V\answer 25.0 V}\endquestion%********************************************************************************%Question 18 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 18\beginquestion\parameters{qtype=QQ}\qtext{An {\it RL} circuit has an inductor ($L = 0.40$~H) and resistor($R = 5.0$~$\Omega$) connected in series to a battery with$\cal{E}$ = 22~V. Find the energy stored in the inductor whenthe current in the circuit reaches 0.50~A.}\answers{\answer{1} 50 mJ\answer 1.0 J\answer 2.0 J\answer 5.0 J\answer 85 mJ}\endquestion%********************************************************************************%Question 19 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 19\beginquestion\parameters{qtype=QQ}\qtext{A circuit consists of a 10~mH coil, a 9.0~V battery, a parallel combinationof a 12~$\Omega$ resistor and a 6.0~$\Omega$ resistor, all inseries. What is the time constant of this circuit?}\answers{\answer{1} 2.5 msec\answer 90 msec\answer 7.5 msec\answer 0.56 msec\answer 40 msec}\endquestion%********************************************************************************%Question 20 converted from \QT to \beginquestion format%********************************************************************************%Mitselmakher% 20\beginquestion\parameters{qtype=QQ, stack}\qtext{Two loops of wire are arranged so that a changing current in one willinduce a current in the other. If the current in the first is increasingclockwise by 1.0~A every second, the induced current in the second loop will:}\answers{\answer{1} stay constant\answer increase counterclockwise\answer decrease clockwise\answer increase clockwise\answer stay zero}\endquestion%End of questions (commands after \EQ are part of endmatter)\EQ%Write ruled line followed by final instructions\exline\begin{center}{\Large \textbf{Be sure to turn in your Scantron sheet as well as your question sheet}}\end{center}\exline%Eject current page and make 3 blank pages for scrap paper%"~" is a Latex non-breaking space. Need >=1 character to define new page\pageeject~\pageeject~\pageeject~\pageeject\EOIFLexam does not process anything after \EOI (end of information). You canwrite anything you want here: explanatory notes, possible physics questions,psychotic ravings, horoscopes, jokes, etc.

References

Top Articles
Latest Posts
Article information

Author: Dong Thiel

Last Updated: 09/25/2023

Views: 6428

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.