text:
What is the value of fatigue notch sensitivity for a fully sensitive material?

1. infinity
2. 0
3. 0.5
4. 1

Option 4 : 1

Explanation:

Notch Sensitivity (q):

$${\rm{q}} = \frac{{{\rm{Increase\;of\;fatigue\;stress\;over\;nominal\;stress}}}}{{{\rm{Increase\;of\;theoretical\;stress\;over\;nominal\;stress}}}} = \frac{{{{\rm{k}}_{\rm{f}}} - 1}}{{{{\rm{k}}_{\rm{t}}} - 1}}$$

Where,

Theoretical Stress Concentration Factor (Kt):

It is the ratio of actual stress near discontinuity to the nominal stress from the elementary equation.

$${{\rm{k}}_{\rm{t}}} = \frac{{{\rm{Highest\;value\;of\;the\;actual\;stress\;near\;discontinuity}}}}{{{\rm{Nominal\;stress\;calculated\;from\;elementary\;equation}}}} = \frac{{{\sigma _{max}}}}{{{\sigma _o}}} = \frac{{{\tau _{max}}}}{{{\tau _o}}}$$

Fatigue Stress Concentration Factor (Kf):

It is the ratio of the fatigue strength of an unnotched member to the fatigue strength of the same member with a notch.

$${{\rm{k}}_{\rm{f}}} = \frac{{{\rm{Effective\;fatigue\;stress}}}}{{{\rm{Nominal\;fatigue\;stress}}}}$$

q = 0 ⇒ kf = 1 → Notch is not sensitive in fatigue.

q = 1 ⇒ kf = kt → Notch is fully sensitive in fatigue.

For the given material, if the stress concentration factor is 2 and Notch sensitivity is 0.1, then the fatigue stress concentration factor is:

1. 1.0
2. 1.2
3. 1.1
4. 0.9

Option 3 : 1.1

Concept:

Theoretical Stress Concentration Factor (Kt):

It is the ratio of actual stress near discontinuity to the nominal stress from the elementary equation.

$${{\rm{K}}_{\rm{t}}} = \frac{{{\rm{Highest\;value\;of\;the\;actual\;stress\;near\;discontinuity}}}}{{{\rm{Nominal\;stress\;calculated\;from\;elementary\;equation}}}} = \frac{{{\sigma _{max}}}}{{{\sigma _o}}} = \frac{{{\tau _{max}}}}{{{\tau _o}}}$$

Fatigue Stress Concentration Factor (Kf):

It is the ratio of the fatigue strength of an unnotched member to the fatigue strength of the same member with a notch.

$${{\rm{K}}_{\rm{f}}} = \frac{{{\rm{Effective\;fatigue\;stress}}}}{{{\rm{Nominal\;fatigue\;stress}}}}$$

Notch Sensitivity (q):

$${\rm{q}} = \frac{{{\rm{Increase\;of\;fatigue\;stress\;over\;nominal\;stress}}}}{{{\rm{Increase\;of\;theoretical\;stress\;over\;nominal\;stress}}}} = \frac{{{{\rm{K}}_{\rm{f}}} - 1}}{{{{\rm{K}}_{\rm{t}}} - 1}}$$

Calculation:

Given:

Kt = 2, q = 0.1

∵ $$q = \frac{{{{\rm{K}}_{\rm{f}}} - 1}}{{{{\rm{K}}_{\rm{t}}} - 1}}$$

$$\Rightarrow 0.1 = \frac{{{K_f} - 1}}{{2 - 1}}$$

⇒ Kf – 1 = 0.1

⇒ Kf = 1.1

Theoretical stress factor (Kt) can also be calculated from the figure if irregularities dimension is given-

$${K_t} = 1 + 2\left( {\frac{A}{B}} \right)$$

where a = Semi-major axis perpendicular to the direction of load and b = semi-minor axis parallel to the direction of load.

For sharp crack

B → 0 ∴ Kt = ∞

For circle

A = B

∴ Kt = 3

Endurance limit of a beam subjected to pure bending decreases with

1. decrease in the surface roughness and decrease in the size of the beam
2. increase in the surface roughness and decrease in the size of the beam
3. increase in the surface roughness and increase in the size of the beam
4. decrease in the surface roughness and increase in the size of the beam

Option 3 : increase in the surface roughness and increase in the size of the beam

Explanation:

Corrected endurance strength is defined as

σe = Ka Kb Kc Kde

where, σe = Endurance strength and Ka = size factor, Kb = surface factor, Kc = load factor, Kd = Temperature factor

{Ka, Kb, Kc, Kd} < 1

So, with the increases in surface roughness and size of the beam, endurance strength will decrease.

Fatigue strength for non-ferrous materials is usually defined at __________ stress cycles.

1. 104
2. 107
3. 109
4. 1012

Option 2 : 107

Concept:

• Fatigue failure is defined as a time-delayed fracture under cyclic loading.
• Materials fail under fluctuating stresses at a stress magnitude which is lower than the ultimate tensile strength of the material, sometimes, the magnitude is even lower than yield strength.
• The magnitude of the stress-causing fatigue failure decreases as the number of stress cycles increases.
• The phenomenon of decreased resistance of the materials to fluctuating stresses is the main characteristic of fatigue failure.
• Examples of parts in which fatigue failures are common are transmission parts, connecting rods, gears, vehicle suspension springs, and ball bearings.

Curve A is for metals and curve B is for nonmetal

From the graph, we know that, Fatigue strength for non-ferrous materials is usually at 107 stress cycles.

If t, ζ and P are thickness, permissible shear stress and applied axial load respectively on a cotter joint, the mean width of the collar is equal to.

1. $$\frac{{P}}{{2t\zeta }}$$
2. $$\frac{{{2P}}}{{t\zeta }}$$
3. $$\frac{{P}}{{t\zeta }}$$
4. none of these

Option 1 : $$\frac{{P}}{{2t\zeta }}$$

Concept:

Cotter Joint: A cotter joint is used to connect the two shafts which are either subjected to tensile or compressive axial force. It is not used to connect the shafts that are rotating or transmitting torque. e.g. Joint between the piston rod and the crosshead of a steam engine.

The cotter in the cotter joints fails due to double shear.

Shear failure of cotter joint

2 × t × b × τs = F

Where t = thickness of the cotter, b = width of the cotter, τs = shear stress developed in the cotter due to load F.

Calculation:

Given, thickness = t, shear stress = ζ, load = P width = b

Then,

2 × t × b × ζ  = P

$$b=\frac{{P}}{{2t\zeta }}$$

A rectangular bar with a circular hole is to be made of a material with actual maximum permissible stress of 150 MPa. If stress concentration factor for the configuration is 3.0, what is the nominal average stress for sizing the section?

1. 450 MPa
2. 50 MPa
3. 147 MPa
4. None of these

Option 2 : 50 MPa

Concept:

Stress developed at irregular section = Normal average stress × Stress concentration factor

Stress developed at irregular section ≤ maximum permissible stress

Calculation:

Given:

Stress concentration factor = 3 , maximum permissible stress = 150 MPa

Stress developed at irregular section ≤ maximum permissible stress

∴ Normal average stress × stress concentration factor ≤ 150

Normal average stress × 3 = 150

∴ Normal average stress = 50 MPa

Consider the two states of stress as shown in configurations I and II in the figure below. From the standpoint of distortion energy (Von-Mises) criterion, which one of the following statements is true?

1. I yields after II
2. II yields after I
3. Both yield simultaneously
4. Nothing can be said about their relative yielding

Option 3 : Both yield simultaneously

Concept:

Maximum distortion energy theory (Von mises theory)

• According to this theory, the failure or yielding occurs at a point in a member when the distortion strain energy per unit volume reaches the limiting distortion energy (i.e. distortion energy at yield point) per unit volume as determined from simple tension test.
• Equivalent stress under triaxial condition is given by:

$$2\sigma_{eq}^2=(\sigma_x\;-\;\sigma_y)^2\;+\;(\sigma_y\;-\;\sigma_z)^2\;+\;(\sigma_z\;-\;\sigma_x)^2\;+\;6(\tau_{xy}^2\;+\;\tau_{yz}^2\;+\;\tau_{zx}^2)$$

Calculation:

Case 1: σx = 0, σy = σ, σz = o, τxy = 0, τyz = τ, τzx = 0

∴ Equivalent stress (σeq)$$2\sigma_{eq}^2=(\sigma_x\;-\;\sigma_y)^2\;+\;(\sigma_y\;-\;\sigma_z)^2\;+\;(\sigma_z\;-\;\sigma_x)^2\;+\;6(\tau_{xy}^2\;+\;\tau_{yz}^2\;+\;\tau_{zx}^2)$$

Putting all the values in the above equation.

$$% MathType!MTEF!2!1!+- % feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr % 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9 % vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x % fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaaeaaaaaaaaa8 % qacqaHdpWCpaWaaSbaaSqaa8qacaWGLbGaamyCaaWdaeqaaOWdbiab % g2da9maakaaapaqaa8qadaWcaaWdaeaapeGaaGymaaWdaeaapeGaaG % OmaaaadaqadaWdaeaapeGaaGOmaiabeo8aZ9aadaahaaWcbeqaa8qa % caaIYaaaaOGaey4kaSIaaiiOaiaaiAdacqaHepaDpaWaaWbaaSqabe % aapeGaaGOmaaaaaOGaayjkaiaawMcaaaWcbeaakiabg2da9maakaaa % paqaa8qadaqadaWdaeaaieWapeGaa83Wd8aadaahaaWcbeqaa8qaca % aIYaaaaOGaey4kaSIaaG4maiaa-r8apaWaaWbaaSqabeaapeGaaGOm % aaaaaOGaayjkaiaawMcaaaWcbeaaaaa!5159! {\sigma _{eq}} = \sqrt {\frac{1}{2}\left( {2{\sigma ^2} + \;6{\tau ^2}} \right)} = \sqrt {\left( {{\sigma ^2} + 3{\tau ^2}} \right)}$$$$2\sigma_{eq}^2=2\sigma^2\;+\;6\tau^2$$

Case 2: σx = 0, σy = σ, σz = 0, τxy = 0, τyz = 0, τzx = τ

∴ Equivalent stress (σeq)$$2\sigma_{eq}^2=(\sigma_x\;-\;\sigma_y)^2\;+\;(\sigma_y\;-\;\sigma_z)^2\;+\;(\sigma_z\;-\;\sigma_x)^2\;+\;6(\tau_{xy}^2\;+\;\tau_{yz}^2\;+\;\tau_{zx}^2)$$

Putting all the values in the above equation.

$$% MathType!MTEF!2!1!+- % feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn % hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr % 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9 % vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x % fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaaeaaaaaaaaa8 % qacqaHdpWCpaWaaSbaaSqaa8qacaWGLbGaamyCaaWdaeqaaOWdbiab % g2da9maakaaapaqaa8qadaWcaaWdaeaapeGaaGymaaWdaeaapeGaaG % OmaaaadaqadaWdaeaapeGaaGOmaiabeo8aZ9aadaahaaWcbeqaa8qa % caaIYaaaaOGaey4kaSIaaiiOaiaaiAdacqaHepaDpaWaaWbaaSqabe % aapeGaaGOmaaaaaOGaayjkaiaawMcaaaWcbeaakiabg2da9maakaaa % paqaa8qadaqadaWdaeaaieWapeGaa83Wd8aadaahaaWcbeqaa8qaca % aIYaaaaOGaey4kaSIaaG4maiaa-r8apaWaaWbaaSqabeaapeGaaGOm % aaaaaOGaayjkaiaawMcaaaWcbeaaaaa!5159! {\sigma _{eq}} = \sqrt {\frac{1}{2}\left( {2{\sigma ^2} + \;6{\tau ^2}} \right)} = \sqrt {\left( {{\sigma ^2} + 3{\tau ^2}} \right)}$$$$2\sigma_{eq}^2=2\sigma^2\;+\;6\tau^2$$

In both cases, σeq is same, so both yield simultaneously.

The ratio of the ultimate stress to the design stress is known as

1. Bulk modulus
2. Elastic limit
3. Strain
4. Factor of safety

Option 4 : Factor of safety

Explanation:

A factor of Safety (FOS):

The ability of any structure to resist loading is known as strength.

For safety purposes, a material should have higher strength than the strength required for external loading.

This is done with the help of factor of safety which is given by –

$${\rm{FOS}} = \frac{{{\rm{Failure\;stress}}}}{{{\rm{design\;stress}}}}$$

FOS should always be greater than 1.

Brittle Material:

For brittle material, FOS is given by –

$${\bf{FOS}} = \frac{{{\bf{Ultimate}}\;{\bf{stress}}}}{{{\bf{design}}\;{\bf{stress}}}} = \frac{{{{\bf{\sigma }}_{{\bf{ut}}}}}}{{{{\bf{\sigma }}_{{\bf{design}}}}}}$$

In brittle material, fracture takes place immediately after the elastic limit with a relatively smaller deformation.

∴ fracture and ultimate stress are the same in brittle materials and FOS is calculated with that.

It can further clear with the help of this figure.

Brittle materials have a non-homogenous structure and residual stresses in the component.

To account for this, a large factor of safety is used. Usually 3 – 5.

Ductile Materials:

For ductile material, FOS is given by –

$${\bf{FOS}} = \frac{{{\bf{Yield}}\;{\bf{stress}}}}{{{\bf{design}}\;{\bf{stress}}}} = \frac{{{{\bf{\sigma }}_{{\bf{yt}}}}}}{{{{\bf{\sigma }}_{{\bf{design}}}}}}$$

In ductile materials, when the stress exceeds the yield strength of the material, there is a small amount of plastic deformation that does not put the component out of service.

∴ FOS is calculated with the yield stress of a material.

It can further clear with the help of this figure.

Ductile materials have a homogenous structure and residual stresses are relieved with heat treatment in the component.

To account for this, a small factor of safety is used. Usually 1.5 – 2.

The power from the engine to the rear axle of an automobile is transmitted by means of:

1. Worm and worm wheel
2. Spur gears
3. Compound gears
4. Hooke's joint

Option 4 : Hooke's joint

Explanation:

Hooke's joint

A Hook’s joint, commonly known as a universal joint is used to connect two non-parallel and intersecting shafts

It is also used for shafts with angular misalignment.

A common application of this joint is in an automobile where it is used to transmit power from the gearbox (of the engine) to the differential. The driving shaft rotates at a uniform angular speed whereas the driven shaft rotates at a continously varying angular speed.

Spur Gear:

The teeth are cut parallel to the axis of rotation. The spur gears are used to transmit power between two parallel shafts.

Worm shaft and worm gear:

The worm shaft has spiral teeth cut on the shaft and a worm wheel is a special form of gear teeth cut to mesh with the worm shaft. These are widely used for speed reduction purposes.

Compound gear train:

When any shaft has more than one gear (first shaft or second shaft or intermediate shaft) i.e. two gear have the same angular velocity, the gear drive is called compound gear drive.

The ratio of ultimate stress & working stress is called

1. Factor of safety
2. Modulus of elasticity
3. Poisson’s ratio
4. None of the above

Option 1 : Factor of safety

Explanation:

Factor of Safety (FOS):

The ability of any structure to resist loading is known as strength.

For safety purposes, a material should have higher strength than the strength required for external loading.

This is done with the help of factor of safety which is given by –

$${\rm{FOS}} = \frac{{{\rm{Failure\;stress}}}}{{{\rm{Working\;stress}}}}$$

Failure stress is set for individual material as per the properties.

FOS should always be greater than 1.

Brittle Material:

For brittle material, FOS is given by –

$${\bf{FOS}} = \frac{{{\bf{Ultimate}}\;{\bf{stress}}}}{{{\bf{Working}}\;{\bf{stress}}}} = \frac{{{{\bf{\sigma }}_{{\bf{ut}}}}}}{{{{\bf{\sigma }}_{{\bf{working}}}}}}$$

In brittle material, fracture takes place immediately after the elastic limit with a relatively smaller deformation.

∴ fracture and ultimate stress are the same in brittle materials and FOS is calculated with that.

It can further clear with the help of this figure.

Brittle materials have a non-homogenous structure and residual stresses in the component.

To account for this, a large factor of safety is used.

Usually 3 – 5.

Ductile Materials:

For ductile material, FOS is given by –

$${\bf{FOS}} = \frac{{{\bf{Yield}}\;{\bf{stress}}}}{{{\bf{Working}}\;{\bf{stress}}}} = \frac{{{{\bf{\sigma }}_{{\bf{yt}}}}}}{{{{\bf{\sigma }}_{{\bf{working}}}}}}$$

In ductile materials, when the stress exceeds the yield strength of the material, there is a small amount of plastic deformation that does not put the component out of service.

∴ FOS is calculated with the yield stress of a material.

For a plate with an elliptical hole subjected to tensile stress, σ as shown in the figure, the maximum tensile stress at point P is

1. σ
2. More than 3σ

Option 4 : More than 3σ

Concept:

Maximum Tensile stress at point P is $$= {\sigma _0}\left( {1 + \frac{{2a}}{b}} \right)$$

where $$\left( {1 + \frac{{2a}}{b}} \right)$$ is Theoretical stress concentration factor.

From figure it is clear that a > b

$$\therefore 1 + \frac{{2a}}{b} > 3$$

Hence maximum tensile stress in more than 3σ.

If a = b then the stress at point P will be equal to 3 times the applied stress.

A maximum of how many rods may be connected using a knuckle joint?

1. 5
2. 2
3. 3
4. 4

Option 3 : 3

Explanation:

Knuckle joint OR Forked Pin Joint:

• Knuckle joint is used to connect two rods whose axes either coincide or interact and lie in one plane.
• The knuckle joint is used to transmit axial tensile force.
• Permits limited angular movement between rods, about the axis of the pin.
• Unsuitable to connect two rotating shafts, which transmit torque.
• Applications:  Valve mechanism of a reciprocating engine, bicycle chain, the fulcrum of a lever, etc.
• In rare applications, a knuckle joint is used to connect three rods, two with forks and one with the eye.

The design done mathematically and based on principal of mechanics of machine is known as

1. Industrial design
2. Optimum design
3. Rational design
4. Empirical design

Option 3 : Rational design

Explanation:

Design is essentially a decision-making process. If we have a problem, we need to design a solution.

In other words, to design is to formulate a plan to satisfy a particular need and to create something with physical reality.

There may be several types of design based on methods such as,

Rational design

• It is a design procedure to meet the strength requirements of a load-carrying member.
• It is based on determining the stresses and strains of components and thereby deciding their dimensions.
• In this method, the design is done mathematically and based on the principle of mechanics of the machine.
• This design procedure can be applied to all complicated and involved situations encountered in present-day structures and machines.

However, not all topics in design have a firm analytical base from which to work. In those cases, we must depend on a semi-rational or empirical approach to solving a problem or selecting a design component.

Empirical design

This is based on empirical formulae which in turn is based on experience and experiments.

For example, when we tighten a nut on a bolt the force exerted or the stresses induced cannot be determined exactly but experience shows that the tightening force may be given by

P = 284 × d

where d is the bolt diameter in mm and P is the applied force in kg.

There is no mathematical backing of this equation but it is based on observations and experience.

Industrial design:
These are based on industrial considerations and norms viz. market survey, external look, production facilities, low cost, use of existing standard products.

The normal load on gear tooth is 50 kN and gear is transmitting a torque of 6000 Nm. If the pressure angle of the gear is 20° then diameter of gear is close to (cos 20° = 0.94)

1. 0.5 m

2. 0.75 m

3. 1 m

4. 0.25 m

Option 4 :

0.25 m

Concept:

FT = FN × cos ϕ =  50 × cos 20° kN = 46.985 kN

Torque:

$$\Rightarrow \;T = {F_T} \times \frac{d}{2}$$

$$\Rightarrow \;6000 = {46.98\times 1000} \times \frac{d}{2} \Rightarrow d \simeq 0.25\;m$$

A 4 meter long solid circular cylindrical shaft transmits 1600 kW at 500 rpm. The endurance limit of the material is 210 MPa and a factor of safety of 3 is to be used with respect to fatigue failure. Use G = 77.5 GPa. The design diameter ‘D’ of the shaft in metre is

1. $$3\sqrt {\frac{{69}}{{4375{\pi^2}}}}$$
2. $$3\sqrt {\frac{{4375}}{{96{\pi^2 }}}}$$
3. $$3\sqrt {\frac{{69}}{{4735{\pi^2 }}}}$$
4. $$3\sqrt {\frac{{192}}{{4375{\pi^2}}}}$$

Option 4 : $$3\sqrt {\frac{{192}}{{4375{\pi^2}}}}$$

Concept:

The power transmitted by the shaft is, $$P=\frac{2\pi NT}{60}$$

where, N = rpm of the shaft, T = torque transmitted by shaft.

The shear stress in shaft is, $$τ =\frac{16T}{\pi d^3}$$...................(1)

Apply Soderburg theory for ductile material, $$\frac{τ _m}{τ _{yt}}+\frac{τ _v}{τ _{e}}=\frac{1}{FOS}$$....................(2)

where, τm = mean shear stress, τv = variable shear stress, τyt = yield strength, τe = endurance limit of the material, N = factor of safety

Calculation:

Given:

Mean stress:

$$τ _m=\frac{τ~+~(-τ)}{2}=0$$

Variable stress:

$$τ _v=\frac{τ~+~(τ)}{2}=τ$$

τe = 0.5σe = 0.5 × 210 = 105 N/mm2, FOS = 3, P = 1600 kW, N = 500 rpm

Therefore, from equation (2), $$\frac{τ_v}{105}=\frac{1}{3}$$

Therefore, τ = 35 N/mm2

Torque:

$$T=\frac{60~×~1600~×10^3}{2\pi~×~500}=\frac{96000}{\pi}~N-m$$

Shear stress:

From equation (1), $$τ =\frac{16T }{\pi d^3}$$

⇒ $$d=(\frac{16T}{\pi \tau})^\frac{1}{3}$$ ⇒ $$d=(\frac{16~×~96000}{\pi^2 ~×~35~×~10^6})^\frac{1}{3}$$

$$d=3\sqrt {\frac{{192}}{{4375{\pi^2 }}}}$$

A cotter joint is used to connect two rods which are in

1. Tension only
2. Compression only
3. Tension and Compression
4. Shear only

Option 3 : Tension and Compression

Explanation:

Cotter :

• Cotter's joint is used to join two shafts which are in Rotation.
• Cotter's joint is used when the members are subjected to Axial Tensile or Compressive Loading.
• It is not used to connect the shafts that are rotating or transmitting torque. e.g. Joint between the piston rod and the crosshead of a steam engine.
• The Cotter joint is also known as a socket and spigot joint.
• There are three main parts of the Cotter joint
1. Cotter
2. Spigot
3. Socket

A knuckle pin may fail in

1. Shear
2. Bending
3. Crushing
4. All of these

Option 4 : All of these

Explanation:

• A knuckle joint is used to connect two rods under tensile load.
• This joint permits angular misalignment of the rods and may take a compressive load if it is guided.
• The automotive engine piston is connected to the small end of the connecting rod by means of a piston pin.
• This is one major application of the knuckle joint.
• The valve rod in a steam engine is connected to an eccentric rod by the Knuckle joint.

A knuckle pin may fail in

1. Tensile failure of rod
2. Tearing failure of square section
3. Tension failure of eye end
4. Shear failure of eye end
5. Crushing failure of pin
6. Tension failure of fork end
7. Shear failure of fork end
8. Crushing failure of fork end
9. Shear failure of knuckle pin
10. Bending of knuckle pin

For safe Engineering Design Practice, Factor of Safety (FS) must satisfy:

1. FS > 1
2. 0 < FS < 1
3. FS = 1
4. FS < 0

Option 1 : FS > 1

Explanation:

The factor of safety:

• It is defined as the ratio of the maximum stress to the working stress.
• The selection of a proper factor of safety to be used in designing any machine component depends upon a number of considerations, such as the material, mode of manufacture, types of stress, general service condition, and shape of the parts.
• $$Factor~of~safety = \frac{Maximum ~stress}{Working~stress}$$

For Brittle material:

$$Factor~of~safety = \frac{Yield~point ~stress}{Working~stress}$$

For Ductile Material:

$$Factor~of~safety = \frac{Ultimate ~stress}{Working~stress}$$

• To avoid failure the factor of safety is always taken greater than 1.

Cotter is usually used in connecting:

1. tension link in bridge structure
2. valve rod joint with eccentric rod
3. tie rod joint for roof truss
4. the piston rods and its extension as a tail of the pump rods

Option 4 : the piston rods and its extension as a tail of the pump rods

Explanation:

• cotter is a flat wedge-shaped piece of steel.
• This is used to connect rigidly two rods that transmit motion in the axial direction, without rotation.
• These joints may be subjected to tensile or compressive forces along the axes of the rods.
• Examples of cotter joint connections are the connection of piston rod to the crosshead of a steam engine, piston rods and its extension as a tail of the pump rods valve rod, and its stem, etc.

There are three types of cotter joint for connecting two rods by one cotter:

• Socket and spigot cotter joint.
• Sleeve and cotter joint.
• Gib and cotter joint.

A cotter joint is also known as a _______

1. hammer joint
2. socket and spigot joint
3. hub joint
4. collar joint

Option 2 : socket and spigot joint


text:
# insAccelerometer

Model accelerometer readings for sensor fusion

## Description

The `insAccelerometer` object models accelerometer readings for sensor fusion. Passing an `insAccelerometer` object to an `insEKF` object enables the `insEKF` object to fuse accelerometer data. For details on the accelerometer model, see Algorithms.

## Creation

### Syntax

``sensor = insAccelerometer``

### Description

example

````sensor = insAccelerometer` creates an `insAccelerometer` object. Passing the created `sensor` to an `insEKF` object enables the `insEKF` object to fuse accelerometer data. When fusing data with the `fuse` object function of `insEKF`, pass `sensor` as the second argument to identify the data as obtained from an accelerometer. ```

## Examples

collapse all

Create two `insAccelerometer` objects and pass them to an `insEKF` object.

```sensor1 = insAccelerometer; sensor2 = insAccelerometer; filterOrientation = insEKF(sensor1,sensor2,insMotionOrientation)```
```filterOrientation = insEKF with properties: State: [13x1 double] StateCovariance: [13x13 double] AdditiveProcessNoise: [13x13 double] MotionModel: [1x1 insMotionOrientation] Sensors: {[1x1 insAccelerometer] [1x1 insAccelerometer]} SensorNames: {'Accelerometer' 'Accelerometer_1'} ReferenceFrame: 'NED' ```

Since the `insMotionOrientation` object does not model linear acceleration, the filter does not estimate acceleration.

`stateinfo(filterOrientation)`
```ans = struct with fields: Orientation: [1 2 3 4] AngularVelocity: [5 6 7] Accelerometer_Bias: [8 9 10] Accelerometer_1_Bias: [11 12 13] ```

Create another two `insAccelerometer` objects and pass them to a new `insEKF` object. Since the `insMotionPose` object models linear acceleration, the filter estimates acceleration.

```sensor3 = insAccelerometer; sensor4 = insAccelerometer; filterPose = insEKF(sensor3,sensor4,insMotionPose)```
```filterPose = insEKF with properties: State: [22x1 double] StateCovariance: [22x22 double] AdditiveProcessNoise: [22x22 double] MotionModel: [1x1 insMotionPose] Sensors: {[1x1 insAccelerometer] [1x1 insAccelerometer]} SensorNames: {'Accelerometer' 'Accelerometer_1'} ReferenceFrame: 'NED' ```
`stateinfo(filterPose)`
```ans = struct with fields: Orientation: [1 2 3 4] AngularVelocity: [5 6 7] Position: [8 9 10] Velocity: [11 12 13] Acceleration: [14 15 16] Accelerometer_Bias: [17 18 19] Accelerometer_1_Bias: [20 21 22] ```

Fuse a measurement from `sensor3`.

`fuse(filterPose,sensor3,[1 1 1],eye(3))`
```ans = 22×1 0.9958 0.0649 -0.0649 0 0 0 0 0 0 0 ⋮ ```

## Algorithms

The `insAccelerometer` object models the accelerometer reading as acceleration in the sensor frame. Depending on whether the `insEKF` object estimates linear acceleration in the state equations, the measurement equation takes one of two forms:

• If the `insEKF` object does not estimate the acceleration state, the measurement equation is:

`$h\left(x\right)={g}_{sensor}+\Delta$`

where h(x) is the three-dimensional measurement output, gsensor is the gravitational acceleration expressed in the sensor frame, and Δ is the three-dimensional bias of the sensor, modeled as a constant vector in the sensor frame.

• If the `insEKF` object estimates the acceleration state, the equation is:

`$h\left(x\right)={g}_{sensor}+{a}_{sensor}+\Delta$`

where asensor is the acceleration, excluding the gravity acceleration, expressed in the sensor frame.

Passing an `insAccelerometer` object to an `insEKF` filter object enables the filter object to additionally track the bias of the accelerometer. Internally, the `insEKF` object decides if the acceleration state is estimated by calling its `stateparts` object function.

## Version History

Introduced in R2022a

format: plain


text:
# Set¶

class amplpy.Set(_impl)

Represents an AMPL set. In case of not indexed sets, this class exposes iterators for accessing its elements. The members of the set are tuples. All these methods throw a TypeError if called for an indexed set.

In case of indexed sets, you can gain access to the instances using the operator [].

All the accessors in this class throw an RuntimeError if the instance has been deleted in the underlying AMPL interpreter.

Data can be assigned to the set using the methods setValues() (for non-indexed sets only) or using setData() and an object of class DataFrame.

__init__(_impl)
instances()

Get an iterator to iterate over all the instances in a Set.

arity()

The arity of s, or number of components in each member of this set.

getValues()

Get values of this set in a DataFrame. Valid only for non-indexed sets.

members()

Get members (tuples) of this Set. Valid only for non-indexed sets.

size()

Get the number of tuples in this set. Valid only for non-indexed sets.

contains(t)

Check wether this set instance contains the specified Tuple. Valid only for non-indexed sets.

Args:
t: Tuple to be found.
setValues(values)

Set the tuples in this set. Valid only for non-indexed sets.

Args:
values: A list of tuples or a DataFrame.

In the case of a DataFrame, the number of indexing columns of the must be equal to the arity of the set. In the case of a list of tuples, the arity of each tuple must be equal to the arity of the set.

For example, considering the following AMPL entities and corresponding Python objects:

set A := 1..2;
param p{i in A} := i+10;
set AA;

The following is valid:

A, AA = ampl.getSet('A'), ampl.getSet('AA')
AA.setValues(A.getValues())  # AA has now the members {1, 2}

__module__ = 'amplpy.set'


text:
# ChemicalPotential¶

class ChemicalPotential(configuration=None)

A class for representing the ChemicalPotential.

Parameters: configuration (MoleculeConfiguration | BulkConfiguration | DeviceConfiguration | SurfaceConfiguration) – The configuration for which the chemical potential should be calculated.
evaluate(spin=None)

Get the chemical potential(s).

Parameters: spin (Spin.Up | Spin.Down | Spin.All) – The spin channel the chemical potential should be returned for. Must be either Spin.Up, Spin.Down or Spin.All. The chemical potential will only depend on spin when the calculation has been done with a fixed spin moment. In that case if Spin.All is chosen a list of both chemical potentials is returned. Default: Spin.All The chemical potential. For a device the chemical potentials of the electrodes are returned. PhysicalQuantity of type energy
metatext()
Returns: The metatext of the object or None if no metatext is present. str | unicode | None
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters: stream (python stream) – The stream the table should be written to. Default: NLPrintLogger()
setMetatext(metatext)

Set a given metatext string on the object.

Parameters: metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

## Usage Examples¶

Calculate the chemical potential of a bulk system and print the result:

chemical_potential_object = ChemicalPotential(bulk_configuration)
fermi_level = chemical_potential_object.evaluate()[0]
print 'Fermi level = ', fermi_level.inUnitsOf(eV), ' eV'

Calculate the chemical potentials of a device system and print the results:

chemical_potential_object = ChemicalPotential(device_configuration)
left_chemical_potential = chemical_potential_object.evaluate()[0]
right_chemical_potential = chemical_potential_object.evaluate()[1]
print 'left chemical potential = ', left_chemical_potential.inUnitsOf(eV), ' eV'
print 'right chemical potential = ', right_chemical_potential.inUnitsOf(eV), ' eV'


text:
# How do I solve this problem?

## Solve the equation by first using a sum to product formula: $\sin 4 \theta - \sin 2 \theta = \cos 3 \theta$

Then teach the underlying concepts
Don't copy without citing sources
preview
?

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

1

### This answer has been featured!

Featured answers represent the very best answers the Socratic community can create.

Noah G Share
Feb 9, 2018

I got $x = \frac{\pi}{6} + \frac{\pi}{2} n$ and $x = \frac{\pi}{2} + \pi n$

#### Explanation:

Let's start by rewriting:

$\sin \left(2 \theta + 2 \theta\right) - \sin \left(2 \theta\right) = \cos \left(2 \theta + \theta\right)$

$\sin \left(2 \theta\right) \cos \left(2 \theta\right) + \sin \left(2 \theta\right) \cos \left(2 \theta\right) - \sin \left(2 \theta\right) = \cos \left(2 \theta\right) \cos \theta - \sin \left(2 \theta\right) \sin \theta$

$2 \sin \left(2 \theta\right) \cos \left(2 \theta\right) - \sin \left(2 \theta\right) = \cos \left(2 \theta\right) \cos \theta - \sin \left(2 \theta\right) \sin \theta$

$\sin \left(2 \theta\right) \left(2 \cos 2 \theta - 1\right) = \cos \left(2 \theta\right) \cos \theta - 2 \sin \theta \cos \theta \sin \theta$

$\sin 2 \theta \left(2 \cos 2 \theta - 1\right) = \cos \theta \left(\cos 2 \theta - 2 {\sin}^{2} \theta\right)$

Now recall that $\cos \left(2 \theta\right) = 1 - 2 {\sin}^{2} \theta$.

$\frac{\left(2 \sin \theta \cos \theta\right) \left(2 \cos 2 \theta - 1\right)}{\cos} \theta = 1 - 4 {\sin}^{2} \theta$

$2 \sin \theta \left(2 \left(1 - 2 {\sin}^{2} \theta\right) - 1\right) = 1 - 4 {\sin}^{2} \theta$

$2 \sin \theta \left(2 - 4 {\sin}^{2} \theta - 1\right) = 1 - 4 {\sin}^{2} \theta$

$4 \sin \theta - 8 {\sin}^{3} \theta - 2 \sin \theta = 1 - 4 {\sin}^{2} \theta$

$0 = 8 {\sin}^{3} \theta - 4 {\sin}^{2} \theta - 2 \sin \theta + 1$

Now let $y = \sin \theta$.

$0 = 8 {y}^{3} - 4 {y}^{2} - 2 y + 1$

$0 = 4 {y}^{2} \left(2 y - 1\right) - \left(2 y - 1\right)$

$0 = \left(4 {y}^{2} - 1\right) \left(2 y - 1\right)$

${y}^{2} = \frac{1}{4} \mathmr{and} y = \frac{1}{2}$

$y = \pm \frac{1}{2}$

$\sin \theta = \pm \frac{1}{2}$

$\theta = \frac{\pi}{6} + \frac{\pi}{2} n$

However, we must account for when we cancelled the cosine above. This can be a dangerous game, because you can lose solutions. However, if you recognize it, you can prevent that from happening.

Since the equation at this point is a product, the equation will hold true whenever $\cos \theta = 0$ (rendering the entire equation $0$).

Thus, $\theta = \frac{\pi}{2} + \pi n$. The graph of the functions ${y}_{1} = \sin \left(4 x\right) - \sin \left(2 x\right)$ and ${y}_{2} = \cos \left(3 x\right)$ confirm that the solutions we found are indeed correct.

Hopefully this helps!

• 9 minutes ago
• 10 minutes ago
• 11 minutes ago
• 20 minutes ago
• A minute ago
• 2 minutes ago
• 2 minutes ago
• 3 minutes ago
• 3 minutes ago
• 7 minutes ago
• 9 minutes ago
• 10 minutes ago
• 11 minutes ago
• 20 minutes ago


text:
# mathlibdocumentation

computability.epsilon_NFA

# Epsilon Nondeterministic Finite Automata #

This file contains the definition of an epsilon Nondeterministic Finite Automaton (ε_NFA), a state machine which determines whether a string (implemented as a list over an arbitrary alphabet) is in a regular set by evaluating the string over every possible path, also having access to ε-transitons, which can be followed without reading a character. Since this definition allows for automata with infinite states, a fintype instance must be supplied for true ε_NFA's.

structure ε_NFA (α : Type u) (σ : Type v) :
Type (max u v)
• step : σ → set σ
• start : set σ
• accept : set σ

An ε_NFA is a set of states (σ), a transition function from state to state labelled by the alphabet (step), a starting state (start) and a set of acceptance states (accept). Note the transition function sends a state to a set of states and can make ε-transitions by inputing none. Since this definition allows for Automata with infinite states, a fintype instance must be supplied for true ε_NFA's.

@[instance]
def ε_NFA.inhabited {α : Type u} {σ : Type v} :
Equations
inductive ε_NFA.ε_closure {α : Type u} {σ : Type v} (M : σ) :
set σset σ

The ε_closure of a set is the set of states which can be reached by taking a finite string of ε-transitions from an element of the set

def ε_NFA.step_set {α : Type u} {σ : Type v} (M : σ) :
set σα → set σ

M.step_set S a is the union of the ε-closure of M.step s a for all s ∈ S.

Equations
def ε_NFA.eval_from {α : Type u} {σ : Type v} (M : σ) (start : set σ) :
list αset σ

M.eval_from S x computes all possible paths though M with input x starting at an element of S.

Equations
def ε_NFA.eval {α : Type u} {σ : Type v} (M : σ) :
list αset σ

M.eval x computes all possible paths though M with input x starting at an element of M.start.

Equations
def ε_NFA.accepts {α : Type u} {σ : Type v} (M : σ) :

M.accepts is the language of x such that there is an accept state in M.eval x.

Equations
def ε_NFA.to_NFA {α : Type u} {σ : Type v} (M : σ) :
NFA α σ

M.to_NFA is an NFA constructed from an ε_NFA M.

Equations
@[simp]
theorem ε_NFA.to_NFA_eval_from_match {α : Type u} {σ : Type v} (M : σ) (start : set σ) :
M.to_NFA.eval_from (M.ε_closure start) = M.eval_from start
@[simp]
theorem ε_NFA.to_NFA_correct {α : Type u} {σ : Type v} (M : σ) :
theorem ε_NFA.pumping_lemma {α : Type u} {σ : Type v} (M : σ) [fintype σ] {x : list α} (hx : x M.accepts) (hlen : fintype.card (set σ) x.length) :
∃ (a b c : list α), x = a ++ b ++ c a.length + b.length fintype.card (set σ) ({a} * {b}.star) * {c} M.accepts
def NFA.to_ε_NFA {α : Type u} {σ : Type v} (M : NFA α σ) :
σ

M.to_ε_NFA is an ε_NFA constructed from an NFA M by using the same start and accept states and transition functions.

Equations
@[simp]
theorem NFA.to_ε_NFA_ε_closure {α : Type u} {σ : Type v} (M : NFA α σ) (S : set σ) :
= S
@[simp]
theorem NFA.to_ε_NFA_eval_from_match {α : Type u} {σ : Type v} (M : NFA α σ) (start : set σ) :
M.to_ε_NFA.eval_from start = M.eval_from start
@[simp]
theorem NFA.to_ε_NFA_correct {α : Type u} {σ : Type v} (M : NFA α σ) :


text:
emacs-orgmode@gnu.org archives
help / color / mirror / code / Atom feed
* How to get numbered lists (1), (2), … ?
@ 2011-10-13  9:11 Marius Hofert
2011-10-13  9:37  suvayu ali
From: Marius Hofert @ 2011-10-13  9:11 UTC (permalink / raw)
To: Emacs help

Dear all,

In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
How can I get numbered lists like this: (1), (2),...?
I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.

Cheers,

Marius

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13  9:11 How to get numbered lists (1), (2), … ? Marius Hofert
@ 2011-10-13  9:37  suvayu ali
2011-10-13 15:26    Marius Hofert
From: suvayu ali @ 2011-10-13  9:37 UTC (permalink / raw)
To: Marius Hofert; +Cc: Emacs help

On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
<marius.hofert@math.ethz.ch> wrote:
> Dear all,
>
> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
> How can I get numbered lists like this: (1), (2),...?
> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
>

I don't think you can. But you can customise latex export (maybe even
html export, but I don't know) to show lists like that in the exported
file.

I hope this helps.

> Cheers,
>
> Marius
>

--
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13  9:37  suvayu ali
@ 2011-10-13 15:26    Marius Hofert
2011-10-13 18:31      suvayu ali
From: Marius Hofert @ 2011-10-13 15:26 UTC (permalink / raw)
To: suvayu ali; +Cc: Emacs help

Dear Suvayu,

thanks.
It would be good to know how latex export can be customized to achieve this.

Cheers,

Marius

On 2011-10-13, at 11:37 , suvayu ali wrote:

> On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
> <marius.hofert@math.ethz.ch> wrote:
>> Dear all,
>>
>> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
>> How can I get numbered lists like this: (1), (2),...?
>> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
>>
>
> I don't think you can. But you can customise latex export (maybe even
> html export, but I don't know) to show lists like that in the exported
> file.
>
> I hope this helps.
>
>> Cheers,
>>
>> Marius
>>
>
>
>
> --
> Suvayu
>
> Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 15:26    Marius Hofert
@ 2011-10-13 18:31      suvayu ali
0 siblings, 0 replies; 19+ messages in thread
From: suvayu ali @ 2011-10-13 18:31 UTC (permalink / raw)
To: Marius Hofert; +Cc: Emacs help

Hi Marius,

On Thu, Oct 13, 2011 at 5:26 PM, Marius Hofert
<marius.hofert@math.ethz.ch> wrote:
> Dear Suvayu,
>
> thanks.
> It would be good to know how latex export can be customized to achieve this.
>

--
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-15 15:56            Carsten Dominik
@ 2011-10-16 15:16              Eric S Fraga
0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2011-10-16 15:16 UTC (permalink / raw)
To: Carsten Dominik
Cc: Marius Hofert, Emacs help, nicholas.dokos, Nicolas Goaziou

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 15.10.2011, at 16:14, Eric S Fraga wrote:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>>> On 14.10.2011, at 13:31, Nicolas Goaziou wrote:
>>
>> [...]
>>
>>>
>>>> I have nothing against (1) as item bullets, as it doesn't interfere
>>>> with any existing Org syntax.
>>>
>>> That is not the only criterion.  Adding new syntax elements make more
>>> ASCII sequences special.  The Org markup is a heuristic set of
>>> special elements, and there is merrit in keeping it small.  We already
>>> have more bullets and in particular numbered types - and so far
>>> I have not seen a compelling reason to add more.
>>>
>>> - Carsten
>>
>> I am in the "keep it simple school".  So long as org allows me to
>> distinguish between numbered and unnumbered itemised lists, I am
>> happy.  I actually would prefer less choices than there are currently
>> because I would like to get to my choice more quickly when I do use
>> C-c - to change the type!
>>
>> To me, org is about information and time management, not about
>> formatting.  YMMV, of course!
>>
>> To be blunt, I would be happy with "-" and "1." in org, knowing that I
>> can customise upon export if necessary!  I'm not suggesting we go this
>> far, however ;-)
>
> Since backward compatibility is necessary, this counts as a vote for a
> customizable sequence, as proposed by Nicolas, do I see this right?
>
> So maybe this *is* a good idea, but I would be agains adding new list
> types.

I guess I was voting without realising that I was ;-)  I'm happy with
things as they are but definitely would have no problem with a
customisable list, one that I would tend to shorten!

--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.7 (release_7.7.381.g05ea)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-15 14:14          Eric S Fraga
2011-10-15 14:21            Marius Hofert
2011-10-15 15:35            Bernt Hansen
@ 2011-10-15 15:56            Carsten Dominik
2011-10-16 15:16              Eric S Fraga
From: Carsten Dominik @ 2011-10-15 15:56 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Marius Hofert, Emacs help, nicholas.dokos, Nicolas Goaziou

On 15.10.2011, at 16:14, Eric S Fraga wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On 14.10.2011, at 13:31, Nicolas Goaziou wrote:
>
> [...]
>
>>
>>> I have nothing against (1) as item bullets, as it doesn't interfere
>>> with any existing Org syntax.
>>
>> That is not the only criterion.  Adding new syntax elements make more
>> ASCII sequences special.  The Org markup is a heuristic set of
>> special elements, and there is merrit in keeping it small.  We already
>> have more bullets and in particular numbered types - and so far
>> I have not seen a compelling reason to add more.
>>
>> - Carsten
>
> I am in the "keep it simple school".  So long as org allows me to
> distinguish between numbered and unnumbered itemised lists, I am
> happy.  I actually would prefer less choices than there are currently
> because I would like to get to my choice more quickly when I do use
> C-c - to change the type!
>
> To me, org is about information and time management, not about
> formatting.  YMMV, of course!
>
> To be blunt, I would be happy with "-" and "1." in org, knowing that I
> can customise upon export if necessary!  I'm not suggesting we go this
> far, however ;-)

Since backward compatibility is necessary, this counts as a vote for a
customizable sequence, as proposed by Nicolas, do I see this right?

So maybe this *is* a good idea, but I would be agains adding new list types.

- Carsten

>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
> : using Org-mode version 7.7 (release_7.7.381.g05ea)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-15 14:14          Eric S Fraga
2011-10-15 14:21            Marius Hofert
@ 2011-10-15 15:35            Bernt Hansen
2011-10-15 15:56            Carsten Dominik
2 siblings, 0 replies; 19+ messages in thread
From: Bernt Hansen @ 2011-10-15 15:35 UTC (permalink / raw)
To: Eric S Fraga
Cc: Nicolas Goaziou, Marius Hofert, Emacs help, nicholas.dokos,
Carsten Dominik

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> I am in the "keep it simple school".  So long as org allows me to
> distinguish between numbered and unnumbered itemised lists, I am
> happy.  I actually would prefer less choices than there are currently
> because I would like to get to my choice more quickly when I do use
> C-c - to change the type!

You can switch (a little faster) with S-right and S-left arrows anywhere
on the list item.

HTH,
Bernt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-15 14:14          Eric S Fraga
@ 2011-10-15 14:21            Marius Hofert
2011-10-15 15:35            Bernt Hansen
2011-10-15 15:56            Carsten Dominik
2 siblings, 0 replies; 19+ messages in thread
From: Marius Hofert @ 2011-10-15 14:21 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Emacs help, nicholas.dokos, Nicolas Goaziou, Carsten Dominik

I'm 100% with Eric, just that I would say "-" and "(1)" are enough.

On 2011-10-15, at 16:14 , Eric S Fraga wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On 14.10.2011, at 13:31, Nicolas Goaziou wrote:
>
> [...]
>
>>
>>> I have nothing against (1) as item bullets, as it doesn't interfere
>>> with any existing Org syntax.
>>
>> That is not the only criterion.  Adding new syntax elements make more
>> ASCII sequences special.  The Org markup is a heuristic set of
>> special elements, and there is merrit in keeping it small.  We already
>> have more bullets and in particular numbered types - and so far
>> I have not seen a compelling reason to add more.
>>
>> - Carsten
>
> I am in the "keep it simple school".  So long as org allows me to
> distinguish between numbered and unnumbered itemised lists, I am
> happy.  I actually would prefer less choices than there are currently
> because I would like to get to my choice more quickly when I do use
> C-c - to change the type!
>
> To me, org is about information and time management, not about
> formatting.  YMMV, of course!
>
> To be blunt, I would be happy with "-" and "1." in org, knowing that I
> can customise upon export if necessary!  I'm not suggesting we go this
> far, however ;-)
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
> : using Org-mode version 7.7 (release_7.7.381.g05ea)

ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
marius.hofert@math.ethz.ch
http://www.math.ethz.ch/~hofertj

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-14 12:14        Carsten Dominik
@ 2011-10-15 14:14          Eric S Fraga
2011-10-15 14:21            Marius Hofert
(2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Eric S Fraga @ 2011-10-15 14:14 UTC (permalink / raw)
To: Carsten Dominik
Cc: Marius Hofert, Emacs help, nicholas.dokos, Nicolas Goaziou

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 14.10.2011, at 13:31, Nicolas Goaziou wrote:

[...]

>
>>  I have nothing against (1) as item bullets, as it doesn't interfere
>>  with any existing Org syntax.
>
> That is not the only criterion.  Adding new syntax elements make more
> ASCII sequences special.  The Org markup is a heuristic set of
> special elements, and there is merrit in keeping it small.  We already
> have more bullets and in particular numbered types - and so far
> I have not seen a compelling reason to add more.
>
> - Carsten

I am in the "keep it simple school".  So long as org allows me to
distinguish between numbered and unnumbered itemised lists, I am
happy.  I actually would prefer less choices than there are currently
because I would like to get to my choice more quickly when I do use
C-c - to change the type!

formatting.  YMMV, of course!

To be blunt, I would be happy with "-" and "1." in org, knowing that I
can customise upon export if necessary!  I'm not suggesting we go this
far, however ;-)

--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.7 (release_7.7.381.g05ea)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-14 12:05        Jambunathan K
2011-10-14 12:24          suvayu ali
@ 2011-10-14 12:37          Marius Hofert
1 sibling, 0 replies; 19+ messages in thread
From: Marius Hofert @ 2011-10-14 12:37 UTC (permalink / raw)
To: Jambunathan K; +Cc: Emacs help, nicholas.dokos, Nicolas Goaziou

Hi all,

I am quite impressed by this discussion, thanks a lot.
I am an org-mode user for just a couple of days, and an emacs user for four weeks today. Needless to say, I can't contribute anything useful to this discussion.
The only thing(s) I would like to say is/are:
(1) If it is not too complicated from a technical point of view, I would strongly recommend to enable lists like (1), (2), etc.  I gave some reasons in one of my earlier e-mails in this thread. There are many more (from a typography point of view, but also from a technical point of view [e.g., if you have auto-pairing of parentheses enabled, it's just more convenient.]).
(2) From a LaTeX point of view, I am sure the experts here (and I mean everyone in this thread except me) know the LaTeX package "enumitem". It gives the greatest flexibility of creating lists I know of and behaves better in many circumstances than other enumerate-like environments. So I can only recommend using this approach for making lists (in which way this is possible/desirable I can't tell since I'm not an org-mode expert).

I will certainly become a heavy org-mode user in the next months/years. Lists like (1), (2),... I would definitely use a lot.

Cheers,

Marius

On 2011-10-14, at 14:05 , Jambunathan K wrote:

>
>>  What about letting go those two variables and create
>>  org-list-bullet-types', which would be a list of strings like:
>>
>>           '("-" "+" "*" "1." "1)" "(1)" "a." "a)" "A)" "A.")
>>
>>  It would be hard-coded but every bullet type could be opt-in or
>>  opt-out via customize. The default value should be as short as
>>  possible like '("-" "+" "*" "1." "a.").
>>
>>  I can work it out in a few days if we agree.
>
> What percentage of users (OK, not percentage of users but numbers of
> users) you think will *actually* exercise the opt-in and opt-out
> configuration if provided?
>
> If the number of hands raised is in single digits, I would assume that
> it is more of a niche feature and let go of it.
>
> Is it psychologically very taxing to see 1. instead of a (1) in an Org
> buffer. Could it be so taxing that a user's productivity will be
> impacted by it?
>
> Or
>
> Is it that more varieties of bullets is needed for creating "rich"
> deeply nested lists so that each level of the list can take on a
> different bullet for better differentiation.
> --

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-14 12:05        Jambunathan K
@ 2011-10-14 12:24          suvayu ali
2011-10-14 12:37          Marius Hofert
1 sibling, 0 replies; 19+ messages in thread
From: suvayu ali @ 2011-10-14 12:24 UTC (permalink / raw)
To: Nicolas Goaziou, nicholas.dokos, Marius Hofert, Emacs help

Hi everyone,

On Fri, Oct 14, 2011 at 2:05 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
> Is it psychologically very taxing to see 1. instead of a (1) in an Org
> buffer. Could it be so taxing that a user's productivity will be
> impacted by it?
>

For my personal use I don't care much as long as there are
ordered/enumerated and unordered/plain lists to choose from, after all
only the exported file is for public consumption. :) However I
strongly feel _against_ the '*' syntax. Its too close to a headline.
It is also unusable if one chooses not to use indentation for the text
under a headline (e.g. below). I often prefer this as deeply nested
(say, level 4) headlines often start to run out of columns due to
wrapping.

Some list
* list item 1
* list item 2

> Or
>
> Is it that more varieties of bullets is needed for creating "rich"
> deeply nested lists so that each level of the list can take on a
> different bullet for better differentiation.

This is pretty much the reason I switch list types. Something like:

+ Case 1
- comment on something of note
+ Case 2

That said, I would probably use the customize option.

--
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-14 11:31      Nicolas Goaziou
2011-10-14 12:05        Jambunathan K
@ 2011-10-14 12:14        Carsten Dominik
2011-10-15 14:14          Eric S Fraga
From: Carsten Dominik @ 2011-10-14 12:14 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Emacs help, nicholas.dokos, Marius Hofert

On 14.10.2011, at 13:31, Nicolas Goaziou wrote:

> Hello,
>
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> Marius Hofert <marius.hofert@math.ethz.ch> wrote:
>>
>>
>>> What do you mean by "better solution"? As far as I can tell, your
>>> approach is precisely what Suvayu pointed to.
>>
>> No: what Suvayu pointed to can be done with the standard latex exporter,
>> so it would not require changes to org-list-generic-to-latex. Just add
>> something like this at the top of your org file:
>>
>> #+LATEX: \renewcommand{\theenumi}{(\arabic{enumi})}
>>
>> It's better in that it is simpler. There are drawbacks however: the
>> above produces lists like this:
>>
>> (1). foo
>> (2). bar
>>
>> with a period after the closing paren.
>>
>>> Using your approach, of course much more is possible, please look at
>>> the create "enumitem" package with all its customizations.
>>>
>>
>> That is true: which one is "better" depends on one's requirements (both
>> the desired output and how much pain one is willing to suffer in order
>> to get there).
>>
>>> But this approach is a no-go for me (at least at the moment) mainly
>>> due to the following reasons (please let me know if I'm wrong, I'm a
>>> total newbie to org-mode):
>>
>>> 1) I have about 40 lists in one file. Having to put in special LaTeX
>>> commands is not an option (maybe on only has to type it in once, but
>>> then it can easily get overseen, e.g., when you move lists around and
>>> the one containing the LaTeX commands is not the first one in the
>>> document anymore)
>>
>> That's no problem: the LATEX_HEADER line goes in once at the top
>> of the org file. You can move lists around at will.
>>
>>> 2) org-mode is basically a "better" text-mode. I don't want to have
>>> LaTeX code in there if I print it as a .txt file.
>>>
>>> Is there a solution without having to put #+LATEX_HEADER:
>>> \usepackage{enumerate} before each list? Can this be set anywhere in
>>> the preferences?
>>>
>>
>> You can customize the latex preamble that org adds to latex files to do
>> that. The disadvantage is that you get the modified preamble always.
>> See the org-export-latex-packages-alist variable for one way to do that.
>>
>>> But I assume that I still have to put in lists in org-mode like this:
>>> 1.,2.,... or 1),2),... and can't put them in like this (1),(2),...?
>>
>> Correct: that would require changes to org-list.el I think - but Nicolas
>> will have to say the final word on this. All the solutions so far work
>> by modifying the latex output only, not the way you enter the list into
>> the org file.
>
> - On the Org part:
>
>  I have nothing against (1) as item bullets, as it doesn't interfere
>  with any existing Org syntax.

That is not the only criterion.  Adding new syntax elements make more
ASCII sequences special.  The Org markup is a heuristic set of
special elements, and there is merrit in keeping it small.  We already
have more bullets and in particular numbered types - and so far
I have not seen a compelling reason to add more.

- Carsten

> I just think it shouldn't be available
>  by default (much like alphabetical ordered lists).
>
>  The implementation isn't hard /per se/ (at least less changes are
>  required than implementing, for example, roman numbered lists), but
>  I also think there should be some cleanup with regards to item
>  bullets. So far, there is org-plain-list-ordered-item-terminator' and
>  org-alphabetical-lists' to tweak them. We should avoid adding a third
>  one.
>
>  What about letting go those two variables and create
>  org-list-bullet-types', which would be a list of strings like:
>
>           '("-" "+" "*" "1." "1)" "(1)" "a." "a)" "A)" "A.")
>
>  It would be hard-coded but every bullet type could be opt-in or
>  opt-out via customize. The default value should be as short as
>  possible like '("-" "+" "*" "1." "a.").
>
>  I can work it out in a few days if we agree.
>
> - On the LaTeX part:
>
>  Most of the time, it's better to let LaTeX choose its bullets than
>  enforcing code produced to mimic Org buffer. In other words, a "(1)"
>  bullet should only mean "enumerate item" instead of "enumerate item
>  like (1)".
>
>  Though, in the past months, I have been working on a overhaul of the
>  whole export system (as a part of a bigger project). If I ever finish
>  it, and if it ever hits Org core, the LaTeX back-end should make it
>  easier to use "inparaenum" and "paraitem" packages directly from Org
>
>  For now, I think solutions offered in this thread are sufficient, if
>  not practical.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-14 11:31      Nicolas Goaziou
@ 2011-10-14 12:05        Jambunathan K
2011-10-14 12:24          suvayu ali
2011-10-14 12:37          Marius Hofert
2011-10-14 12:14        Carsten Dominik
1 sibling, 2 replies; 19+ messages in thread
From: Jambunathan K @ 2011-10-14 12:05 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Emacs help, nicholas.dokos, Marius Hofert

>   What about letting go those two variables and create
>   org-list-bullet-types', which would be a list of strings like:
>
>            '("-" "+" "*" "1." "1)" "(1)" "a." "a)" "A)" "A.")
>
>   It would be hard-coded but every bullet type could be opt-in or
>   opt-out via customize. The default value should be as short as
>   possible like '("-" "+" "*" "1." "a.").
>
>   I can work it out in a few days if we agree.

What percentage of users (OK, not percentage of users but numbers of
users) you think will *actually* exercise the opt-in and opt-out
configuration if provided?

If the number of hands raised is in single digits, I would assume that
it is more of a niche feature and let go of it.

Is it psychologically very taxing to see 1. instead of a (1) in an Org
buffer. Could it be so taxing that a user's productivity will be
impacted by it?

Or

Is it that more varieties of bullets is needed for creating "rich"
deeply nested lists so that each level of the list can take on a
different bullet for better differentiation.
--

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 20:28    Nick Dokos
@ 2011-10-14 11:31      Nicolas Goaziou
2011-10-14 12:05        Jambunathan K
2011-10-14 12:14        Carsten Dominik
0 siblings, 2 replies; 19+ messages in thread
From: Nicolas Goaziou @ 2011-10-14 11:31 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Marius Hofert, Emacs help

Hello,

Nick Dokos <nicholas.dokos@hp.com> writes:

> Marius Hofert <marius.hofert@math.ethz.ch> wrote:
>
>
>> What do you mean by "better solution"? As far as I can tell, your
>> approach is precisely what Suvayu pointed to.
>
> No: what Suvayu pointed to can be done with the standard latex exporter,
> so it would not require changes to org-list-generic-to-latex. Just add
> something like this at the top of your org file:
>
> #+LATEX: \renewcommand{\theenumi}{(\arabic{enumi})}
>
> It's better in that it is simpler. There are drawbacks however: the
> above produces lists like this:
>
> (1). foo
> (2). bar
>
> with a period after the closing paren.
>
>> Using your approach, of course much more is possible, please look at
>> the create "enumitem" package with all its customizations.
>>
>
> That is true: which one is "better" depends on one's requirements (both
> the desired output and how much pain one is willing to suffer in order
> to get there).
>
>> But this approach is a no-go for me (at least at the moment) mainly
>> due to the following reasons (please let me know if I'm wrong, I'm a
>> total newbie to org-mode):
>
>> 1) I have about 40 lists in one file. Having to put in special LaTeX
>> commands is not an option (maybe on only has to type it in once, but
>> then it can easily get overseen, e.g., when you move lists around and
>> the one containing the LaTeX commands is not the first one in the
>> document anymore)
>
> That's no problem: the LATEX_HEADER line goes in once at the top
> of the org file. You can move lists around at will.
>
>> 2) org-mode is basically a "better" text-mode. I don't want to have
>> LaTeX code in there if I print it as a .txt file.
>>
>> Is there a solution without having to put #+LATEX_HEADER:
>> \usepackage{enumerate} before each list? Can this be set anywhere in
>> the preferences?
>>
>
> You can customize the latex preamble that org adds to latex files to do
> that. The disadvantage is that you get the modified preamble always.
> See the org-export-latex-packages-alist variable for one way to do that.
>
>> But I assume that I still have to put in lists in org-mode like this:
>> 1.,2.,... or 1),2),... and can't put them in like this (1),(2),...?
>
> Correct: that would require changes to org-list.el I think - but Nicolas
> will have to say the final word on this. All the solutions so far work
> by modifying the latex output only, not the way you enter the list into
> the org file.

- On the Org part:

I have nothing against (1) as item bullets, as it doesn't interfere
with any existing Org syntax. I just think it shouldn't be available
by default (much like alphabetical ordered lists).

The implementation isn't hard /per se/ (at least less changes are
required than implementing, for example, roman numbered lists), but
I also think there should be some cleanup with regards to item
bullets. So far, there is org-plain-list-ordered-item-terminator' and
org-alphabetical-lists' to tweak them. We should avoid adding a third
one.

What about letting go those two variables and create
org-list-bullet-types', which would be a list of strings like:

'("-" "+" "*" "1." "1)" "(1)" "a." "a)" "A)" "A.")

It would be hard-coded but every bullet type could be opt-in or
opt-out via customize. The default value should be as short as
possible like '("-" "+" "*" "1." "a.").

I can work it out in a few days if we agree.

- On the LaTeX part:

Most of the time, it's better to let LaTeX choose its bullets than
enforcing code produced to mimic Org buffer. In other words, a "(1)"
bullet should only mean "enumerate item" instead of "enumerate item
like (1)".

Though, in the past months, I have been working on a overhaul of the
whole export system (as a part of a bigger project). If I ever finish
it, and if it ever hits Org core, the LaTeX back-end should make it
easier to use "inparaenum" and "paraitem" packages directly from Org

For now, I think solutions offered in this thread are sufficient, if
not practical.

Regards,

--
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 20:02  Alan E. Davis
@ 2011-10-13 20:44    Nick Dokos
0 siblings, 0 replies; 19+ messages in thread
From: Nick Dokos @ 2011-10-13 20:44 UTC (permalink / raw)
To: Alan E. Davis; +Cc: Marius Hofert, Emacs help, nicholas.dokos

Alan E. Davis <lngndvs@gmail.com> wrote:

> Without diving into how to set it up in org-mode, the paralist package for LaTeX enables inline numbered lists, as in
>
> %% In preamble
> \usepackage{paralist}
>
> %% In document
> \begin{inparaenum}
>    \item first element
>   \item second element
> \end{inparaenum}
>
> As to how to organize this to be an option for org-mode without incorporating above into the setup, I would also be interested.
>

The method described below can of course accomplish this: you need to
change the :ostart and :oend settings. It's also fairly easy to define
customizable variables for all of this, but that is left as an exercise
to the interested reader... Nicolas might be interested in anything you
come up with.

Nick

Hint (entirely untested):

(defcustom o-e-l-l-s-ostart "\begin{enumerate}\n" ...)
(defcustom o-e-l-l-s-oend ...)
...

(setq org-export-latex-list-settings (:splice nil :ostart ,o-e-l-l-s-ostart :oend ,o-e-l-l-s-oend
:ustart .....)

...[ some way to reevaluate the above variable if any of its components change - does custom provide anything like that?? ]...

(defun org-list-to-latex (...)
...
(org-combine-plists
org-export-latex-list-settings
params)
...

> Alan
>
> On Thu, Oct 13, 2011 at 12:10 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>     [ I started this earlier but I guess I didn't send it out. Suvayu has
>      replied in the meantime with a pointer to a better solution than this
>      one, but this might be of some minor interest to some people as well -
>      besides, I spent a whole 20 minutes on it, half of it trying to figure
>      out why my mail was not working :-( : why let that effort go to
>      waste?:-) ]
>
>     Marius Hofert <marius.hofert@math.ethz.ch> wrote:
>
>     > Dear Suvayu,
>     >
>     > thanks.
>     > It would be good to know how latex export can be customized to achieve this.
>     >
>
>     Depends on how much customization you are willing to go through: there is an
>     enumerate.sty package in LaTeX that can do that:
>
>     --8<---------------cut here---------------start------------->8---
>     ...
>     \usepackage{enumerate}
>     ...
>     \begin{enumerate}[(1)]
>     \item foo
>     \item bar
>     \end{enumerate}
>     ...
>     --8<---------------cut here---------------start------------->8---
>
>     Inserting the \usepackage from the org file is no problem:
>
>     --8<---------------cut here---------------end--------------->8---
>     ...
>     --8<---------------cut here---------------end--------------->8---
>
>     Getting the argument to the enumerate environment in the right place is
>     another matter. I think the only way is to redefine org-list-generic-to-latex
>     like this (add this to your initialization file, .emacs or whatever, after you
>
>     --8<---------------cut here---------------start------------->8---
>     (require 'org-list)
>
>     (defun org-list-to-latex (list &optional params)
>      "Convert LIST into a LaTeX list.
>     LIST is as returned by org-list-parse-list'.  PARAMS is a property list
>     with overruling parameters for org-list-to-generic'."
>      (org-list-to-generic
>       list
>       (org-combine-plists
>        '(:splice nil :ostart "\\begin{enumerate}[(1)]\n" :oend "\\end{enumerate}"
>                   :ustart "\\begin{itemize}\n" :uend "\\end{itemize}"
>                   :dstart "\\begin{description}\n" :dend "\\end{description}"
>                   :dtstart "[" :dtend "] "
>                   :istart "\\item " :iend "\n"
>                   :icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
>                             (if enum
>                                 ;; LaTeX increments counter just before
>                                 ;; using it, so set it to the desired
>                                 ;; value, minus one.
>                                 (format "\\setcounter{enum%s}{%s}\n\\item "
>                                         enum (1- counter))
>                               "\\item "))
>                   :csep "\n"
>                   :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}"
>                   :cbtrans "$\\boxminus$")
>        params)))
>     --8<---------------cut here---------------end--------------->8---
>
>     The only change is the definition of :ostart. Not a very flexible method,
>     but it will serve in a pinch. ngz et al. might have better ideas.
>
>     I should say that there are other ways to customize enumeration labels
>     in LaTeX - see e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=enumerate -
>     but afaict they would all require some rewiring of the above function, similar
>     to the above.
>
>     Nick
>
>     > Cheers,
>     >
>     > Marius
>     >
>     > On 2011-10-13, at 11:37 , suvayu ali wrote:
>     >
>     > > On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
>     > > <marius.hofert@math.ethz.ch> wrote:
>     > >> Dear all,
>     > >>
>     > >> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
>     > >> How can I get numbered lists like this: (1), (2),...?
>     > >> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
>     > >>
>     > >
>     > > I don't think you can. But you can customise latex export (maybe even
>     > > html export, but I don't know) to show lists like that in the exported
>     > > file.
>     > >
>     > > I hope this helps.
>     > >
>     > >> Cheers,
>     > >>
>     > >> Marius
>     > >>
>     > >
>     > >
>     > >
>     > > --
>     > > Suvayu
>     > >
>     > > Open source is the future. It sets us free.
>     >
>     >
>     >
>
>
> ----------------------------------------------------
> Alternatives:
>
> ----------------------------------------------------

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 20:00  Marius Hofert
@ 2011-10-13 20:28    Nick Dokos
2011-10-14 11:31      Nicolas Goaziou
From: Nick Dokos @ 2011-10-13 20:28 UTC (permalink / raw)
To: Marius Hofert; +Cc: Emacs help, nicholas.dokos

Marius Hofert <marius.hofert@math.ethz.ch> wrote:

> What do you mean by "better solution"? As far as I can tell, your
> approach is precisely what Suvayu pointed to.

No: what Suvayu pointed to can be done with the standard latex exporter,
so it would not require changes to org-list-generic-to-latex. Just add
something like this at the top of your org file:

#+LATEX: \renewcommand{\theenumi}{(\arabic{enumi})}

It's better in that it is simpler. There are drawbacks however: the
above produces lists like this:

(1). foo
(2). bar

with a period after the closing paren.

> Using your approach, of course much more is possible, please look at
> the create "enumitem" package with all its customizations.
>

That is true: which one is "better" depends on one's requirements (both
the desired output and how much pain one is willing to suffer in order
to get there).

> But this approach is a no-go for me (at least at the moment) mainly
> due to the following reasons (please let me know if I'm wrong, I'm a
> total newbie to org-mode):

> 1) I have about 40 lists in one file. Having to put in special LaTeX
> commands is not an option (maybe on only has to type it in once, but
> then it can easily get overseen, e.g., when you move lists around and
> the one containing the LaTeX commands is not the first one in the
> document anymore)

That's no problem: the LATEX_HEADER line goes in once at the top
of the org file. You can move lists around at will.

> 2) org-mode is basically a "better" text-mode. I don't want to have
> LaTeX code in there if I print it as a .txt file.
>
> Is there a solution without having to put #+LATEX_HEADER:
> \usepackage{enumerate} before each list? Can this be set anywhere in
> the preferences?
>

You can customize the latex preamble that org adds to latex files to do
that. The disadvantage is that you get the modified preamble always.
See the org-export-latex-packages-alist variable for one way to do that.

> But I assume that I still have to put in lists in org-mode like this:
> 1.,2.,... or 1),2),... and can't put them in like this (1),(2),...?

Correct: that would require changes to org-list.el I think - but Nicolas
will have to say the final word on this. All the solutions so far work
by modifying the latex output only, not the way you enter the list into
the org file.

Nick

> Hmm... this is indeed a drawback. The latter lists a far better
> visible, they are more consistent with respect to other list types
> such as (i), (ii), etc., and ultimately also with respect to numbering
> of equations. There are probably even more typographic reasons to
> display lists like this. For example, if you refer to a list within a
> theorem environment (which has a label itself) and you use 1.,
> 2.,... lists, then this looks like this:

> Theorem 1.2 2. shows that ...

> The eye hardly sees that one means Theorem 1.2 Part (2). Even worse,
> when reading this, one thinks that the sentence stops after "2.". It's
> really a bad thing, and not getting much better with right-sided
> parentheses.
>
> Cheers,
>
> Marius
>
> On 2011-10-13, at 21:10 , Nick Dokos wrote:
>
> >
> > [ I started this earlier but I guess I didn't send it out. Suvayu has
> >  replied in the meantime with a pointer to a better solution than this
> >  one, but this might be of some minor interest to some people as well -
> >  besides, I spent a whole 20 minutes on it, half of it trying to figure
> >  out why my mail was not working :-( : why let that effort go to
> >  waste?:-) ]
> >
> >
> > Marius Hofert <marius.hofert@math.ethz.ch> wrote:
> >
> >> Dear Suvayu,
> >>
> >> thanks.
> >> It would be good to know how latex export can be customized to achieve this.
> >>
> >
> > Depends on how much customization you are willing to go through: there is an
> > enumerate.sty package in LaTeX that can do that:
> >
> > --8<---------------cut here---------------start------------->8---
> > ...
> > \usepackage{enumerate}
> > ...
> > \begin{enumerate}[(1)]
> > \item foo
> > \item bar
> > \end{enumerate}
> > ...
> > --8<---------------cut here---------------start------------->8---
> >
> > Inserting the \usepackage from the org file is no problem:
> >
> > --8<---------------cut here---------------end--------------->8---
> > ...
> > --8<---------------cut here---------------end--------------->8---
> >
> >
> > Getting the argument to the enumerate environment in the right place is
> > another matter. I think the only way is to redefine org-list-generic-to-latex
> > like this (add this to your initialization file, .emacs or whatever, after you
> >
> > --8<---------------cut here---------------start------------->8---
> > (require 'org-list)
> >
> > (defun org-list-to-latex (list &optional params)
> >  "Convert LIST into a LaTeX list.
> > LIST is as returned by org-list-parse-list'.  PARAMS is a property list
> > with overruling parameters for org-list-to-generic'."
> >  (org-list-to-generic
> >   list
> >   (org-combine-plists
> >    '(:splice nil :ostart "\\begin{enumerate}[(1)]\n" :oend "\\end{enumerate}"
> > 	       :ustart "\\begin{itemize}\n" :uend "\\end{itemize}"
> > 	       :dstart "\\begin{description}\n" :dend "\\end{description}"
> > 	       :dtstart "[" :dtend "] "
> > 	       :istart "\\item " :iend "\n"
> > 	       :icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
> > 			 (if enum
> > 			     ;; LaTeX increments counter just before
> > 			     ;; using it, so set it to the desired
> > 			     ;; value, minus one.
> > 			     (format "\\setcounter{enum%s}{%s}\n\\item "
> > 				     enum (1- counter))
> > 			   "\\item "))
> > 	       :csep "\n"
> > 	       :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}"
> > 	       :cbtrans "$\\boxminus$")
> >    params)))
> > --8<---------------cut here---------------end--------------->8---
> >
> > The only change is the definition of :ostart. Not a very flexible method,
> > but it will serve in a pinch. ngz et al. might have better ideas.
> >
> > I should say that there are other ways to customize enumeration labels
> > in LaTeX - see e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=enumerate -
> > but afaict they would all require some rewiring of the above function, similar
> > to the above.
> >
> > Nick
> >
> >> Cheers,
> >>
> >> Marius
> >>
> >> On 2011-10-13, at 11:37 , suvayu ali wrote:
> >>
> >>> On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
> >>> <marius.hofert@math.ethz.ch> wrote:
> >>>> Dear all,
> >>>>
> >>>> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
> >>>> How can I get numbered lists like this: (1), (2),...?
> >>>> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
> >>>>
> >>>
> >>> I don't think you can. But you can customise latex export (maybe even
> >>> html export, but I don't know) to show lists like that in the exported
> >>> file.
> >>>
> >>> I hope this helps.
> >>>
> >>>> Cheers,
> >>>>
> >>>> Marius
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Suvayu
> >>>
> >>> Open source is the future. It sets us free.
> >>
> >>
> >>
>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 19:10 Nick Dokos
2011-10-13 20:00  Marius Hofert
@ 2011-10-13 20:02  Alan E. Davis
2011-10-13 20:44    Nick Dokos
From: Alan E. Davis @ 2011-10-13 20:02 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Marius Hofert, Emacs help

[-- Attachment #1: Type: text/plain, Size: 4548 bytes --]

Without diving into how to set it up in org-mode, the paralist package for
LaTeX enables inline numbered lists, as in

%% In preamble
\usepackage{paralist}

%% In document
\begin{inparaenum}
\item first element
\item second element
\end{inparaenum}

As to how to organize this to be an option for org-mode without
incorporating above into the setup, I would also be interested.

Alan

On Thu, Oct 13, 2011 at 12:10 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

>
> [ I started this earlier but I guess I didn't send it out. Suvayu has
>  replied in the meantime with a pointer to a better solution than this
>  one, but this might be of some minor interest to some people as well -
>  besides, I spent a whole 20 minutes on it, half of it trying to figure
>  out why my mail was not working :-( : why let that effort go to
>  waste?:-) ]
>
>
> Marius Hofert <marius.hofert@math.ethz.ch> wrote:
>
> > Dear Suvayu,
> >
> > thanks.
> > It would be good to know how latex export can be customized to achieve
> this.
> >
>
> Depends on how much customization you are willing to go through: there is
> an
> enumerate.sty package in LaTeX that can do that:
>
> --8<---------------cut here---------------start------------->8---
> ...
> \usepackage{enumerate}
> ...
> \begin{enumerate}[(1)]
> \item foo
> \item bar
> \end{enumerate}
> ...
> --8<---------------cut here---------------start------------->8---
>
> Inserting the \usepackage from the org file is no problem:
>
> --8<---------------cut here---------------end--------------->8---
> ...
> --8<---------------cut here---------------end--------------->8---
>
>
> Getting the argument to the enumerate environment in the right place is
> another matter. I think the only way is to redefine
> org-list-generic-to-latex
> like this (add this to your initialization file, .emacs or whatever, after
> you
>
> --8<---------------cut here---------------start------------->8---
> (require 'org-list)
>
> (defun org-list-to-latex (list &optional params)
>  "Convert LIST into a LaTeX list.
> LIST is as returned by org-list-parse-list'.  PARAMS is a property list
> with overruling parameters for org-list-to-generic'."
>  (org-list-to-generic
>   list
>   (org-combine-plists
>    '(:splice nil :ostart "\\begin{enumerate}[(1)]\n" :oend
> "\\end{enumerate}"
>               :ustart "\\begin{itemize}\n" :uend "\\end{itemize}"
>               :dstart "\\begin{description}\n" :dend "\\end{description}"
>               :dtstart "[" :dtend "] "
>               :istart "\\item " :iend "\n"
>               :icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
>                         (if enum
>                             ;; LaTeX increments counter just before
>                             ;; using it, so set it to the desired
>                             ;; value, minus one.
>                             (format "\\setcounter{enum%s}{%s}\n\\item "
>                                     enum (1- counter))
>                           "\\item "))
>               :csep "\n"
>               :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}"
>               :cbtrans "$\\boxminus$")
>    params)))
> --8<---------------cut here---------------end--------------->8---
>
> The only change is the definition of :ostart. Not a very flexible method,
> but it will serve in a pinch. ngz et al. might have better ideas.
>
> I should say that there are other ways to customize enumeration labels
> in LaTeX - see e.g.
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=enumerate -
> but afaict they would all require some rewiring of the above function,
> similar
> to the above.
>
> Nick
>
> > Cheers,
> >
> > Marius
> >
> > On 2011-10-13, at 11:37 , suvayu ali wrote:
> >
> > > On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
> > > <marius.hofert@math.ethz.ch> wrote:
> > >> Dear all,
> > >>
> > >> In the manual, I found that numbered lists can be created with 1), 2),
> ... or 1., 2., ...
> > >> How can I get numbered lists like this: (1), (2),...?
> > >> I found org-list-demote-modify-bullet, but the help (and a google
> search) did not help me in finding a solution to this.
> > >>
> > >
> > > I don't think you can. But you can customise latex export (maybe even
> > > html export, but I don't know) to show lists like that in the exported
> > > file.
> > >
> > > I hope this helps.
> > >
> > >> Cheers,
> > >>
> > >> Marius
> > >>
> > >
> > >
> > >
> > > --
> > > Suvayu
> > >
> > > Open source is the future. It sets us free.
> >
> >
> >
>
>

[-- Attachment #2: Type: text/html, Size: 6062 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
2011-10-13 19:10 Nick Dokos
@ 2011-10-13 20:00  Marius Hofert
2011-10-13 20:28    Nick Dokos
2011-10-13 20:02  Alan E. Davis
From: Marius Hofert @ 2011-10-13 20:00 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Emacs help

Dear Nick,

thanks for helping.

What do you mean by "better solution"? As far as I can tell, your approach is precisely what Suvayu pointed to. Using your approach, of course much more is possible, please look at the create "enumitem" package with all its customizations.

But this approach is a no-go for me (at least at the moment) mainly due to the following reasons (please let me know if I'm wrong, I'm a total newbie to org-mode):
1) I have about 40 lists in one file. Having to put in special LaTeX commands is not an option (maybe on only has to type it in once, but then it can easily get overseen, e.g., when you move lists around and the one containing the LaTeX commands is not the first one in the document anymore)
2) org-mode is basically a "better" text-mode. I don't want to have LaTeX code in there if I print it as a .txt file.

Is there a solution without having to put
before each list? Can this be set anywhere in the preferences?

But I assume that I still have to put in lists in org-mode like this: 1.,2.,... or 1),2),... and can't put them in like this (1),(2),...?
Hmm... this is indeed a drawback. The latter lists a far better visible, they are more consistent with respect to other list types such as (i), (ii), etc., and ultimately also with respect to numbering of equations. There are probably even more typographic reasons to display lists like this. For example, if you refer to a list within a theorem environment (which has a label itself) and you use 1., 2.,... lists, then this looks like this:
Theorem 1.2 2. shows that ...
The eye hardly sees that one means Theorem 1.2 Part (2). Even worse, when reading this, one thinks that the sentence stops after "2.". It's really a bad thing, and not getting much better with right-sided parentheses.

Cheers,

Marius

On 2011-10-13, at 21:10 , Nick Dokos wrote:

>
> [ I started this earlier but I guess I didn't send it out. Suvayu has
>  replied in the meantime with a pointer to a better solution than this
>  one, but this might be of some minor interest to some people as well -
>  besides, I spent a whole 20 minutes on it, half of it trying to figure
>  out why my mail was not working :-( : why let that effort go to
>  waste?:-) ]
>
>
> Marius Hofert <marius.hofert@math.ethz.ch> wrote:
>
>> Dear Suvayu,
>>
>> thanks.
>> It would be good to know how latex export can be customized to achieve this.
>>
>
> Depends on how much customization you are willing to go through: there is an
> enumerate.sty package in LaTeX that can do that:
>
> --8<---------------cut here---------------start------------->8---
> ...
> \usepackage{enumerate}
> ...
> \begin{enumerate}[(1)]
> \item foo
> \item bar
> \end{enumerate}
> ...
> --8<---------------cut here---------------start------------->8---
>
> Inserting the \usepackage from the org file is no problem:
>
> --8<---------------cut here---------------end--------------->8---
> ...
> --8<---------------cut here---------------end--------------->8---
>
>
> Getting the argument to the enumerate environment in the right place is
> another matter. I think the only way is to redefine org-list-generic-to-latex
> like this (add this to your initialization file, .emacs or whatever, after you
>
> --8<---------------cut here---------------start------------->8---
> (require 'org-list)
>
> (defun org-list-to-latex (list &optional params)
>  "Convert LIST into a LaTeX list.
> LIST is as returned by org-list-parse-list'.  PARAMS is a property list
> with overruling parameters for org-list-to-generic'."
>  (org-list-to-generic
>   list
>   (org-combine-plists
>    '(:splice nil :ostart "\\begin{enumerate}[(1)]\n" :oend "\\end{enumerate}"
> 	       :ustart "\\begin{itemize}\n" :uend "\\end{itemize}"
> 	       :dstart "\\begin{description}\n" :dend "\\end{description}"
> 	       :dtstart "[" :dtend "] "
> 	       :istart "\\item " :iend "\n"
> 	       :icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
> 			 (if enum
> 			     ;; LaTeX increments counter just before
> 			     ;; using it, so set it to the desired
> 			     ;; value, minus one.
> 			     (format "\\setcounter{enum%s}{%s}\n\\item "
> 				     enum (1- counter))
> 			   "\\item "))
> 	       :csep "\n"
> 	       :cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}"
> 	       :cbtrans "$\\boxminus$")
>    params)))
> --8<---------------cut here---------------end--------------->8---
>
> The only change is the definition of :ostart. Not a very flexible method,
> but it will serve in a pinch. ngz et al. might have better ideas.
>
> I should say that there are other ways to customize enumeration labels
> in LaTeX - see e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=enumerate -
> but afaict they would all require some rewiring of the above function, similar
> to the above.
>
> Nick
>
>> Cheers,
>>
>> Marius
>>
>> On 2011-10-13, at 11:37 , suvayu ali wrote:
>>
>>> On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
>>> <marius.hofert@math.ethz.ch> wrote:
>>>> Dear all,
>>>>
>>>> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
>>>> How can I get numbered lists like this: (1), (2),...?
>>>> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
>>>>
>>>
>>> I don't think you can. But you can customise latex export (maybe even
>>> html export, but I don't know) to show lists like that in the exported
>>> file.
>>>
>>> I hope this helps.
>>>
>>>> Cheers,
>>>>
>>>> Marius
>>>>
>>>
>>>
>>>
>>> --
>>> Suvayu
>>>
>>> Open source is the future. It sets us free.
>>
>>
>>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: How to get numbered lists (1), (2), … ?
@ 2011-10-13 19:10 Nick Dokos
2011-10-13 20:00  Marius Hofert
2011-10-13 20:02  Alan E. Davis
0 siblings, 2 replies; 19+ messages in thread
From: Nick Dokos @ 2011-10-13 19:10 UTC (permalink / raw)
To: Marius Hofert; +Cc: Emacs help, nicholas.dokos

[ I started this earlier but I guess I didn't send it out. Suvayu has
replied in the meantime with a pointer to a better solution than this
one, but this might be of some minor interest to some people as well -
besides, I spent a whole 20 minutes on it, half of it trying to figure
out why my mail was not working :-( : why let that effort go to
waste?:-) ]

Marius Hofert <marius.hofert@math.ethz.ch> wrote:

> Dear Suvayu,
>
> thanks.
> It would be good to know how latex export can be customized to achieve this.
>

Depends on how much customization you are willing to go through: there is an
enumerate.sty package in LaTeX that can do that:

--8<---------------cut here---------------start------------->8---
...
\usepackage{enumerate}
...
\begin{enumerate}[(1)]
\item foo
\item bar
\end{enumerate}
...
--8<---------------cut here---------------start------------->8---

Inserting the \usepackage from the org file is no problem:

--8<---------------cut here---------------end--------------->8---
...
--8<---------------cut here---------------end--------------->8---

Getting the argument to the enumerate environment in the right place is
another matter. I think the only way is to redefine org-list-generic-to-latex
like this (add this to your initialization file, .emacs or whatever, after you

--8<---------------cut here---------------start------------->8---
(require 'org-list)

(defun org-list-to-latex (list &optional params)
"Convert LIST into a LaTeX list.
LIST is as returned by org-list-parse-list'.  PARAMS is a property list
with overruling parameters for org-list-to-generic'."
(org-list-to-generic
list
(org-combine-plists
'(:splice nil :ostart "\\begin{enumerate}[(1)]\n" :oend "\\end{enumerate}"
:ustart "\\begin{itemize}\n" :uend "\\end{itemize}"
:dstart "\\begin{description}\n" :dend "\\end{description}"
:dtstart "[" :dtend "] "
:istart "\\item " :iend "\n"
:icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
(if enum
;; LaTeX increments counter just before
;; using it, so set it to the desired
;; value, minus one.
(format "\\setcounter{enum%s}{%s}\n\\item "
enum (1- counter))
"\\item "))
:csep "\n"
:cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}"
:cbtrans "$\\boxminus$")
params)))
--8<---------------cut here---------------end--------------->8---

The only change is the definition of :ostart. Not a very flexible method,
but it will serve in a pinch. ngz et al. might have better ideas.

I should say that there are other ways to customize enumeration labels
in LaTeX - see e.g. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=enumerate -
but afaict they would all require some rewiring of the above function, similar
to the above.

Nick

> Cheers,
>
> Marius
>
> On 2011-10-13, at 11:37 , suvayu ali wrote:
>
> > On Thu, Oct 13, 2011 at 11:11 AM, Marius Hofert
> > <marius.hofert@math.ethz.ch> wrote:
> >> Dear all,
> >>
> >> In the manual, I found that numbered lists can be created with 1), 2), ... or 1., 2., ...
> >> How can I get numbered lists like this: (1), (2),...?
> >> I found org-list-demote-modify-bullet, but the help (and a google search) did not help me in finding a solution to this.
> >>
> >
> > I don't think you can. But you can customise latex export (maybe even
> > html export, but I don't know) to show lists like that in the exported
> > file.
> >
> > I hope this helps.
> >
> >> Cheers,
> >>
> >> Marius
> >>
> >
> >
> >
> > --
> > Suvayu
> >
> > Open source is the future. It sets us free.
>
>
>

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-10-16 15:16 UTC | newest]

2011-10-13  9:11 How to get numbered lists (1), (2), … ? Marius Hofert
2011-10-13  9:37  suvayu ali
2011-10-13 15:26    Marius Hofert
2011-10-13 18:31      suvayu ali
2011-10-13 19:10 Nick Dokos
2011-10-13 20:00  Marius Hofert
2011-10-13 20:28    Nick Dokos
2011-10-14 11:31      Nicolas Goaziou
2011-10-14 12:05        Jambunathan K
2011-10-14 12:24          suvayu ali
2011-10-14 12:37          Marius Hofert
2011-10-14 12:14        Carsten Dominik
2011-10-15 14:14          Eric S Fraga
2011-10-15 14:21            Marius Hofert
2011-10-15 15:35            Bernt Hansen
2011-10-15 15:56            Carsten Dominik
2011-10-16 15:16              Eric S Fraga
2011-10-13 20:02  Alan E. Davis
2011-10-13 20:44    Nick Dokos

Code repositories for project(s) associated with this inbox:

https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).`