Skip to content

Commit 8a7803e

Browse files
committed
minor install updates; draft markdown tutorial w/css
1 parent 3065ebd commit 8a7803e

File tree

12 files changed

+323
-13
lines changed

12 files changed

+323
-13
lines changed

MDtutorials/FontSize/FontSize.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: "Tutorial: Changing the GSAS-II Font Size"
3+
---
4+
<!--- Don't change the HTML version of this file; edit the .md version -->
5+
6+
[//1]: <> (Comment: This is an attempt to create a Tutorial in Markdown.)
7+
8+
## Intro
9+
10+
GSAS-II has customizable settings which are called preference
11+
settings. These are found in a menu command, as described below and
12+
are saved with other GSAS-II settings. As of January 3,
13+
2025 (in version #5802) a new feature was added that allows the
14+
GSAS-II font size to be changed via these settings. The font size will
15+
also be determined by settings on the local computer, so this size is
16+
relative to the the local OS settings.
17+
Not all parts of the GUI will be affected by this setting. Note that
18+
some of the modal windows (these are windows used to get
19+
input such as file names) that GSAS-II opens are created by your
20+
operating system and thus will have font sizes determined by system
21+
settings. Others may need changes to utilize this setting.
22+
If your use of GSAS-II is impared by this font setting not being
23+
applied to a section of GSAS-II please open a
24+
[GitHub
25+
ticket](https://github.com/AdvancedPhotonSource/GSAS-II/issues)
26+
and provide an example of what could be improved.
27+
28+
The font size setting is applied when GSAS-II is started, so changing it requires
29+
restarting GSAS-II before the effect of this setting is seen.
30+
31+
## 1. Finding the preferences settings
32+
33+
![Select the preference menu](menu1.png)
34+
35+
The font setting is determined by preference variable `FontSize_incr` and this is set inside the File menu (File->Preferences). On MacOS, preference settings are also found in the usual App menu (labeled GSAS-II or python, depending on how the GSAS-II GUI is started), as shown here.
36+
37+
## 2. Change the font preference value
38+
39+
![Opening the preference menu](dialog1.png)
40+
41+
When the Preferences menu is selected a window is opened where any of
42+
the preference variables can be selected. Select from the pull-down
43+
list the variable `FontSize_incr` as shown here.
44+
45+
![Setting the font size preference](dialog2.png)
46+
47+
This will open a window where the value can be set for the font
48+
size. Note that a value of 0 (the default) provides the
49+
system-default size for the font. A positive value provides a larger
50+
font and a negative value provides a smaller font. Only integer
51+
values can be used.
52+
53+
![Set if GSAS-II should be restarted](restart.png)
54+
55+
As noted before, the value set for `FontSize_incr` is applied only
56+
when the GSAS-II application is started, so when the "Save current
57+
settings" button is pressed, a window is displayed asking if GSAS-II
58+
should be restarted so that the change can take effect. It is fine to
59+
choose "No" here; the change will take effect the next time that
60+
GSAS-II is started. If "Yes" is selected, you will get the chance to
61+
save the current GSAS-II project.
62+
63+
![Set if the project needs to be saved](save.png)
64+
65+
When "Yes" is above, the window here is shown to ask if you want to
66+
save any changes made to the current GSAS-II project file.
67+
68+
- If "Cancel" is chosen, GSAS-II will not restart (but the change to the font size
69+
will be saved).
70+
- If "No" is selected, GSAS-II will end; any changes made since the
71+
file was last saved will be lost. GSAS-II will then restart without
72+
reading a .gpx file.
73+
- If "Yes" is selected the current .gpx file will be overwritten with
74+
the current project contents (if the project has never been saved,
75+
you will be asked for a location and name for the .gpx file. GSAS-II
76+
will then restart with the saved version of the project loaded.
77+
78+
## 3. Example with the changed font size
79+
80+
Below are two examples of GSAS-II with two different font size
81+
settings.
82+
83+
| `FontSize_incr` | Example |
84+
| :---: | ------------------------------------- |
85+
| 0 | ![Example of GSAS-II GUI with the default font size (font=0)](font0.png) |
86+
| 3 | ![Example of GSAS-II GUI with the font increased by 3 units (font=3)](font3.png) |
87+
88+
Note that not all text (for example the status message at the bottom
89+
of the window) has the font size changed.
90+
91+
----
92+
| |
93+
| ---: |
94+
| Brian Toby |
95+
| January 10, 2025 |

MDtutorials/FontSize/dialog1.png

116 KB
Loading

MDtutorials/FontSize/dialog2.png

47 KB
Loading

MDtutorials/FontSize/font0.png

382 KB
Loading

MDtutorials/FontSize/font3.png

454 KB
Loading

MDtutorials/FontSize/menu1.png

91.9 KB
Loading

MDtutorials/FontSize/restart.png

26.1 KB
Loading

MDtutorials/FontSize/save.png

51.1 KB
Loading

MDtutorials/FontSize/tutorial.css

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
/*
2+
Taken from style block generated by pandoc (not sure what most does)
3+
but w/figure & figcaption blocks added + a few settings crudely edited.
4+
5+
I'm sure this could be improved significantly.
6+
7+
*/
8+
9+
figure {
10+
float: right;
11+
margin-top: 1.5em;
12+
margin-bottom: 1.0em;
13+
clear: right;
14+
}
15+
figcaption {
16+
font-size: 0.95em;
17+
font-style: italic;
18+
}
19+
html {
20+
color: #1a1a1a;
21+
background-color: #fdfdfd;
22+
}
23+
body {
24+
margin: 0 auto;
25+
padding-left: 5px;
26+
padding-right: 5px;
27+
padding-top: 10px;
28+
padding-bottom: 10px;
29+
min-width: 600px;
30+
hyphens: auto;
31+
overflow-wrap: break-word;
32+
text-rendering: optimizeLegibility;
33+
font-kerning: normal;
34+
}
35+
header {
36+
margin-top: 0em;
37+
margin-bottom: 1em;
38+
text-align: center;
39+
}
40+
a {
41+
color: #ff1111;
42+
}
43+
a:visited {
44+
color: #ff3333;
45+
}
46+
h2, h4 {
47+
color: darkblue;
48+
}
49+
h1, h2, h3, h4, h5, h6 {
50+
margin-top: 1.5em;
51+
margin-bottom: 0.5em;
52+
clear: right;
53+
}
54+
55+
/* unchanged below */
56+
@media (max-width: 600px) {
57+
body {
58+
font-size: 0.9em;
59+
padding: 12px;
60+
}
61+
h1 {
62+
font-size: 1.8em;
63+
}
64+
}
65+
@media print {
66+
html {
67+
background-color: white;
68+
}
69+
body {
70+
background-color: transparent;
71+
color: black;
72+
font-size: 12pt;
73+
}
74+
p, h2, h3 {
75+
orphans: 3;
76+
widows: 3;
77+
}
78+
h2, h3, h4 {
79+
page-break-after: avoid;
80+
}
81+
}
82+
p {
83+
margin: 1em 0;
84+
}
85+
img {
86+
max-width: 100%;
87+
}
88+
svg {
89+
height: auto;
90+
max-width: 100%;
91+
}
92+
h5, h6 {
93+
font-size: 1em;
94+
font-style: italic;
95+
}
96+
h6 {
97+
font-weight: normal;
98+
}
99+
ol, ul {
100+
padding-left: 1.7em;
101+
margin-top: 1em;
102+
}
103+
li > ol, li > ul {
104+
margin-top: 0;
105+
}
106+
blockquote {
107+
margin: 1em 0 1em 1.7em;
108+
padding-left: 1em;
109+
border-left: 2px solid #e6e6e6;
110+
color: #606060;
111+
}
112+
code {
113+
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
114+
font-size: 85%;
115+
margin: 0;
116+
hyphens: manual;
117+
}
118+
pre {
119+
margin: 1em 0;
120+
overflow: auto;
121+
}
122+
pre code {
123+
padding: 0;
124+
overflow: visible;
125+
overflow-wrap: normal;
126+
}
127+
.sourceCode {
128+
background-color: transparent;
129+
overflow: visible;
130+
}
131+
hr {
132+
background-color: #1a1a1a;
133+
border: none;
134+
height: 1px;
135+
margin: 1em 0;
136+
}
137+
table {
138+
margin: 1em 0;
139+
border-collapse: collapse;
140+
width: 100%;
141+
overflow-x: auto;
142+
display: block;
143+
font-variant-numeric: lining-nums tabular-nums;
144+
}
145+
table caption {
146+
margin-bottom: 0.75em;
147+
}
148+
tbody {
149+
margin-top: 0.5em;
150+
border-top: 1px solid #1a1a1a;
151+
border-bottom: 1px solid #1a1a1a;
152+
}
153+
th {
154+
border-top: 1px solid #1a1a1a;
155+
padding: 0.25em 0.5em 0.25em 0.5em;
156+
}
157+
td {
158+
padding: 0.125em 0.5em 0.25em 0.5em;
159+
}
160+
#TOC li {
161+
list-style: none;
162+
}
163+
#TOC ul {
164+
padding-left: 1.3em;
165+
}
166+
#TOC > ul {
167+
padding-left: 0;
168+
}
169+
#TOC a:not(:hover) {
170+
text-decoration: none;
171+
}

webdocs/install-pip.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,22 @@ Distro-supplied packages
5353
---------------------------------
5454

5555
A small number of users or sites prefer to use Python distributions supplied via a Linux distribution, such as from Ubuntu, Debian or Redhat. As an example for how this is done, please see some older notes on installation with the Raspberry Pi OS: https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/InstallPiLinux.
56+
57+
With Redhat Enterprise Linux (RHEL) if you want to use RHEL-supplied
58+
versions of Python, you can use this command to install a fairly old
59+
version of Python::
60+
61+
sudo yum install python3-wxpython4 python3-matplotlib python3-numpy python3-scipy python3-GitPython python3-requests python3-pillow python3-h5py python3-pyopengl
62+
63+
As you will likely need to create your own binary files, you will also
64+
likely need this as well::
65+
66+
sudo yum install python3-scons python3-numpy-f2py
67+
68+
RHEL also supplies a Python 3.11 interpreter, but not very many
69+
packages for that, so pip will be needed (this is pretty slow, FWIW)::
70+
71+
sudo yum install python3.11 python3.11-numpy python3.11-scipy python3.11-pip python3.11-wheel
72+
pip3.11 install wxpython
73+
pip3.11 install matplotlib
74+
pip3.11 install pyopengl

0 commit comments

Comments
 (0)