On 2011-7-13 22:35 , Uwe Stöhr wrote:
Am 11.07.2011 23:35, schrieb Marcus Kriele:
However, I would change the label of the
sol environment: Currently it is an automatically generated counter
that may have nothing to do with
the counter of the corresponding problem. I find this misleading.
To what should I change it, a string plus the counter? If yes, what
string?
I do not think that a counter should be created for Sol. In the attached
document I have give examples why a counter would be problematic. I am
proposing something like this:
Style Sol
LabelString "Sol [label of Prob]"
LabelFont
Color Blue
EndFont
End
This label is ugly but gives the user a hint what to do. I chose the
color blue to indicate that this label is different from the actual
output. Ideally, one would replace "[label of Prob]" by the actual
counter of the problem but I could not do this. (I tried " LabelString
"Sol \ref{#1}" " but LyX ignored the part \ref{#1}.)
In addition, if the solutions are
written in the same order as the problems then in LyX it appears that
each solution references the
correct problem. However, the output gives question marks as the
references are not given
explicitly.
I don't get them with the template files. How can I get them?
I have attached an example.
I would prefer a label like "sol [label of problem]". While this
looks very different
from the output, it would reduce the likelihood of user error.
So you mean I should change the name of the style (the one in LyX's
style-combobox). If so, I'll do this as you suggested. But this is
independent of the label you see in your text when using Sol. How
should I change it. To avoid confusions, it is perhaps better if you
send me a patch how you would like to have it and I put it in. OK?
Sorry, I meant the label in the text window, not the LyX Style
combobox. I think that your choice in the combobox is okay. I have
given above a proposal for the label in the text.
(Btw. It is really time that I start documenting all the new LyX 2.0
features if even I don't know them all.)
In my opinion, the documentation is excellent and one of the strengths
of LyX. I am sure that it is an awful lot of work to keep it up to date
but I am also sure that many users will be grateful for this.
Regards,
Marcus
#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass svmono
\begin_preamble
\usepackage{type1cm}
\usepackage{multicol} % used for the two-column index
\usepackage[bottom]{footmisc} % places footnotes at page bottom
%\makeindex % used for the subject index
% please use the style svind.ist with
% your makeindex program
\end_preamble
\options graybox,envcountchap,sectrefs
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman times
\font_sans helvet
\font_typewriter courier
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered true
\pdf_bookmarksopen true
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder true
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Chapter
Examples for Solution Environments in svmono
\end_layout
\begin_layout Section
Problems
\end_layout
\begin_layout Prob
\begin_inset CommandInset label
LatexCommand label
name "prob:First-Prob-Environment"
\end_inset
First Prob Environment
\end_layout
\begin_layout --Separator--
\end_layout
\begin_layout Prob
\begin_inset CommandInset label
LatexCommand label
name "prob:Second-Prob-Environment"
\end_inset
Second Prob Environment
\end_layout
\begin_layout Section
Solutions
\end_layout
\begin_layout Sol
First solution.
My intent is to give the solution to Problem
\begin_inset CommandInset ref
LatexCommand ref
reference "prob:First-Prob-Environment"
\end_inset
.
I have not given the (required) optional argument, but it looks as if LyX
understands my intentions.
After all, it is natural to give the solutions in the same order as the
problems are stated.
The LyX GUI shows the
\begin_inset Quotes eld
\end_inset
correct
\begin_inset Quotes erd
\end_inset
number.
In reality, the number given as the LyX label of the solution has noting
to with the counter of the problem.
Moreover, the output will replace the number by questions marks.
For the average user it would be very hard to find the error.
\end_layout
\begin_layout --Separator--
\end_layout
\begin_layout Sol
Solution to Problem
\begin_inset CommandInset ref
LatexCommand ref
reference "prob:Second-Prob-Environment"
\end_inset
.
\end_layout
\begin_layout --Separator--
\end_layout
\begin_layout Sol
\begin_inset Argument
status open
\begin_layout Plain Layout
prob:First-Prob-Environment
\end_layout
\end_inset
I wish to give another solution to Problem
\begin_inset CommandInset ref
LatexCommand ref
reference "prob:First-Prob-Environment"
\end_inset
.
I am now doing it correctly using an optional argument.
While the solution is correctly numbered in the output (
\begin_inset Quotes eld
\end_inset
1.1
\begin_inset Quotes erd
\end_inset
), it is incorrectly numbered in LyX (
\begin_inset Quotes eld
\end_inset
1.3
\begin_inset Quotes erd
\end_inset
).
This would be confusing to the user.
\end_layout
\end_body
\end_document