Skip to content

Commit

Permalink
code syntax highlighter
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Sep 27, 2024
1 parent 4df428b commit 8e80921
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 14 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,17 @@ JB :
# and include your custom code. Your custom file must be defined at:
# ./_includes/custom/[HELPER]
# where [HELPER] is the name of the helper you are overriding.

markdown : kramdown

highlighter: coderay

kramdown:
use_coderay: true
syntax_highlighter: coderay
syntax_highlighter_opts:
line_numbers: no
bold_every: 5
input: GFM
auto_ids: true
toc_levels: 1..3
14 changes: 7 additions & 7 deletions _posts/2024-07-02-Basic_viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ Mostafa Ashraf.
<br>
<p>The example below illustrates how we can use the function <code>CGAL::draw()</code> to visualize an OFF file loaded into a <code>CGAL::Surface_mesh</code> data structure.</p>

<pre><code>
#include &lt;CGAL/Simple_cartesian.h&gt;
#include &lt;CGAL/Surface_mesh.h&gt;
#include &lt;CGAL/draw_surface_mesh.h&gt;
```c++
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/draw_surface_mesh.h>

int main(int argc, char* argv[])
{
using Point=CGAL::Simple_cartesian&lt;double&gt;::Point_3;
CGAL::Surface_mesh&lt;Point&gt; sm;
using Point=CGAL::Simple_cartesian<double>::Point_3;
CGAL::Surface_mesh<Point> sm;
CGAL::IO::read_polygon_mesh(argv[1], sm);
CGAL::draw(sm);
return EXIT_SUCCESS;
}
</code></pre>
```
<p>Unfortunately, this function had several limitations. Firstly, it was not easy to customize the drawing, for example changing the color or hiding of some elements. Secondly, it was not possible to draw different data structures simultaneously. Finally, it was not easy to add interaction with the drawing, or to use it in an higher level widget. All these limitations are solved with a new package: the CGAL Basic Viewer.
Expand Down

0 comments on commit 8e80921

Please sign in to comment.